Skip to main content

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

  1. Create a new API key for a wallet:
stitch key <wallet_address>
  1. Create a new memory space:
stitch create-space <space_name>
  1. Push memory to a space:
stitch push <space_name> [-m COMMIT_MESSAGE] [-e EPISODIC_FILE_PATH] [-c CHARACTER_FILE_PATH]
  1. Pull memory from a space:
stitch pull <space_name> <memory_id> [-p DB_PATH]
  1. Pull external memory:
stitch pull-external <memory_id> [-p RAG_PATH]
  1. List all memory spaces:
stitch list-spaces
  1. 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

SDK Usage

from stitch_ai import StitchSDK

sdk = StitchSDK()
sdk.create_space("my_space")

Project details


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)

Uploaded Source

Built Distribution

stitch_ai-0.2.7-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

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

Hashes for stitch_ai-0.2.7.tar.gz
Algorithm Hash digest
SHA256 47582c097a69c03a13c0b52ef6876efcf8759f09c472cfbc3d9f1d0406ee464f
MD5 e1f7fd38a1e148d2584073b26830276c
BLAKE2b-256 305abca6d49a2b79a3596e0c6a3ce9d48eb5cdfcb106b93cf43cdc13373e6053

See more details on using hashes here.

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

Hashes for stitch_ai-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3b6b8d54b56dcbe9eb66f48bfd79df0d46270d7af5bd889438931be0d6205047
MD5 13af2326cc2fcc4a9af19d1f842a636c
BLAKE2b-256 9850be1dc3941451c9ca1dfe6acfb69b93cf4a8dca77e4599e0b35e7e204e27b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page