docs/changelog/sdk.mdx
Bug Fixes:
embed_batch count mismatch in the OpenAI and Azure OpenAI embedders (#5966)[] (#5878)Security:
New Features:
expiration_date on MemoryClient.update() and AsyncMemoryClient.update(): callers can now set or clear a memory's expiration date; None is preserved and forwarded to the API (#5874)Bug Fixes:
remove_code_blocks() to the LangChain path in async _create_procedural_memory so code fences are stripped consistently (#5711)user_id, agent_id, run_id) in delete_all() for both sync and async Memory (#5735).get() for hash and created_at in the Redis insert() and update() paths so entity payloads that omit those fields no longer raise KeyError (#5709)col_info() signature differences and adding num_docs to the count-extraction lookup (#5687)Bug Fixes:
New Features:
embed_batch to five embedders: LM Studio, Together, HuggingFace, Vertex AI, and Google GenAI: for batched embedding requests (#5609)Bug Fixes:
image_url entries in parse_vision_messages to prevent crashes (#5631)attributed_to from get(), get_all(), and search() (#5629)reset() only dropping the history table and leaving stale messages behind (#5541)embed_batch count mismatch in the v3 add pipeline (#5604)delete_all race condition that corrupted the entity store's linked_memory_ids (#5553)response_format for Groq compound models that reject it (#5513)anthropic_base_url to the Anthropic client (#5626)httpx>=0.28 and preserve proxies in LlmFactory (#5447)embedding_dims to Titan V2 in the AWS Bedrock embedder (#5671)mem0ai[extras] (#5622)auto_refresh option for OpenSearch Serverless compatibility (#3893)vector_id in a list for Chroma delete() (#5703)update() ids, embeddings, and metadatas in lists (#5757)vector_id in a list for Milvus delete() (#5704)_create_filter() (#5707)None instead of {} from Chroma _generate_where_clause for empty filters (#5713)[[]] from the OpenSearch list() error path to honor the list() contract (#5727)[[]] from the Pinecone list() error path instead of a dict (#5706)[[]] for an uninitialized FAISS index to honor the list() contract (#5725)list() return in an outer list to match the interface contract (#5729)DEFAULT_FIELDS so instances keep distinct dims (#5633)vectors arg in Vertex AI list() and similarity search (#5627)None from Redis get() for missing IDs (#5625)print in Weaviate list_cols (#5637)_validate_api_key (#5639)127.0.0.1 in the dashboard healthcheck to avoid IPv6 localhost resolution (#5612)Improvements:
Security:
New Features:
embed_batch to OllamaEmbedding for batched embedding requests (#5415)Bug Fixes:
api_error_handler silently dropping return values from async methods (#5540)AsyncMemory.reset() not resetting the entity store (#5535)async delete_all aborting on first error, leaving partial deletion (#5529)content key in message parsers to prevent KeyError crashes (#5575)tool_choice format and tool response parsing (#5537)json format mutating the caller's messages list in-place (#5539)None config values from Gemini GenerateContentConfig to prevent validation errors (#5528)AzureOpenAIStructuredLLM (#5548)OpenAIStructuredLLM (#5458)max_completion_tokens for the GPT-5 family across all providers (#5547)**kwargs in Together, LangChain, and Sarvam providers (#5556)dict literal instead of set (#5527)self.config instead of raw config parameter (#5538)aws_session_token in AWS Bedrock embeddings (#5566)config.top_k in Cohere and ZeroEntropy fallback paths (#5560)reset() crashing with missing vector_size argument (#5531)reset() to avoid re-init crash (#5570)reset() passing wrong argument to create_col() (#5532)filters is None (#5533)None filters in search() and list() (#5446)None from get() for missing IDs in Milvus, Weaviate, and Supabase (#5562)None from ChromaDB get() for missing IDs (#5561)New Features:
MEM0_TELEMETRY=false (#5494)Bug Fixes:
parse_vision_messages when vision support is disabled (#5487)https option on the Qdrant vector store configuration so TLS endpoints can be targeted explicitly (#5380)search() crashing with a TypeError in the LangChain vector store when a result score is None (#5072)is not None instead of a truthiness check for vector/payload in the PGVector update() path, so valid empty/zero values are no longer skipped (#5488)memory field as TEXT rather than TAG so full-text search behaves correctly (#5443)$not filter support in the ChromaDB vector store (#5485)New Features:
keyword_search. Affected stores: Chroma, FAISS, Cassandra, LangChain, Neptune Analytics, S3 Vectors, Supabase, TurboPuffer, Valkey (#5444)explain=True parameter to Memory.search() and AsyncMemory.search(). When enabled, each result includes a score_details dict with semantic_score, bm25_score, entity_boost, raw_score, max_possible_score, final_score, and threshold so callers can understand and tune retrieval ranking (#5102)Bug Fixes:
[0, 1] (higher = better) consistently across all backends. 11 adapters previously returned raw distance metrics (lower = better): FAISS, Chroma, Milvus, Redis, Cassandra, PGVector, S3 Vectors, Supabase, Valkey, Azure MySQL, and Vertex AI Vector Search: causing incorrect ranking in multi-store setups (#5391)Memory.search() and AsyncMemory.search(). Previously up to 8 entities were embedded and queried sequentially (16 serial round-trips with remote embedders); all entity lookups now run concurrently, eliminating multi-second latency on entity-rich queries (#5377)Memory.search(), AsyncMemory.search(), MemoryClient.search(), and AsyncMemoryClient.search() before any embedding or API call is made. Also strips leading/trailing whitespace from valid queries (#5258)is_reasoning_model: Optional[bool] override to BaseLlmConfig (surfaced on OpenAILlmConfig and AzureOpenAILlmConfig). Fixes silent zero-extraction when using Azure deployments with versioned gpt-5.x names that the automatic name-based heuristic cannot recognize (#5327)XAIConfig with xai_base_url, forward tools/tool_choice in generate_response(), and parse tool_calls in the response. Previously the provider raised AttributeError at init and silently dropped tool results (#5190)ConnectionPool hang in Docker Compose environments where the app container starts before Postgres is DNS-resolvable: switched to open=False to avoid blocking constructor or silent zombie pool (#5155)sslmode handling for PostgreSQL URIs: the sslmode query parameter is now correctly extracted and forwarded when building the async connection pool (#5308)list() not applying metadata filters: filtering is now done client-side after fetching, with pagination preserved and top_k applied after filtering to prevent pre-truncation of matching rows (#5018)search() routing all queries to the default namespace: namespace is now passed as a top-level keyword argument to query_many() instead of inside the per-query dict where it was silently ignored (#5202)None sentinels in embedder configs and the proxy module, preventing cross-request state contamination (#5302)New Features:
delete() and async delete() accept delete_linked (default False). When True, deleting a memory also removes the older memories it superseded (the v3 linked_memory_ids chain), transitively: the delete-side counterpart of latest_only, so a superseded memory does not resurface after the current one is deleted (#5270)Bug Fixes:
eq, ne, gt, gte, lt, lte, in, nin, contains, icontains, wildcard *, $or, $not) in search(), keyword_search(), and list(). Previously only exact-equality filters worked: operator dicts were silently stringified and returned zero results (#5263)/search endpoint returning 502 when user_id, agent_id, or run_id are sent as top-level request fields. The server now maps these into the filters dict before calling Memory.search(), matching the v3 API contract. Top-level entity ID fields are marked as deprecated in the OpenAPI schema and emit a warning log: clients should migrate to filters={"user_id": "..."} (#5263)Bug Fixes:
MemoryClient init so $identify events fire and a single user is no longer tracked as two or three disconnected personas (#5040)New Features:
decay on project.update (#5062)Improvements:
mem0 search decisions to the agent (#4992)Bug Fixes:
user_id, agent_id, run_id entity params to filters in GET /memories (#4960)prompt param in vector store extraction pipeline (#4914)text_lemmatized field in AsyncMemory._create_memory (#4886)_is_reasoning_model check to not match gpt-5.x variants (#4746)ca_certs config option for Elasticsearch vector store (#3993)agent_id and run_id to Elasticsearch/OpenSearch default mappings (#4906)embedding_dims from model metadata at init (#4711)Security:
Major Release: Python SDK with V3 memory pipeline, ADD-only extraction, and cleaned-up API surface.
New Features:
ADDITIVE_EXTRACTION_PROMPT. Memories accumulate via linked_memory_ids: no more UPDATE/DELETE events (#4805)keyword_search() added to 15 vector store adapters (Qdrant, Elasticsearch, OpenSearch, Azure AI Search, Weaviate, Redis, PGVector, Pinecone, Databricks, MongoDB, Milvus, Baidu, Upstash, Azure MySQL, Vertex AI) (#4805){collection}_entities) for cross-memory relationship retrieval. Optional dependency: pip install mem0ai[nlp] (#4805)Memory and async AsyncMemory at full parity (#4805)cluster_mode parameter for Valkey Cluster Mode Enabled (CME) deployments (#4759)MemoryClient.add() now posts to /v3/memories/add/; MemoryClient.get_all() posts to /v3/memories/ and returns a paginated envelope {"count": int, "next": str | None, "previous": str | None, "results": [...]} (#4856)gpt-5-mini is now the default across OpenAILLM, OpenAIStructuredLLM, AzureOpenAILLM, AzureOpenAIStructuredLLM, and LiteLLM fallback (#4829)Breaking Changes:
add() returns ADD-only events: No more "UPDATE" or "DELETE" events. Memories accumulate; nothing is overwritten (#4805)search() default threshold is now 0.1: Pass threshold=0.0 for previous behavior (#4805)search() score is now a combined multi-signal score: The top-level score fuses semantic similarity, BM25 keyword match, entity signals, and temporal boosts into one value. Absolute numbers shift versus the old raw cosine score; retune any hard thresholds against representative queries (#4805, #4836)search() default rerank is now False: Pass rerank=True for previous behavior (#4805)top_k default changed 100 → 20 in Memory.get_all() and Memory.search() (sync + async). Pass top_k=100 explicitly to restore the old behavior (#4843)user_id / agent_id / run_id are trimmed; empty-string and whitespace-only values now raise ValueError (#4843)threshold must be a number in [0, 1]; top_k must be a non-negative integer: invalid inputs raise ValueError (#4843)messages in Memory.add() rejects invalid types: Passing None or non-(str | dict | list) values raises Mem0ValidationError (error_code="VALIDATION_003") (#4843)qdrant-client>=1.12.0 required: Upgrade from >=1.9.1 (#4805)org_id and project_id removed: Removed from MemoryClient constructor and all method signatures (#4740)mem0/memory/graph_memory.py, memgraph_memory.py, kuzu_memory.py, apache_age_memory.py, and mem0/graphs/ (Neo4j / Memgraph / Kuzu / Apache AGE / Neptune drivers) deleted, about 4,000 lines. The external graph store integration is no longer part of the OSS SDK; graph drivers (neo4j, memgraph, kuzu, etc.) can be uninstalled. Graph memory now runs natively as built-in entity linking. Remove enable_graph and graph_store from your config (#4805)enable_graph removed from Client SDK: Graph memory now runs automatically and no longer needs a flag. Remove enable_graph from MemoryClient.add() / search() / get_all() / update_project() calls (#4776)custom_fact_extraction_prompt renamed to custom_instructions: Update config and memory module references (#4740)AddMemoryOptions, SearchMemoryOptions, GetAllMemoryOptions, DeleteAllMemoryOptions, UpdateMemoryOptions, ProjectUpdateOptions (#4740)Security:
FAISS vector store (#4833)Bug Fixes:
path=...), eliminating RocksDB lock contention between the main and entity collections (#4836)vector=None in update() to prevent boto3 validation error when event=NONE (#4594)store parameter opt-in to prevent leaking to non-OpenAI backends like Google Gemini (#4757)response_format to Azure OpenAI API to prevent JSON parsing failures (#4689)temp_uuid_mapping lookups against LLM-hallucinated IDs with safe .get() and warnings (#4674)MemoryClient.feedback() telemetry TypeError by merging feedback data into single payload (#4795)Improvements:
before_send hook to reduce event volume (#4771)See the OSS v2 to v3 migration guide and Platform migration guide for upgrade instructions.
</Update> <Update label="2026-04-06" description="v1.0.11">New Features & Updates:
multilingual parameter to project update (#4314)Bug Fixes:
DatetimeRange for datetime string values in Qdrant range filters (#4659)ConfigDict to vector store configs (Elasticsearch, MongoDB, Neptune, OpenSearch, PGVector, Supabase, Valkey) (#4656)New Features & Updates:
Bug Fixes:
response_format to OpenAI-compatible API for DeepSeek (#4635)response_format to OpenAI-compatible API for vLLM (#4608)Memory.reset() (#4185)AsyncMemory.from_config a regular classmethod (#4183)New Features & Updates:
reasoning_effort parameter support for reasoning models (#4461)Bug Fixes:
actor_id during memory update (#4570)updated_at on creation and preserve pre-existing created_at (#4499)README.md from wheel shared-data (#4052)vector=None in Milvus and Qdrant update methods (#4568)Improvements:
gemini-embedding-001 (#4571)New Features & Updates:
Bug Fixes:
_create_memory (#4529)mem0.add (#3996)ValueError when deleting nonexistent memory (#4455)Memory.delete() (#4505)knnVector to GA vectorSearch (#3995)None (#4362)/tmp/chroma path in ChromaDbConfig validator (#4179)Langchain.update (#4446)DELETE (#4188)do not remove local path on init (#4475)topP for Anthropic Converse in Bedrock; used AWSBedrockConfig in LlmFactory (#4469)temperature and top_p to Anthropic API (#4471)None content and empty candidates in GeminiLLM parsing (#4462)_parse_response to AzureOpenAIStructuredLLM (#4434)DELETE operations in history (#4492)Improvements:
Bug Fixes:
timezone.utc (#4404)http_auth in _safe_deepcopy_config for OpenSearch (#4418)encoding_format='float' in OpenAI embeddings for proxy compatibility (#4058)client.chat and parse tool_calls from response (#4176)LLMReranker for non-OpenAI providers (#4405)vector_distance to float in Redis search (#4377)Improvements:
Bug Fixes:
MEM0_TELEMETRY is disabled (#4351)vector_store.reset() call from delete_all() that was wiping the entire vector store instead of deleting only the target memories (#4349)OllamaLLM now respects the configured URL instead of always falling back to localhost (#4320)KeyError when LLM omits the entities key in tool call response (#4313)json_object response format (#4271)Dependencies:
<7.0.0 (#4326)New Features & Updates:
timestamp parameter to update(): accepts Unix epoch (int/float) or ISO 8601 stringNew Features & Updates:
New Features & Updates:
New Features & Updates:
Bug Fixes:
New Features & Updates:
Improvements:
Bug Fixes:
New Features & Updates:
Improvements:
Bug Fixes:
New Features & Updates:
export_openmemory.sh migration scriptImprovements:
Bug Fixes:
query_vector args in search methodapp_id on client for Neptune AnalyticsRefactoring:
New Features & Updates:
Improvements:
Bug Fixes:
Refactoring:
New Features & Updates:
client.project and AsyncMemoryClient.project interfacesImprovements:
Documentation:
client.project.get() and client.project.update() instead of deprecated methods.Deprecation:
get_project() and update_project() as deprecated (these methods were already present); added warnings to guide users to the new API.Bug Fixes:
New Features:
Improvements:
Bug Fixes:
Bug Fixes:
New Features:
Improvements:
Bug Fixes:
New Features:
Improvements:
Bug Fixes:
New Features:
Improvements:
Bug Fixes:
New Features:
Improvements:
Bug Fixes:
New Features:
Improvements:
Improvements:
New Features:
Improvements:
Bug Fixes:
Bug Fixes:
New Features:
Improvements:
New Features:
Improvements:
Bug Fixes:
New Features:
Improvements:
New Features:
Bug Fixes:
New Features:
Improvements:
New Features:
Improvements:
Bug Fixes:
New Features:
Bug Fixes:
New Features:
Improvements:
Improvements:
Bug Fixes:
New Features:
Improvements:
Improvements:
Bug Fixes:
New Features:
Improvements:
Bug Fixes:
New Features:
Improvements:
New Features:
Improvements:
Bug Fixes:
New Features:
Improvements:
New Features:
Improvements:
Improvements:
New Features:
Improvements:
Bug Fixes:
New Features:
Improvements:
Documentation:
Bug Fixes:
New Features:
New Features:
Documentation:
Bug Fixes:
package.json file to fix deployment errorsexpiration date
</Update>
Bug Fixes:
package.json file to fix deployment errorsexpiration date
</Update>
Bug Fixes:
Bug Fixes:
embed_batch count mismatch in the OpenAI and Azure OpenAI embedders (#5966)New Features:
expirationDate to AddMemoryOptions, update(), and the Memory interface; add showExpired to SearchMemoryOptions and GetAllMemoryOptions (#5874)MiniMaxLLM provider backed by the OpenAI-compatible MiniMax API (api.minimax.io/v1, default model MiniMax-M2.7) (#5858)LiteLLM provider for routing requests through a local or hosted LiteLLM proxy (#5830)connectionString and ssl options to the PGVector config, allowing connection via URI instead of individual host/user/password/port fields (#5789)Bug Fixes:
userId, agentId, runId) in deleteAll() via validateAndTrimEntityId (#5735)hash and timestamps in the Redis insert() and update() paths so entity payloads that omit those fields no longer crash (#5860)Security:
undici to >=6.27.0 via pnpm override to remediate CVE-2026-12151 (#5861)Bug Fixes:
Bug Fixes:
image_url entries in parseVisionMessages to prevent crashes (#5631)attributedTo from get(), search(), and getAll() (#5675)Memory.add() to prevent hallucinated memories (#5545)message.role instead of content when detecting system messages (#3921)baseURL in AnthropicLLM (#5740)customCategories names through key conversion (#5741)Security:
form-data to >=4.0.6 across pnpm workspaces to remediate CVE-2026-12143 (#5618)Bug Fixes:
tool_choice format: was incorrectly sent as a bare string "auto" (rejected by the API); now correctly sent as { type: "auto" }. Also fixes tool response parsing: tool_use blocks are now parsed into toolCalls objects instead of throwing. Updated default model to claude-sonnet-4-6 and default max_tokens to 2000 to match the Python provider. Added temperature, topP, and maxTokens to LLMConfig so Anthropic params can be configured (#5537)update(): fields such as category, priority, and other user-defined keys were previously dropped on update; the existing payload is now spread before applying the new data (#5480)createMemoryExport (#5594)Security:
esbuild to >=0.28.1 across all npm packages via pnpm overrides to remediate upstream vulnerability (#5563)New Features:
MEM0_TELEMETRY=false (#5494)Security:
@langchain/community to ^1.1.18 to remediate CVE-2026-27795 and CVE-2026-26019 (#5510)New Features:
LMStudioEmbedding provider for local embeddings via the LM Studio server (#5377)explain: true option to Memory.search(). When enabled, each result includes a scoreBreakdown object with semantic, keyword, entityBoost, and temporalBoost fields so callers can inspect and tune retrieval ranking (#5102)Bug Fixes:
Memory.search(). All entity embed + store lookups now run concurrently instead of sequentially, eliminating multi-second latency on entity-rich queries with remote embedding providers (#5377)[0, 1] (higher = better): fixed score inversion in the Redis vector store adapter (#5391)encoding_format: "float" from the OpenAI embedder in both embed() and embedBatch(). Fixes incorrect vector dimensions when using OpenAI-compatible proxies that default to base64 encoding (#5170)Security:
axios to ^1.16.0 to remediate high-severity prototype-pollution CVEs (credential theft, MITM, DoS). Pinned transitive dependencies via pnpm overrides: jws → 4.0.1 (CVE-2025-65945), langsmith → ^0.6.0 (CVE-2026-45134), tar-fs → ^2.1.4 (CVE-2025-48387, CVE-2025-59343), picomatch → ^2.3.2 (CVE-2026-33671), minimatch → ^3.1.3 / ^5.1.8 / ^9.0.7 (CVE-2026-27903, CVE-2026-27904, CVE-2026-26996), path-to-regexp → ^8.4.0 (CVE-2026-4926), rollup → ^4.59.0 (CVE-2026-27606), glob → ^10.5.0 (CVE-2025-64756), @modelcontextprotocol/sdk → ^1.25.4 (CVE-2025-66414, CVE-2026-0621)New Features:
delete() accepts an options object with deleteLinked (serialized as delete_linked, default false). When true, deleting a memory also removes the older memories it superseded (the v3 linked chain), transitively: the delete-side counterpart of latestOnly, so a superseded memory does not resurface after the current one is deleted (#5270)Bug Fixes:
eq, ne, gt, gte, lt, lte, in, nin, contains, icontains, wildcard *, $or, $not) in search(), keywordSearch(), and list(). Previously only exact-equality filters worked: operator objects were passed as raw values and returned incorrect results (#5263)Bug Fixes:
MemoryClient init so $identify events fire and a single user is no longer tracked as two or three disconnected personas (#5040)New Features:
decay on project.update (#5062)Bug Fixes:
timeout config to OpenAI client in JS OSS LLM providers (#4770)Improvements:
Bug Fixes:
define, replacing the two hardcoded version strings in src/client/telemetry.ts and src/oss/src/utils/telemetry.ts. Previously these were stuck at 2.1.36 and 2.1.34 while the published package was on 3.x, so every telemetry event was reporting the wrong client_version. The placeholder is substituted with a string literal at bundle time: no runtime require("./package.json") in the shipped bundle (#4897).Major Release: TypeScript SDK with V3 memory pipeline, camelCase parameters, and cleaned-up API surface.
V3 Memory Pipeline (OSS):
entity_extraction.ts module (720+ lines) with cross-memory relationship retrieval (#4805)SQLiteManager.ts with rolling window for LLM context (#4805)embedBatch() support in OpenAI and Azure embedding providers (#4805)scoring.ts and lemmatization.ts utilities for hybrid search (#4805)prompts/index.ts (592+ lines) with additive extraction prompt aligned with Python SDK (#4805)MemoryClient.add() now posts to /v3/memories/add/; MemoryClient.getAll() posts to /v3/memories/ with paginated envelope { count, next, previous, results } (#4856)gpt-5-mini is now the default in OpenAI, OpenAIStructured, and Azure LLM providers (#4829)Breaking Changes:
graph_memory.ts (675 lines), graphs/tools.ts (267 lines), graphs/utils.ts (116 lines), graphs/configs.ts (30 lines) deleted. The external graph store integration is no longer part of the OSS SDK; graph memory now runs natively as built-in entity linking (#4805)camelToSnakeKeys() / snakeToCamelKeys() (#4776)
// Before
client.add(messages, { user_id: "alice", top_k: 5 });
// After
client.add(messages, { userId: "alice", topK: 5 });
MemoryOptions with typed interfaces: AddMemoryOptions, SearchMemoryOptions, GetAllMemoryOptions, DeleteAllMemoryOptions (#4740)org_id, project_id, api_version, output_format, async_mode, enable_graph, limit removed from client method signatures. ClientOptions reduced to { apiKey, host } only (#4740)limit renamed to topK (OSS): Update all search calls (#4740)topK default changed 100 → 20 in Memory.getAll() and Memory.search(). Pass topK: 100 explicitly to restore the old behavior (#4843)userId / agentId / runId are trimmed; empty-string and whitespace-only values now throw (#4843)threshold must be in [0, 1]; topK must be a non-negative integer: invalid inputs throw (#4843)messages in Memory.add() is required: Passing undefined or null now throws (#4843)customPrompt renamed to customInstructions (OSS): Update memory and vector store configurations (#4740)enableGraph removed (OSS): Config option removed: graph memory no longer available in OSS (#4776)New Features:
api.deepseek.com (#4613)MemoryVectorStore now uses a dedicated _entities.db file, preventing entity/memory store collisions (#4829, #4841)Bug Fixes:
PGVector.initialize() now memoises the in-flight init promise (#4841)moduleList response shapes (#4841)ConfigManager.mergeConfig() to only include graphStore when explicitly provided by user, preventing default Neo4j connection attempts (#4776)userConf.url for baseURL: prevents custom LLM providers (Ollama, LMStudio) from silently connecting to OpenAI (#4761)Improvements:
See the TypeScript SDK migration guide for upgrade instructions.
</Update> <Update label="2026-04-06" description="v2.4.6">New Features & Updates:
multilingual parameter to project update types (#4314)Bug Fixes:
.single() with .maybeSingle() in SupabaseDB.get() to handle missing rows (#4599)Bug Fixes:
New Features & Updates:
VectorStoreFactory (#3997)Bug Fixes:
pg import compatible with ESM (#4544)VectorStoreFactory (#4502)toCamelCase in Redis get method for the payload (#3172)Bug Fixes:
createWebhook and updateWebhook API serializationMEMORY_CATEGORIZED event type to WebhookEvent enumWebhookCreatePayload and WebhookUpdatePayload for better type safetyTests:
Bug Fixes:
Improvements:
Bug Fixes:
SQLITE_CANTOPEN errors when running as a LaunchAgent, systemd service, or in containers where process.cwd() is read-only (e.g. /). Default vector_store.db location changed from process.cwd()/vector_store.db to ~/.mem0/vector_store.db.historyDbPath config being silently ignored: config merging always overwrote it with defaults. Top-level historyDbPath is now correctly propagated into historyStore.config with proper precedence.ensureSQLiteDirectory(): parent directories for SQLite database files are now auto-created before opening, preventing SQLITE_CANTOPEN when using nested paths.Improvements:
vector_store.db is found at the old process.cwd() location, guiding users to move it or set vectorStore.config.dbPath explicitly.Breaking Changes:
better-sqlite3 v12)Bug Fixes:
sqlite3 with better-sqlite3 to fix native binding resolution failures under jiti-based loaders (e.g. OpenClaw plugin system). Fixes issues where the bindings module walked V8 stack frames with synthetic filenames, failing to locate the native .node addon.SQLiteManager: init() is now synchronousMemoryVectorStore from sqlite3 to better-sqlite3 with transactional batch insertsImprovements:
SQLiteManager for faster history operationsinsert() in MemoryVectorStore wrapped in a transaction for atomicitytsup.config.ts externals from sqlite3 to better-sqlite3New Features & Updates:
timestamp parameter to update(): accepts Unix epoch or ISO 8601 stringNew Features & Updates:
Improvements:
add and search methods, allowing additional properties beyond defined options for experimental featuresNew Features:
Improvements:
embeddingDims and url parametersBug Fixes:
embeddingDims values in embedders (OpenAI, Ollama, Google, Azure)Improvements:
Improvements:
model in LLM and Embedder to use type any from string to use langchain llm modelsImprovements:
Improvements:
Improvements:
mem0ai to use 2.1.12Improvements:
Bug Fixes:
entity delete: Keep every deleted entity in the result output instead of only the last one (Python #5936, Node #5970)Security:
ps, /proc/<pid>/cmdline, or Activity Monitor. Fixes #4862.Bug Fixes:
__version__ now matches the packaged mem0-cli version.Security:
jws → 4.0.1 (CVE-2025-65945), langsmith → ^0.6.0 (CVE-2026-45134), tar-fs → ^2.1.4 (CVE-2025-48387, CVE-2025-59343), picomatch → ^2.3.2 (CVE-2026-33671), minimatch → ^3.1.3 / ^5.1.8 / ^9.0.7 (CVE-2026-27903, CVE-2026-27904, CVE-2026-26996), path-to-regexp → ^8.4.0 (CVE-2026-4926), rollup → ^4.59.0 (CVE-2026-27606), glob → ^10.5.0 (CVE-2025-64756), @modelcontextprotocol/sdk → ^1.25.4 (CVE-2025-66414, CVE-2026-0621)New Features:
mem0 whoami: Prints the active agent's default_user_id from local config without a network call.mem0 agent-rush <add | search>: Wraps the /v1/agent-rush/ platform endpoints for the AGENTRUSH game. Project routing is resolved server-side, and platform error codes are shown as actionable hints.mem0 agent-rush add asks users to acknowledge that AGENTRUSH memories are public. The acknowledgement is stored in ~/.mem0/config.json under agent_rush.acknowledged_at.agent_rush.acknowledged_at for the local acknowledgement timestamp.Changes:
X-Mem0-Mode: agent-rush so platform telemetry can split game traffic from regular CLI usage.Bug Fixes:
email_already_claimed tip in mem0 init --email previously suggested running mem0 link <key>: a command that doesn't exist. Replaced with honest copy pointing the user to sign in at app.mem0.ai with their existing credentials (#5152)New Features:
mem0 init --agent): Zero-friction signup for AI agents: mints a working Mem0 API key in under 5 seconds with no email, no dashboard, no OTP. Returns an unclaimed shadow account the human can later claim with mem0 init --email <their-email> (memories preserved, same key keeps working) (#5123)--agent-caller <name> (e.g. claude-code, cursor, codex) on mem0 init --agent so signups attribute to the right tool in analytics. Proof Editor-style: the agent declares itself rather than the CLI sniffing it from env vars (#5123)mem0 identify <name>: New subcommand to self-tag an Agent Mode key after the fact when the agent forgot to pass --agent-caller on init. Idempotent: re-running just overwrites (#5123)~/.claude/settings.json::env::MEM0_API_KEY and ~/.zshrc/.bashrc export MEM0_API_KEY= lines stay in sync with ~/.mem0/config.json automatically. Idempotent: only updates EXISTING entries, never creates new ones (#5123)mem0 init --email <email> claims an existing Agent Mode shadow via OTP. Upgrade-in-place: the API key never changes, memories transfer to the human's account (#5123)Bug Fixes:
pingKey now distinguishes network errors from invalid keys: returns false ONLY on HTTP 401/403, returns true on connection failures / timeouts / 5xx. Prevents a VPN flap from silently rotating the user's API key and rewriting plugin-sync targets (#5123)"You do not have permission" 403 from Agent Mode rate limits is now translated to "Daily Agent Mode signup limit reached for this network (5/day). Try again from a different IP or after midnight UTC." (#5123)command field: mem0 init --agent --json error envelopes now populate the command field correctly instead of returning an empty string (#5123){api_key: null}) silently persisting null/undefined into typed string fields (#5123)New Features:
add, search, and list commands from v1/v2 to v3 API endpoints: POST /v3/memories/add/, POST /v3/memories/search/, POST /v3/memories/. Aligns both CLIs with the Python and TypeScript SDKs which already use v3 (#4916)Breaking Changes:
--graph / --no-graph removed: The enable_graph config option, --graph and --no-graph CLI flags, and MEM0_ENABLE_GRAPH environment variable have been removed from both CLIs. Graph memory is now a project-level setting on the Platform (#4916)Bug Fixes:
"anonymous-cli" fallback with a persistent per-machine random hash (cli-anon-<uuid>), so anonymous CLI users are counted individually in PostHog instead of collapsing into one identity (#4789)$identify event on first authenticated run to stitch pre-signup anonymous history onto the authenticated user profile (#4789)Improvements:
source=CLI in request bodies (POST/PUT) and query params (GET/DELETE) for server-side attribution (#4789)New Features:
/v1/ping/ on startup: fail-fast with a helpful error instead of cryptic 401s (#4701)Bug Fixes:
npx npm@latest (#4724)New Features:
Bug Fixes:
repository field to Node packages for npm provenance (#4671)New Features:
event commands: mem0 event list shows recent background processing events in a table; mem0 event status <id> shows full detail including nested memory results (#4649)--json / --agent flag: Root-level flag switches all command output to a structured JSON envelope for programmatic/agent consumption. Envelope format: {"status", "command", "duration_ms", "scope", "count", "data"} (#4649)add → {id, memory, event}, search → {id, memory, score, created_at, categories}) (#4649)mem0 init (#4623)Bug Fixes:
MODULE_NOT_FOUND crash on status, import, and all commands when installed globally: replaced runtime createRequire with build-time version injection (#4636)status command: Replaced heavyweight /v1/entities/ check with dedicated GET /v1/ping/ endpoint (#4649)add command: Deduplicated PENDING results from API; changed misleading count message (#4649)init command: Partial flags now work in non-TTY; warns before overwriting existing config; added --force flag (#4649)delete command: Fixed entity delete via v2 API for all entity types (#4649)Improvements:
mem0 get <id> fail) (#4636)config get api_key short-form aliases added (#4636)--expires, --page-size, --page, --top-k, --threshold, and empty content (#4636)printInfo / printScope moved to stderr to avoid contaminating JSON piping (#4636)Initial Release: Official Mem0 CLI
A full-featured command-line interface for Mem0, available in both Python and Node.js:
pip install mem0-cli (Python) or npm install -g @mem0/cli (Node.js)add, search, list, get, update, delete, import, config, init, status, entitymem0 init with API key entry and user ID configuration-o json flag for CI/CD pipelines and automationcli-spec.json ensuring identical behavior (#4575)New Features:
UserPromptSubmit hook now searches Mem0 with the current prompt and injects the top matches, so relevant memories are guaranteed in context instead of relying on the agent to search for them. Opt out with MEM0_PREFETCH=false.Improvements:
Fixes:
files_touched now stores a real list instead of a double-encoded JSON string, so returned memories render readable file paths across Claude Code, Cursor, Codex, and Antigravity.Improvements:
MEM0_RERANK=0, false, no, or off.Fixes:
plugin bucket, and Cursor wrappers now pin their platform before delegating to shared hook scripts.New Features:
MEM0_PLATFORM override: Explicit platform markers now win over env-var auto-detection for reliable telemetry labels.New Features:
Changes:
file_context.py, capture_session_summary.py, and session_timeline.py helpers for the hook pipeline.New Features:
global_search lets reads search all users and projects in the platform project while writes stay scoped to the current user_id and app_id./mem0:switch-project --global and /mem0:switch-project --no-global persist global-search behavior in ~/.mem0/settings.json.scope=global when global search is active, and startup memory counts use the same global filter.~/.mem0/categories_setup.json caches setup per Mem0 account and taxonomy fingerprint, so categories are applied once and re-applied only when the taxonomy changes.Changes:
auto_setup_categories.py in the background alongside project-file auto-import.Fixes:
authorizationUrl from .mcp.json so Claude Code uses the MEM0_API_KEY header instead of falling into a broken OAuth reconnect flow./mem0:onboard no longer tells users to complete browser OAuth.claude plugin configure mem0 references and clarified that Claude Code stores the plugin API key through the enable UI prompt.Fixes:
run_id: "*" filter from read paths so memories written without run_id are visible again.add_memory moved session tracking from top-level run_id to metadata.session_id, keeping new memories in the default query partition.enforce_metadata_defaults.sh, because plugin MCP tools do not trigger PostToolUse hooks._identity.sh and _identity.py can read MEM0_API_KEY from common shell profiles when Claude Code Desktop does not inherit shell env vars.Removed:
Changes:
user_id + app_id filters only.Fixes:
tool_response, Stop hook output is schema-compliant, and SessionStart uses visible raw stdout.MultiEdit, and metadata enforcement covers add, search, get, update, and delete-all variants.add_memory, search_memories, get_memories, and delete_all_memories receive safe default user_id and app_id values when the agent omits them.top_k shapes.capture_compact_summary.py is spawned correctly after compaction and guarded against unset identity variables.New Features:
stop_hook_check.py to detect meaningful work before prompting memory capture./mem0:dream and /mem0:onboard.Changes:
enforce_metadata_defaults.sh was rewritten around handler-based dispatch and never overrides explicitly provided identity.Fixes:
mcp__mem0__ and mcp__plugin_mem0_mem0__ names so session stats record memory operations again.metadata.files plus score threshold before falling back to basename search./mem0:pin no longer uses removed immutable=True; it relies on pinned metadata/text conventions./mem0:list-projects merges null-scoped and app-scoped memories so legacy records are counted./mem0:peek routes memory-id references to get_memory instead of semantic search.New Features:
_search.py gained min_score, metadata filters, rerank, and threshold support./mem0:tour and /mem0:peek use reranking for better precision.Removed:
PostToolUseFailure hook and the superseded /mem0:protocol skill.New Features:
PreToolUse(Read) file recall with skip rules for non-code files, lockfiles, and node_modules._search.py for v3 search calls and consistent context formatting.~/.mem0/settings.json with search, retention, confidence, debug, and capture settings./mem0:forget, /mem0:peek, /mem0:memory-reviewer, and /mem0:context-loader.[type] content [mem0:id] memory display.api_key plugin config support.Changes:
/mem0:remember.CLAUDE_PLUGIN_OPTION_API_KEY, and hook timeouts increased for prompt and bash-output searches.Removed:
/mem0:dream --forget, /mem0:dream --schedule, /mem0:health --fix, and CLI config fallback.Fixes:
ensure_deps.sh.distinct_id from MD5 to SHA-256, protected system props, and loaded plugin version from the manifest.New Features:
enforce_metadata_defaults.sh for default confidence, source, and type on add_memory.Removed:
on_pre_commit.py and merged digest, forget, import-tools, and peek flows into existing skills.New Features:
MEM0_TELEMETRY=false opt-out.ensure_deps.sh.mem0.md config loading, inactive API-key banner, import/export parsers, and competing-tool import.Changes:
metadata.project_id to top-level app_id, and write paths moved to /v3/memories/add/.Fixes:
New Features:
CLAUDE.md, AGENTS.md, .cursorrules, .windsurfrules, and mem0.md as project-profile memories.Fixes:
user_id resolution no longer derives from MEM0_API_KEY, restoring MEM0_USER_ID to $USER to default order so older memories remain reachable.Upgrade Notes:
~/.mem0/identity.json cache is no longer used.MEM0_USER_ID to the old hash.New Features:
compact_summary memories.MEM0_DEBUG=1.mem0-mcp.Fixes:
docs/memory/*.md, duplicate compact writes were removed, and hook captures now expire after 90 days.Fixes:
Mem0 Plugin for Claude Code, Cursor, and Codex
Initial release of the Mem0 plugin for Claude Code and Cursor, followed by Codex support:
add_memory, search_memories, get_memories, get_memory, update_memory, delete_memory, delete_all_memories, delete_entities, list_entities: all via mcp.mem0.ai.mem0-plugin/skills/mem0-codex for Codex workflows.Improvements:
get_memories, get_memory, update_memory, delete_memory, delete_all_memories, delete_entities, list_entities, get_event_status) now states what it does and when to use it. search_memories nudges proactive, multi-hop retrieval and the destructive tools carry explicit irreversible-action warnings.Breaking Changes:
@opencode-ai/plugin and backed by the mem0ai SDK directly. The plugin no longer registers or depends on mcp.mem0.ai.config hook adds opencode-skills/ to skills.paths; skills are no longer copied into user config directories.context-loader, dream, forget, status, search, scope, pin, remember, and tour.New Features:
project, session, and global scope, with /mem0-scope for changing the default.plugin.* schema, including prompt, bash-error, pre-compact, session-stop, dream-triggered, and dream-completed events.Fixes:
/mem0-status shows which dream gate is blocking consolidation.scope="global", regardless of the default scope.New Features:
session_summary memories with infer=True.plugin.* schema and never sends memory content, prompts, or API keys.New Features:
global_search support across initial load, per-message recall, resume detection, error lookup, and compaction context.MEM0_GLOBAL_SEARCH to child shells via the shell.env hook.Changes:
global_search setting instead of always using project-scoped filters.Changes:
@mem0/opencode-plugin (#5272).opencode.json (#5271).tsconfig, added publishConfig and the bun lockfile (#5273).Initial Release:
@mem0/opencode-plugin with TypeScript hooks for chat messages, tool execution, system-message transforms, session compaction, and shell env injection.MEMORY.md writes and redacts secrets before memory storage.New Features:
MEM0_PREFETCH=false.Improvements:
Fixes:
files_touched as a real list instead of a double-encoded JSON string, so returned memories show clean file paths.Improvements:
MEM0_RERANK=0, false, no, or off.Fixes:
antigravity instead of being counted as Claude Code.plugin.json, so events report the Antigravity plugin version instead of the Claude plugin version.New Features:
MEM0_PLATFORM when an editor needs to pin its telemetry platform explicitly.Initial Release:
plugin.json, mcp_config.json, hooks.json, lifecycle hooks, shared scripts, and shared Mem0 skills.contextFileName: "AGENTS.md" convention.degit installs into ~/.gemini/config/plugins/mem0 and local Antigravity plugin installs.Improvements:
memory_search, memory_get, memory_list, memory_add, memory_update, memory_delete) now states what it does and when to use it. memory_search nudges proactive, multi-hop retrieval; memory_add nudges proactive saves; and the delete tools carry explicit irreversible-action warnings.Fixes:
customCategories is converted into the list shape expected by the Mem0 SDK before add calls (#5345).register() exits early in cli-metadata mode, avoiding backend initialization and hook installation during OpenClaw metadata scans (#5383).Security:
mem0ai to 3.0.7 and added a uuid override to resolve known dependency advisories (#5460, #5489).Improvements:
integrations/openclaw/; npm provenance now points to the correct subdirectory (#5491).Docs:
mem0 init --agent --json for autonomous setup without email, OTP, or browser.Security:
langsmith, picomatch, vite, and @qdrant/js-client-rest.Dependencies:
mem0ai to 3.0.3 and refreshed Vitest coverage tooling.New Features:
runtime.getMemorySearchManager() and resolveMemoryBackendConfig().Improvements:
memory_update over delete+add for atomic edits.0.1 for broader recall.plugins state.Security:
Fixes:
searchThreshold is standardized across docs, README, and manifest.PLUGIN_VERSION is injected at build time from package.json.Manifest Compliance:
providerEndpoints.Security & Compliance:
vi.stubEnv / vi.unstubAllEnvs instead of direct environment access in places flagged by plugin scanning.Tests:
New Features:
--json added to all 16 CLI commands.--mode open-source with --oss-llm, --oss-embedder, and --oss-vector.jsonOut, jsonErr, and redactSecrets helpers.New Features:
Improvements:
mem0ai dependency to 3.0.1 for Mem0 v3 API support.orgId, projectId, and enableGraph setup paths from docs and CLI prompts.Fixes:
anonymous-openclaw fallback.$identify so anonymous history can attach to the authenticated profile./v1/ping/.Improvements:
source: "OPENCLAW" across add, search, list, recall, CLI, and OSS backend paths.Fixes:
openclaw mem0 init number choices now select the intended option.client.connect() failures.Removed:
orgId, projectId, and enableGraph from config, CLI, providers, backend, and tools because API keys are project-scoped and graph memory moved to platform-level configuration.OpenClaw Plugin: Production-Ready
openclaw mem0 init supports email verification and direct API key setup.memory_add and memory_delete replace legacy memory tools and match Mem0 naming.init, status, config, import, event list, and event status.Fixes:
safePath() containment checks for skill and domain-overlay reads.Post-Compaction pattern after an incorrect rename.Security:
mem0ai to exact 2.3.0.Fixes:
New Features:
package.json.Fixes:
New Features:
recall.ts with improved retrieval and injection logic.openclaw.plugin.json and setup helper scripts.New Features:
Fixes:
New Features:
oss.disableHistory.Fixes:
ctx.sessionKey directly, removing a concurrent-session race.New Features:
Changes:
Fixes:
mem0ai for the SQLite to better-sqlite3 migration.New Features:
agentId.userId.Fixes:
New Features:
Fixes:
Initial Release:
topK, threshold, and apiVersion options.New Features:
<mem0-relevant-memories> block before the agent runs, so context no longer depends on the agent remembering to search. Context injection is on by default; set contextInjection: false to disable.Improvements:
mem0_memory tool description now push proactive, multi-hop search -- several queries with different phrasings instead of stopping after one.mem0_memory action and parameter descriptions (action, query, content, memory_id, scope) now explain each action and scope.Fixes:
/mem0-remember, /mem0-forget, /mem0-pin, and /mem0-scope now render persistent message blocks instead of easy-to-miss status notifications.threshold, top_k, and rerank to avoid weak unrelated matches.Improvements:
/mem0-dream keeps the consolidation protocol hidden behind a concise status line.searchThreshold defaults to 0.3 in mem0-config.json and is shown in /mem0-status.Chores:
pi-agent-plugin-checks.yml and pi-agent-plugin-cd.yml release pipeline.Initial Release:
mem0_memory tool, 8 slash commands, and auto-capture hooks./mem0-remember, /mem0-forget, /mem0-search, /mem0-tour, /mem0-dream, /mem0-pin, /mem0-scope, and /mem0-status.agent_end.MEMORY_POLICY before every agent turn.git rev-parse --show-toplevel for stable app_id values across monorepos.context-loader, remember, search, forget, dream, tour, pin, and status skills.AbortSignal, and shutdown releases dream locks.Major Release: Migrated to Vercel AI SDK v6 (LanguageModelV3 / ProviderV3) and Mem0 v3 API.
Breaking Changes:
LanguageModelV2) to v6 (LanguageModelV3). Users must upgrade ai to ^6.0.199 and all @ai-sdk/* provider packages to ^3.x (#4741)/v1/memories/ and /v2/memories/search/ to /v3/memories/add/ and /v3/memories/search/. Entity IDs (user_id, agent_id, run_id) now go inside the filters object for search requests (#4741)enable_graph, graph prompts, and relation-extraction code removed. Graph memory is now a project-level setting on the Platform (#4741)org_id, project_id, org_name, project_name, output_format, filter_memories, async_mode, enable_graph, version, api_version removed from Mem0ConfigSettings (#4741)New Features:
specificationVersion: 'v3', supportedUrls property, V3 content array in doGenerate, V3 stream lifecycle events in doStream (#4741)source in generateText/streamText responses with providerMetadata.mem0.memories for programmatic access (#4741)searchMemories() is exported alongside addMemories(), retrieveMemories(), and getMemories() for callers that need raw semantic search results.mem0ApiKey and host can be passed per request, letting apps override the environment API key and point at a custom Mem0 API base URL.Bug Fixes:
addMemories is now properly awaited: memories no longer silently fail to store (#4741)doGenerate guards against null content from upstream providers (#4741)doStream now returns the full LanguageModelV3StreamResult object preserving all V3 fields (#4741)getMemories and retrieveMemories now handle both array and {results: [...]} envelope responses from the v3 API (#4741)Security:
glob → ^10.5.0 (CVE-2025-64756), minimatch → ^3.1.3 / ^5.1.8 / ^9.0.7 (CVE-2026-27903, CVE-2026-27904, CVE-2026-26996), picomatch → ^2.3.2 (CVE-2026-33671), rollup → ^4.59.0 (CVE-2026-27606)Bug Fix:
Improvements: