Stitch AI SDK for managing memory spaces and memories
Project description
Stitch SDK
Stitch SDK is a Python library that wraps the API for managing memory spaces and memories. It provides both a Python SDK and a command-line interface (CLI).
Installation
pip install stitch_ai
CLI Usage
Before using the CLI, set your API key as an environment variable:
export STITCH_API_KEY=your_api_key
Available Commands
- Create a new API key for a wallet:
stitch key <wallet_address>
- Create a new memory space:
stitch create-space <space_name>
- Push memory to a space:
stitch push <space_name> [-m COMMIT_MESSAGE] [-e EPISODIC_FILE_PATH] [-c CHARACTER_FILE_PATH]
- Pull memory from a space:
stitch pull <space_name> <memory_id> [-p DB_PATH]
- Pull external memory:
stitch pull-external <memory_id> [-p RAG_PATH]
- List all memory spaces:
stitch list-spaces
- List all memories in a space:
stitch list-memories <space_name>
Examples
# Create a new API key for a wallet
stitch key 0x1234567890abcdef1234567890abcdef12345678
# Create a new memory space
stitch create-space my_space
# Push memory with a message and files
stitch push my_space -m "Initial memory" -e ./agent/data/db.sqlite -c ./characters/default.character.json
# Pull a specific memory
stitch pull my_space memory_123 -p ./db/chroma.sqlite3
# Pull external memory
stitch pull-external memory_123 -p ./rag/rag.json
# List all memory spaces
stitch list-spaces
# List all memories in a space
stitch list-memories my_space
Environment Variables
STITCH_API_KEY
: Your API key (required)STITCH_API_URL
: API endpoint (optional, defaults to https://api-devnet.stitch-ai.co)
SDK Usage
from stitch_ai import StitchSDK
sdk = StitchSDK()
sdk.create_space("my_space")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
stitch_ai-0.2.7.tar.gz
(10.3 kB
view details)
Built Distribution
stitch_ai-0.2.7-py3-none-any.whl
(11.8 kB
view details)
File details
Details for the file stitch_ai-0.2.7.tar.gz
.
File metadata
- Download URL: stitch_ai-0.2.7.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47582c097a69c03a13c0b52ef6876efcf8759f09c472cfbc3d9f1d0406ee464f |
|
MD5 | e1f7fd38a1e148d2584073b26830276c |
|
BLAKE2b-256 | 305abca6d49a2b79a3596e0c6a3ce9d48eb5cdfcb106b93cf43cdc13373e6053 |
File details
Details for the file stitch_ai-0.2.7-py3-none-any.whl
.
File metadata
- Download URL: stitch_ai-0.2.7-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b6b8d54b56dcbe9eb66f48bfd79df0d46270d7af5bd889438931be0d6205047 |
|
MD5 | 13af2326cc2fcc4a9af19d1f842a636c |
|
BLAKE2b-256 | 9850be1dc3941451c9ca1dfe6acfb69b93cf4a8dca77e4599e0b35e7e204e27b |