Skip to main content
Mem0 OSS works out of the box with OpenAI defaults. Point it at your own LLM, embedder, and vector store by passing a config when you create Memory. The Python SDK also supports a reranker and graph memory.
Prerequisites
  • Python 3.10+ (pip) or Node.js 18+ (npm)
  • A running vector store such as Qdrant or Postgres + pgvector (Python’s default Qdrant and Node’s in-memory store need nothing extra)
  • API keys for your chosen LLM and embedder providers
New to Mem0 OSS? Run the Python or Node.js quickstart first, then come back to swap in your own providers.

Install dependencies

Using Qdrant as your vector store? Install its Python client (the Node SDK talks to Qdrant over REST) and run the server locally:

Define your configuration

Each component takes a provider and a config. Keys are snake_case in Python and camelCase in TypeScript. Pass the config when you create Memory:
Set your provider keys as environment variables:
The TypeScript OSS SDK configures the LLM, embedder, vector store, and history store. Reranker and graph memory are Python-only today.
Prefer a config file? Load YAML into Python’s from_config:
Verify it works: add a memory and search it back. memory.add(...) followed by memory.search(...) should populate your vector store and return the memory as a top hit.

Available providers

Change the provider string to switch backends. The most common options:
ComponentPythonTypeScript
LLMopenai, anthropic, gemini, groq, ollama, aws_bedrock, azure_openai, litellmopenai, anthropic, gemini, groq, ollama, aws_bedrock, azure_openai, mistral, deepseek
Embedderopenai, gemini, azure_openai, ollama, huggingface, vertexai, aws_bedrockopenai, gemini, azure_openai, ollama
Vector storeqdrant, pgvector, chroma, pinecone, redis, weaviate, milvus, elasticsearchmemory, qdrant, pgvector, redis, supabase, azure-ai-search, vectorize, milvus
See the full catalog in Components.

Tune component settings

Name collections explicitly in production (collection_name / collectionName) to isolate tenants and enable per-tenant retention policies.
Keep extraction temperature at or below 0.2 so memories stay deterministic. Raise it only when you see facts being missed.
Limit top_k to 10 to 20 results. Sending more adds latency without meaningful gains.
Mixing managed and self-hosted components? Make sure every outbound provider call has a secure network path. Managed rerankers and embedders often require outbound internet even if your vector store is on-prem.

Quick recovery

  • Qdrant connection errors: confirm port 6333 is exposed and the API key (if set) matches.
  • Empty search results: verify the embedder model name. A mismatch causes dimension errors.
  • Unknown reranker (Python): upgrade the SDK with pip install --upgrade mem0ai to load the latest provider registry.
  • Cannot find module (Node): import from the OSS entry point, import { Memory } from "mem0ai/oss", not "mem0ai".

Pick Providers

Deploy with Docker Compose