docs/open-source/configuration.mdx
Mem0 OSS works out of the box with OpenAI defaults. Point it at your own LLM, embedder, vector store, and reranker by passing a config when you create Memory.
npm install mem0ai
Using Qdrant as your vector store? Install its Python client (the Node SDK talks to Qdrant over REST) and run the server locally:
pip install qdrant-client # Python only
docker run -p 6333:6333 qdrant/qdrant
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:
config = { "vector_store": { "provider": "qdrant", "config": {"host": "localhost", "port": 6333}, }, "llm": { "provider": "openai", "config": {"model": "gpt-5-mini", "temperature": 0.1}, }, "embedder": { "provider": "openai", "config": {"model": "text-embedding-3-small"}, }, "reranker": { "provider": "cohere", "config": {"model": "rerank-v3.5"}, }, }
memory = Memory.from_config(config)
```ts Node.js
import { Memory } from "mem0ai/oss";
const memory = new Memory({
llm: {
provider: "openai",
config: { apiKey: process.env.OPENAI_API_KEY || "", model: "gpt-5-mini", temperature: 0.1 },
},
embedder: {
provider: "openai",
config: { apiKey: process.env.OPENAI_API_KEY || "", model: "text-embedding-3-small" },
},
vectorStore: {
provider: "qdrant",
config: { host: "localhost", port: 6333, collectionName: "memories" },
},
});
Set your provider keys as environment variables:
export OPENAI_API_KEY="..."
export COHERE_API_KEY="..." # Cohere reranker only
Prefer a config file? Load YAML into Python's from_config:
import yaml
from mem0 import Memory
with open("config.yaml") as f:
config = yaml.safe_load(f)
memory = Memory.from_config(config)
Change the provider string to switch backends. The most common options:
| Component | Python | TypeScript |
|---|---|---|
| LLM | openai, anthropic, gemini, groq, ollama, aws_bedrock, azure_openai, litellm | openai, anthropic, gemini, groq, ollama, aws_bedrock, azure_openai, mistral, deepseek |
| Embedder | openai, gemini, azure_openai, ollama, huggingface, vertexai, aws_bedrock | openai, gemini, azure_openai, ollama |
| Vector store | qdrant, pgvector, chroma, pinecone, redis, weaviate, milvus, elasticsearch | memory, qdrant, pgvector, redis, supabase, azure-ai-search, vectorize, milvus |
See the full catalog in <Link href="/components/llms/overview">Components</Link>.
6333 is exposed and the API key (if set) matches.Unknown reranker (Python): upgrade the SDK with pip install --upgrade mem0ai to load the latest provider registry.Cannot find module (Node): two common causes. First, import from the OSS entry point, import { Memory } from "mem0ai/oss", not "mem0ai". Second, provider SDKs are optional peer dependencies loaded on demand, so install the one for the provider you configured (for example npm install @qdrant/js-client-rest for Qdrant). Installing mem0ai alone only pulls in the providers used by default; you do not need SDKs for providers you never select.