Back to Documentation

Python SDK Reference

Complete guide to using the Memphora Python SDK with all features and examples. For TypeScript/JavaScript, see the TypeScript SDK.

Installation

pip install memphora

Quick Start

💡 Important: Get your API key from the API Key Management page.

from memphora import Memphora

# Initialize SDK
memory = Memphora(
    user_id="user_123",
    api_key="your-api-key"
)

# Store memories
memory.store("User loves Python programming")
memory.store("User works at Google", {"type": "fact"})

# Search memories
results = memory.search("What does the user love?")

# Get formatted context for LLM
context = memory.get_context("user preferences")

Core Memory Operations(7)

Search & Context(2)

Conversations(4)

Agent Memory(3)

Group Memory(3)

Multimodal(4)

Documents(2)

Export & Utility(3)