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 memphoraQuick 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")