Documentation

Zymemory Python SDK

Official Python client for the Zymemory API, long-term memory for AI applications. Give your AI assistants, chatbots, and agents the ability to remember and recall information across conversations.

PyPI Python 3.8+

Semantic Memory Search

Find relevant memories using natural language

Memory Linking

Connect related memories for graph-based recall

Conversation Storage

Automatically cluster conversations into structured memories

Smart Clustering

AI-powered organisation of information

Multi-tenant

Secure isolation for different users and organisations

Fast & Scalable

Built on high-performance infrastructure

Installation

# Install from PyPI
pip install zymemory

Quick Start

from zymemory import ZymemoryClient

# Initialise client
client = ZymemoryClient(
    api_key="your-org-api-key",
    org_email="your-org@example.com",
    user_token="user-specific-token"
)

# Search for memories
results = client.search("What are my coffee preferences?")
for memory in results.memories:
    print(f"{memory.content}")
    print(f"   Keywords: {', '.join(memory.keywords)}")

# Create a new memory
memory = client.create_memory("I prefer oat milk lattes in the morning")
print(f"Created memory #{memory.id}")

# Store a conversation
client.store_conversation(
    user_input="What's the weather today?",
    assistant_output="It's sunny and 72°F!"
)

Authentication

Zymemory uses a two-tier authentication system:

  • Organisation API Key - Identifies your organisation
  • User Token - Identifies the end user

Getting Your Credentials

1. Get your organisation API key from the Zymemory dashboard.

2. Register your end users:

# First, initialise with just org credentials
client = ZymemoryClient(
    api_key="your-org-key",
    org_email="your-org@example.com"
)

# Register a new end user
user = client.register_user(
    external_id="user_123",  # Your system's user ID
    name="John Doe",
    email="john@example.com"
)

# Save the user token for future requests
print(f"User token: {user.token}")

# Now use it for all memory operations
client.user_token = user.token
i
Next Steps
Ready to dive deeper? Check out the full SDK Reference for all methods, models, and advanced features.
Home Solutions Pricing Blog Security Access