Configure Mem0 OSS Components
Prerequisites
- Python 3.10+ with
pipavailable - Running vector database (e.g., Qdrant, Postgres + pgvector) or access credentials for a managed store
- API keys for your chosen LLM, embedder, and reranker providers
Start from the Python quickstart if you still need the base CLI and repository.
Install dependencies
- Python
- Docker Compose
1
Install Mem0 OSS
2
Add provider SDKs (example: Qdrant + OpenAI)
Define your configuration
- Python
- config.yaml
1
Create a configuration dictionary
2
Store secrets as environment variables
Run
memory.add(["Remember my favorite cafe in Tokyo."], user_id="alex") and then memory.search("favorite cafe", user_id="alex"). You should see the Qdrant collection populate and the reranker mark the memory as a top hit.Tune component settings
Vector store collections
Vector store collections
Name collections explicitly in production (
collection_name) to isolate tenants and enable per-tenant retention policies.LLM extraction temperature
LLM extraction temperature
Keep extraction temperatures ≤0.2 so advanced memories stay deterministic. Raise it only when you see missing facts.
Reranker depth
Reranker depth
Limit
top_k to 10–20 results; sending more adds latency without meaningful gains.Mixing managed and self-hosted components? Make sure every outbound provider call happens through a secure network path. Managed rerankers often require outbound internet even if your vector store is on-prem.
Quick recovery
- Qdrant connection errors → confirm port
6333is exposed and API key (if set) matches. - Empty search results → verify the embedder model name; a mismatch causes dimension errors.
Unknown reranker→ update the SDK (pip install --upgrade mem0ai) to load the latest provider registry.