Overview
The new Mem0 release redesigns both extraction and retrieval, and cleans up the SDK surface across Python and TypeScript:- Extraction: Single-pass ADD-only (one LLM call, no UPDATE/DELETE)
- Retrieval: Multi-signal hybrid search (semantic + BM25 keyword + entity matching)
- Entity matching: Automatic entity extraction feeds a third scoring signal in hybrid search, boosting memories that share entities with the query
- Graph memory moved to Platform: The external graph store integration is removed from OSS; graph memory is now a built-in, always-on Mem0 Platform feature
- SDK cleanup: Deprecated parameters removed, naming conventions standardized
- API surface aligned with Platform: Entity IDs now follow the same convention across OSS and Platform: top-level kwargs for
add()/delete_all(), insidefiltersforsearch()/get_all()
Breaking Changes
Python Open Source
TypeScript Open Source
Python Client SDK
TypeScript Client SDK
Step-by-Step Migration
1. Update Installation
- Python
- TypeScript
Supported Python versions for
[nlp] extras: 3.10 – 3.12. spaCy and its blis / thinc dependencies do not yet ship prebuilt wheels for Python 3.13, so installs on 3.13 will fail at build time. Use Python 3.12 (or older) for the [nlp] extras until upstream support lands. The base mem0ai package works on all supported Python versions; only the NLP extras are constrained.The Python
[nlp] extra installs spaCy for entity extraction and keyword lemmatization. Without it, Mem0 still works but falls back to semantic-only search (no entity matching, no BM25 lemmatization).2. Update Configuration
- Python OSS
- TypeScript OSS
3. Update Search Calls
- Python OSS
- TypeScript OSS
- Python Client SDK
- TypeScript Client SDK
4. Update Add Calls
- Python OSS
- Python Client SDK
- TypeScript Client SDK
5. Update Vector Store Dependencies
If you’re using Qdrant or Upstash, update your client libraries:6. Entity Matching Store Setup
The new algorithm automatically creates a parallel collection named{your_collection}_entities to power entity matching, the third signal in hybrid search. No manual setup is required: it’s created on first use. This is separate from and unrelated to graph memory, which is a Mem0 Platform feature.
Graph Memory: Platform Only
Graph memory is removed from the open-source SDK. It is not being replaced by an OSS equivalent: graph memory is a Mem0 Platform feature, built in and always on, with no external graph database required. See Graph Memory for what it does on Platform. What was removed from OSS:enable_graph/enableGraphconfig flaggraph_store/graphStoreconfiguration block- All external graph store drivers (Neo4j, Memgraph, Kuzu, Apache AGE, Neptune) and their code paths (~4000 lines)
- Remove
enable_graph/enableGraphfrom your config - Remove the
graph_store/graphStoreblock: it is no longer read - Uninstall external graph drivers (neo4j, memgraph, etc.) if you were using them only for Mem0
- If you need graph memory, use Mem0 Platform instead of self-hosted OSS
How the New Algorithm Works
Extraction: Single-Pass ADD-Only
Retrieval: Multi-Signal Hybrid Search
score per result. The fusion adapts based on which signals are available at runtime (semantic-only, semantic + BM25, or all three when spaCy + the entity store are active).
BM25 is a boost signal, not a recall expander. Only semantic search results are candidates: BM25 and entity scores boost ranking but don’t add new candidates.
Vector Store Compatibility
All 15 supported vector stores have been enhanced with two new capabilities:
Qdrant-specific changes:
- Now uses sparse vectors (BM25) alongside dense vectors in the same collection
- Requires
fastembedlibrary for BM25 encoding (lazy-loaded, gracefully degrades) - Install:
pip install fastembed
- Enhanced with
keyword_search()methods using their native full-text capabilities - No additional dependencies required
Graceful Degradation
The new features degrade gracefully when optional dependencies are missing:
You always get semantic search. Hybrid search features layer on top when available.
Removed Parameters Reference
These parameters have been removed across all SDKs. Remove them from your code:Python Client SDK: Removed parameters
Constructor:org_id, project_id
All methods: api_version, output_format, async_mode, org_name, project_name, org_id, project_id
add(): enable_graph, immutable, filter_memories, batch_size, force_add_only, includes, excludes, keyword_search
search(): enable_graph
get_all(): enable_graph
project.update(): enable_graph
TypeScript Client SDK: Removed parameters
Constructor:organizationId, projectId, organizationName, projectName
All methods: OutputFormat enum, API_VERSION enum
add(): enable_graph / enableGraph, async_mode / asyncMode, output_format / outputFormat, immutable, filter_memories / filterMemories, batch_size / batchSize, force_add_only / forceAddOnly, includes, excludes, keyword_search / keywordSearch
search(): enable_graph / enableGraph
get_all(): enable_graph / enableGraph
Python OSS: Removed/renamed parameters
Config:custom_fact_extraction_prompt → renamed to custom_instructions
Config: custom_update_memory_prompt → deprecated, use custom_instructions
Config: enable_graph + graph_store → removed (graph memory is now a Mem0 Platform feature)
TypeScript OSS: Removed/renamed parameters
Config:customPrompt → renamed to customInstructions
Config: enableGraph + graphStore → removed (graph memory is now a Mem0 Platform feature)
search(): limit → renamed to topK
Common Issues
TypeScript: limit is not a valid parameter
The limit parameter has been renamed to topK in the TypeScript OSS:
TypeScript Client: snake_case params no longer work
All TypeScript Client SDK parameters now use camelCase. The SDK handles conversion to/from the API automatically:ValueError: Top-level entity parameters not supported in search() / get_all()
search() and get_all() now require entity IDs inside filters. Top-level kwargs raise ValueError. This aligns the OSS SDK with the Platform API.
add() and delete_all() continue to accept entity IDs as top-level kwargs.
Search returns fewer results than before
The defaultthreshold changed from None to 0.1. Low-relevance results that were previously included are now filtered out. To restore the old behavior:
spaCy model not found
If you see errors about missing spaCy models, download the required model:Entity matching store collection creation fails
The entity matching store tries to create a{collection_name}_entities collection automatically. If your vector database has restricted permissions, pre-create this collection with the same embedding dimensions as your main collection.
Score values are different from before
The top-levelscore still ranges [0, 1], but it is computed differently in v3. Relative ranking between results stays comparable, but absolute numbers shift: retune any hard thresholds in your app against representative queries.
If you need the raw cosine similarity for a specific use case, run an unboosted vector query directly against your vector store via vector_store.search(...).
Need Help?
- Join our Discord community for real-time support
- Open an issue on GitHub
- Check the evaluation docs to benchmark the new algorithm on your data