Skip to content

Python SDK

The Python SDK provides a simple, async-first interface for integrating memory into your AI applications. It includes client libraries, tool schemas for LLMs, and framework integrations.

  • 🐍 SDK Documentation


    Complete API reference for the Python client library

    SDK Reference →

  • 🦜 LangChain Integration


    Use memory with LangChain agents and chains

    LangChain Guide →

  • ⚙️ Configuration


    Environment variables and configuration options

    Configuration →

Installation

pip install agent-memory-client

Quick Example

from agent_memory_client import MemoryAPIClient

client = MemoryAPIClient(base_url="http://localhost:8000")

# Get memory-enriched context for your LLM
context = await client.memory_prompt(
    query="What restaurants should I try?",
    session_id="chat_123",
    long_term_search={"text": "food preferences", "limit": 5}
)

See the SDK Documentation for complete usage examples.