--- title: "SDK & Tools" description: "Release notes for the Mem0 Python SDK, TypeScript SDK, Vercel AI SDK, CLI, and editor plugins." mode: "wide" --- **New Features:** - **Client:** Expose `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](https://github.com/mem0ai/mem0/pull/5874)) **Bug Fixes:** - **Memory (OSS):** Apply `remove_code_blocks()` to the LangChain path in async `_create_procedural_memory` so code fences are stripped consistently ([#5711](https://github.com/mem0ai/mem0/pull/5711)) - **Rerankers:** Score HuggingFace cross-encoder results with per-document sigmoid instead of set-relative min-max, preventing a single low-score document from collapsing all relevance scores to zero ([#5715](https://github.com/mem0ai/mem0/pull/5715)) - **Core:** Validate and trim entity IDs (`user_id`, `agent_id`, `run_id`) in `delete_all()` for both sync and async `Memory` ([#5735](https://github.com/mem0ai/mem0/pull/5735)) - **Vector Stores:** Use `.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](https://github.com/mem0ai/mem0/pull/5709)) - **Memory:** Fix scale-threshold notices not firing for Redis and search-engine backends by resolving `col_info()` signature differences and adding `num_docs` to the count-extraction lookup ([#5687](https://github.com/mem0ai/mem0/pull/5687)) - **Vector Stores:** Escape special characters in Valkey FT.SEARCH tag filter values to prevent wildcard and operator injection through tenant-isolation filters ([#5750](https://github.com/mem0ai/mem0/pull/5750)) **Bug Fixes:** - **Memory (OSS):** Improve entity extraction precision by avoiding sentence-start common noun noise, preserving useful topic phrases, and exact-deduplicating entity links before semantic matching ([#5829](https://github.com/mem0ai/mem0/pull/5829)) **New Features:** - **Embeddings:** Add native `embed_batch` to five embedders: LM Studio, Together, HuggingFace, Vertex AI, and Google GenAI: for batched embedding requests ([#5609](https://github.com/mem0ai/mem0/pull/5609)) **Bug Fixes:** - **Core:** Guard against malformed `image_url` entries in `parse_vision_messages` to prevent crashes ([#5631](https://github.com/mem0ai/mem0/pull/5631)) - **Core:** Return `attributed_to` from `get()`, `get_all()`, and `search()` ([#5629](https://github.com/mem0ai/mem0/pull/5629)) - **Core:** Fix `reset()` only dropping the history table and leaving stale messages behind ([#5541](https://github.com/mem0ai/mem0/pull/5541)) - **Core:** Guard against an entity `embed_batch` count mismatch in the v3 add pipeline ([#5604](https://github.com/mem0ai/mem0/pull/5604)) - **Core:** Fix an async `delete_all` race condition that corrupted the entity store's `linked_memory_ids` ([#5553](https://github.com/mem0ai/mem0/pull/5553)) - **LLMs:** Skip the JSON `response_format` for Groq compound models that reject it ([#5513](https://github.com/mem0ai/mem0/pull/5513)) - **LLMs:** Preserve reasoning fields during base-to-provider config conversion ([#5638](https://github.com/mem0ai/mem0/pull/5638)) - **LLMs:** Pass the configured `anthropic_base_url` to the Anthropic client ([#5626](https://github.com/mem0ai/mem0/pull/5626)) - **LLMs:** Stop the Azure provider from mutating and corrupting caller messages during content rewrite ([#5731](https://github.com/mem0ai/mem0/pull/5731)) - **LLMs & Embeddings:** Repair HTTP proxy support for `httpx>=0.28` and preserve `proxies` in `LlmFactory` ([#5447](https://github.com/mem0ai/mem0/pull/5447)) - **Embeddings:** Forward `embedding_dims` to Titan V2 in the AWS Bedrock embedder ([#5671](https://github.com/mem0ai/mem0/pull/5671)) - **Rerankers:** Log reranking failures instead of swallowing them silently ([#5717](https://github.com/mem0ai/mem0/pull/5717)) - **Rerankers:** Clamp out-of-range LLM scores instead of mis-parsing them ([#5635](https://github.com/mem0ai/mem0/pull/5635)) - **Rerankers:** Export all five rerankers from the package root ([#5636](https://github.com/mem0ai/mem0/pull/5636)) - **Vector Stores:** Point the FastEmbed-missing warning at `mem0ai[extras]` ([#5622](https://github.com/mem0ai/mem0/pull/5622)) - **Vector Stores:** Preserve empty Azure AI Search update values ([#5524](https://github.com/mem0ai/mem0/pull/5524)) - **Vector Stores:** Add an `auto_refresh` option for OpenSearch Serverless compatibility ([#3893](https://github.com/mem0ai/mem0/pull/3893)) - **Vector Stores:** Wrap a scalar `vector_id` in a list for Chroma `delete()` ([#5703](https://github.com/mem0ai/mem0/pull/5703)) - **Vector Stores:** Wrap Chroma `update()` ids, embeddings, and metadatas in lists ([#5757](https://github.com/mem0ai/mem0/pull/5757)) - **Vector Stores:** Wrap a scalar `vector_id` in a list for Milvus `delete()` ([#5704](https://github.com/mem0ai/mem0/pull/5704)) - **Vector Stores:** Map all comparison operators in the Pinecone `_create_filter()` ([#5707](https://github.com/mem0ai/mem0/pull/5707)) - **Vector Stores:** Return `None` instead of `{}` from Chroma `_generate_where_clause` for empty filters ([#5713](https://github.com/mem0ai/mem0/pull/5713)) - **Vector Stores:** Return `[[]]` from the OpenSearch `list()` error path to honor the `list()` contract ([#5727](https://github.com/mem0ai/mem0/pull/5727)) - **Vector Stores:** Return `[[]]` from the Pinecone `list()` error path instead of a dict ([#5706](https://github.com/mem0ai/mem0/pull/5706)) - **Vector Stores:** Return `[[]]` for an uninitialized FAISS index to honor the `list()` contract ([#5725](https://github.com/mem0ai/mem0/pull/5725)) - **Vector Stores:** Wrap the MongoDB `list()` return in an outer list to match the interface contract ([#5729](https://github.com/mem0ai/mem0/pull/5729)) - **Vector Stores:** Deep-copy Redis `DEFAULT_FIELDS` so instances keep distinct dims ([#5633](https://github.com/mem0ai/mem0/pull/5633)) - **Vector Stores:** Pass the required `vectors` arg in Vertex AI `list()` and similarity search ([#5627](https://github.com/mem0ai/mem0/pull/5627)) - **Vector Stores:** Return `None` from Redis `get()` for missing IDs ([#5625](https://github.com/mem0ai/mem0/pull/5625)) - **Vector Stores:** Drop a stray `print` in Weaviate `list_cols` ([#5637](https://github.com/mem0ai/mem0/pull/5637)) - **Graph:** Keep distinct entities that share a substring prefix ([#5630](https://github.com/mem0ai/mem0/pull/5630)) - **Client:** Check the HTTP status before parsing the ping response in `_validate_api_key` ([#5639](https://github.com/mem0ai/mem0/pull/5639)) - **Server:** Fetch filtered dashboard memories beyond the default page ([#5753](https://github.com/mem0ai/mem0/pull/5753)) - **Server:** Return 404/400 instead of 502 for not-found and invalid input ([#5634](https://github.com/mem0ai/mem0/pull/5634)) - **Server:** Return 404 instead of 500 for a malformed API key id on revoke ([#5640](https://github.com/mem0ai/mem0/pull/5640)) - **Server:** Use `127.0.0.1` in the dashboard healthcheck to avoid IPv6 localhost resolution ([#5612](https://github.com/mem0ai/mem0/pull/5612)) **Improvements:** - **Vector Stores:** Batch BM25 sparse encoding in Qdrant insert ([#5592](https://github.com/mem0ai/mem0/pull/5592)) **Security:** - **Vector Stores:** Sanitize Milvus and Baidu filter values to prevent expression injection ([#5746](https://github.com/mem0ai/mem0/pull/5746)) - **Vector Stores:** Reject dict filter values in MongoDB to prevent NoSQL operator injection ([#5748](https://github.com/mem0ai/mem0/pull/5748)) **New Features:** - **LLMs:** Add Gemini via Vertex AI as LLM provider ([#4030](https://github.com/mem0ai/mem0/pull/4030)) - **Embeddings:** Add native `embed_batch` to `OllamaEmbedding` for batched embedding requests ([#5415](https://github.com/mem0ai/mem0/pull/5415)) **Bug Fixes:** - **Core:** Fix `api_error_handler` silently dropping return values from async methods ([#5540](https://github.com/mem0ai/mem0/pull/5540)) - **Core:** Fix `AsyncMemory.reset()` not resetting the entity store ([#5535](https://github.com/mem0ai/mem0/pull/5535)) - **Core:** Fix `async delete_all` aborting on first error, leaving partial deletion ([#5529](https://github.com/mem0ai/mem0/pull/5529)) - **Core:** Skip messages without a `content` key in message parsers to prevent `KeyError` crashes ([#5575](https://github.com/mem0ai/mem0/pull/5575)) - **Core:** Preserve custom metadata fields during memory update ([#5480](https://github.com/mem0ai/mem0/pull/5480)) - **LLMs:** Fix Anthropic `tool_choice` format and tool response parsing ([#5537](https://github.com/mem0ai/mem0/pull/5537)) - **LLMs:** Fix Ollama `json` format mutating the caller's messages list in-place ([#5539](https://github.com/mem0ai/mem0/pull/5539)) - **LLMs:** Omit `None` config values from Gemini `GenerateContentConfig` to prevent validation errors ([#5528](https://github.com/mem0ai/mem0/pull/5528)) - **LLMs:** Honor reasoning-model params in `AzureOpenAIStructuredLLM` ([#5548](https://github.com/mem0ai/mem0/pull/5548)) - **LLMs:** Honor reasoning-model params in `OpenAIStructuredLLM` ([#5458](https://github.com/mem0ai/mem0/pull/5458)) - **LLMs:** Send `max_completion_tokens` for the GPT-5 family across all providers ([#5547](https://github.com/mem0ai/mem0/pull/5547)) - **LLMs:** Accept and forward `**kwargs` in Together, LangChain, and Sarvam providers ([#5556](https://github.com/mem0ai/mem0/pull/5556)) - **LLMs:** Fix Bedrock AI21 response parse default using `dict` literal instead of `set` ([#5527](https://github.com/mem0ai/mem0/pull/5527)) - **LLMs:** Fix LiteLLM function-calling check blocking all calls on non-tool models ([#5536](https://github.com/mem0ai/mem0/pull/5536)) - **LLMs:** Fix HuggingFace provider using `self.config` instead of raw `config` parameter ([#5538](https://github.com/mem0ai/mem0/pull/5538)) - **Embeddings:** Honor `aws_session_token` in AWS Bedrock embeddings ([#5566](https://github.com/mem0ai/mem0/pull/5566)) - **Rerankers:** Respect `config.top_k` in Cohere and ZeroEntropy fallback paths ([#5560](https://github.com/mem0ai/mem0/pull/5560)) - **Vector Stores:** Fix FAISS filtered search dropping over-fetched candidates before filtering ([#5453](https://github.com/mem0ai/mem0/pull/5453)) - **Vector Stores:** Fix Weaviate `reset()` crashing with missing `vector_size` argument ([#5531](https://github.com/mem0ai/mem0/pull/5531)) - **Vector Stores:** Pass embedding dims in Weaviate `reset()` to avoid re-init crash ([#5570](https://github.com/mem0ai/mem0/pull/5570)) - **Vector Stores:** Fix MongoDB `reset()` passing wrong argument to `create_col()` ([#5532](https://github.com/mem0ai/mem0/pull/5532)) - **Vector Stores:** Fix Pinecone hybrid search crashing when `filters` is `None` ([#5533](https://github.com/mem0ai/mem0/pull/5533)) - **Vector Stores:** Fix Redis crashing on empty or `None` filters in `search()` and `list()` ([#5446](https://github.com/mem0ai/mem0/pull/5446)) - **Vector Stores:** Return `None` from `get()` for missing IDs in Milvus, Weaviate, and Supabase ([#5562](https://github.com/mem0ai/mem0/pull/5562)) - **Vector Stores:** Return `None` from ChromaDB `get()` for missing IDs ([#5561](https://github.com/mem0ai/mem0/pull/5561)) **New Features:** - **Memory:** Add a contextual OSS-to-Platform notices system that surfaces occasional, situation-aware messages (first run, scale/performance thresholds, slow queries, and when temporal/decay features are relevant) pointing to the corresponding Mem0 Platform capabilities; disable via `MEM0_TELEMETRY=false` ([#5494](https://github.com/mem0ai/mem0/pull/5494)) **Bug Fixes:** - **Memory:** Prevent a crash in `parse_vision_messages` when vision support is disabled ([#5487](https://github.com/mem0ai/mem0/pull/5487)) - **Vector Stores:** Expose the `https` option on the Qdrant vector store configuration so TLS endpoints can be targeted explicitly ([#5380](https://github.com/mem0ai/mem0/pull/5380)) - **Vector Stores:** Use valid S3 Vectors entity index names, fixing index operations that failed on invalid names ([#5416](https://github.com/mem0ai/mem0/pull/5416)) - **Vector Stores:** Fix `search()` crashing with a `TypeError` in the LangChain vector store when a result score is `None` ([#5072](https://github.com/mem0ai/mem0/pull/5072)) - **Vector Stores:** Use `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](https://github.com/mem0ai/mem0/pull/5488)) - **Vector Stores:** Index the Valkey `memory` field as `TEXT` rather than `TAG` so full-text search behaves correctly ([#5443](https://github.com/mem0ai/mem0/pull/5443)) - **Vector Stores:** Implement `$not` filter support in the ChromaDB vector store ([#5485](https://github.com/mem0ai/mem0/pull/5485)) **New Features:** - **Memory:** Warn at init time when hybrid/BM25 search silently degrades to semantic-only because the configured vector store does not implement `keyword_search`. Affected stores: Chroma, FAISS, Cassandra, LangChain, Neptune Analytics, S3 Vectors, Supabase, TurboPuffer, Valkey ([#5444](https://github.com/mem0ai/mem0/pull/5444)) - **Memory:** Add opt-in `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](https://github.com/mem0ai/mem0/pull/5102)) **Bug Fixes:** - **Vector Stores:** Normalize similarity scores to `[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](https://github.com/mem0ai/mem0/pull/5391)) - **Memory:** Parallelize entity boost searches in `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](https://github.com/mem0ai/mem0/pull/5377)) - **Memory:** Reject empty or whitespace-only queries in `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](https://github.com/mem0ai/mem0/pull/5258)) - **LLMs:** Add `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](https://github.com/mem0ai/mem0/pull/5327)) - **LLMs:** Fix xAI LLM provider: add `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](https://github.com/mem0ai/mem0/pull/5190)) - **Vector Stores:** Fix PGVector `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](https://github.com/mem0ai/mem0/pull/5155)) - **Vector Stores:** Fix PGVector `sslmode` handling for PostgreSQL URIs: the `sslmode` query parameter is now correctly extracted and forwarded when building the async connection pool ([#5308](https://github.com/mem0ai/mem0/pull/5308)) - **Vector Stores:** Fix S3 Vectors `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](https://github.com/mem0ai/mem0/pull/5018)) - **Vector Stores:** Fix Upstash Vector `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](https://github.com/mem0ai/mem0/pull/5202)) - **Core:** Replace mutable default arguments with `None` sentinels in embedder configs and the proxy module, preventing cross-request state contamination ([#5302](https://github.com/mem0ai/mem0/pull/5302)) **New Features:** - **Client:** `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](https://github.com/mem0ai/mem0/pull/5270)) **Bug Fixes:** - **Vector Stores:** PGVector adapter now supports rich filter operators (`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](https://github.com/mem0ai/mem0/pull/5263)) - **Server:** Fixed `/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](https://github.com/mem0ai/mem0/pull/5263)) **Bug Fixes:** - **Telemetry:** Stitch OSS and platform PostHog identities on `MemoryClient` init so `$identify` events fire and a single user is no longer tracked as two or three disconnected personas ([#5040](https://github.com/mem0ai/mem0/pull/5040)) - **Security:** Harden against SQL injection and prompt injection ([#4997](https://github.com/mem0ai/mem0/pull/4997)) **New Features:** - **SDK:** Expose `decay` on `project.update` ([#5062](https://github.com/mem0ai/mem0/pull/5062)) **Improvements:** - **Plugin:** Hand `mem0` search decisions to the agent ([#4992](https://github.com/mem0ai/mem0/pull/4992)) **Bug Fixes:** - **Client:** Map `user_id`, `agent_id`, `run_id` entity params to filters in `GET /memories` ([#4960](https://github.com/mem0ai/mem0/pull/4960)) - **Memory:** Honor `prompt` param in vector store extraction pipeline ([#4914](https://github.com/mem0ai/mem0/pull/4914)) - **Memory:** Add missing `text_lemmatized` field in `AsyncMemory._create_memory` ([#4886](https://github.com/mem0ai/mem0/pull/4886)) - **Memory:** Merge same-key operator dicts in AND metadata filters ([#4853](https://github.com/mem0ai/mem0/pull/4853)) - **LLMs:** Narrow `_is_reasoning_model` check to not match `gpt-5.x` variants ([#4746](https://github.com/mem0ai/mem0/pull/4746)) - **Vector Stores:** Add `ca_certs` config option for Elasticsearch vector store ([#3993](https://github.com/mem0ai/mem0/pull/3993)) - **Vector Stores:** Add `agent_id` and `run_id` to Elasticsearch/OpenSearch default mappings ([#4906](https://github.com/mem0ai/mem0/pull/4906)) - **Embeddings:** Set FastEmbed `embedding_dims` from model metadata at init ([#4711](https://github.com/mem0ai/mem0/pull/4711)) **Security:** - Bump vulnerable dependencies to patched versions ([#4835](https://github.com/mem0ai/mem0/pull/4835)) **Major Release**: Python SDK with V3 memory pipeline, ADD-only extraction, and cleaned-up API surface. **New Features:** - **Single-Pass Extraction:** Replaced 2-LLM-call pipeline with additive extraction using `ADDITIVE_EXTRACTION_PROMPT`. Memories accumulate via `linked_memory_ids`: no more UPDATE/DELETE events ([#4805](https://github.com/mem0ai/mem0/pull/4805)) - **Hybrid Search:** Combined semantic + BM25 keyword matching + entity boost with additive scoring. Native `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](https://github.com/mem0ai/mem0/pull/4805)) - **Entity Extraction & Linking:** spaCy-based entity extraction with second vector collection (`{collection}_entities`) for cross-memory relationship retrieval. Optional dependency: `pip install mem0ai[nlp]` ([#4805](https://github.com/mem0ai/mem0/pull/4805)) - **Batch Operations:** Batch embedding, batch persist, and batch entity linking (8-phase pipeline) for both sync `Memory` and async `AsyncMemory` at full parity ([#4805](https://github.com/mem0ai/mem0/pull/4805)) - **Message Persistence:** SQLite-based rolling window (10 messages per session scope) for LLM context ([#4805](https://github.com/mem0ai/mem0/pull/4805)) - **Valkey Cluster Mode:** Added `cluster_mode` parameter for Valkey Cluster Mode Enabled (CME) deployments ([#4759](https://github.com/mem0ai/mem0/pull/4759)) - **V3 API Endpoints:** `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](https://github.com/mem0ai/mem0/pull/4856)) - **Default model:** `gpt-5-mini` is now the default across `OpenAILLM`, `OpenAIStructuredLLM`, `AzureOpenAILLM`, `AzureOpenAIStructuredLLM`, and `LiteLLM` fallback ([#4829](https://github.com/mem0ai/mem0/pull/4829)) **Breaking Changes:** - **`add()` returns ADD-only events**: No more `"UPDATE"` or `"DELETE"` events. Memories accumulate; nothing is overwritten ([#4805](https://github.com/mem0ai/mem0/pull/4805)) - **`search()` default `threshold` is now `0.1`**: Pass `threshold=0.0` for previous behavior ([#4805](https://github.com/mem0ai/mem0/pull/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](https://github.com/mem0ai/mem0/pull/4805), [#4836](https://github.com/mem0ai/mem0/pull/4836)) - **`search()` default `rerank` is now `False`**: Pass `rerank=True` for previous behavior ([#4805](https://github.com/mem0ai/mem0/pull/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](https://github.com/mem0ai/mem0/pull/4843)) - **Entity ID validation:** `user_id` / `agent_id` / `run_id` are trimmed; empty-string and whitespace-only values now raise `ValueError` ([#4843](https://github.com/mem0ai/mem0/pull/4843)) - **Search params validation:** `threshold` must be a number in `[0, 1]`; `top_k` must be a non-negative integer: invalid inputs raise `ValueError` ([#4843](https://github.com/mem0ai/mem0/pull/4843)) - **`messages` in `Memory.add()` rejects invalid types:** Passing `None` or non-`(str | dict | list)` values raises `Mem0ValidationError` (`error_code="VALIDATION_003"`) ([#4843](https://github.com/mem0ai/mem0/pull/4843)) - **`qdrant-client>=1.12.0` required**: Upgrade from `>=1.9.1` ([#4805](https://github.com/mem0ai/mem0/pull/4805)) - **`org_id` and `project_id` removed**: Removed from `MemoryClient` constructor and all method signatures ([#4740](https://github.com/mem0ai/mem0/pull/4740)) - **External Graph Store Removed (OSS):** `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](https://github.com/mem0ai/mem0/pull/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](https://github.com/mem0ai/mem0/pull/4776)) - **`custom_fact_extraction_prompt` renamed to `custom_instructions`**: Update config and memory module references ([#4740](https://github.com/mem0ai/mem0/pull/4740)) - **Typed option classes**: Added Pydantic v2 typed classes: `AddMemoryOptions`, `SearchMemoryOptions`, `GetAllMemoryOptions`, `DeleteAllMemoryOptions`, `UpdateMemoryOptions`, `ProjectUpdateOptions` ([#4740](https://github.com/mem0ai/mem0/pull/4740)) **Security:** - **FAISS:** Prevent arbitrary code execution via pickle deserialization in `FAISS` vector store ([#4833](https://github.com/mem0ai/mem0/pull/4833)) **Bug Fixes:** - **V3 migration crashes:** Fixed crashes in the v3 migration path; entity linking on OSS is now functional across Qdrant and Milvus backends ([#4836](https://github.com/mem0ai/mem0/pull/4836)) - **Qdrant entity store:** Entity store now shares the existing Qdrant client when using embedded mode (`path=...`), eliminating RocksDB lock contention between the main and entity collections ([#4836](https://github.com/mem0ai/mem0/pull/4836)) - **Reranker:** Fixed incorrect use of SentenceTransformer for cross-encoder reranker models: switched to CrossEncoder API for proper scoring ([#4806](https://github.com/mem0ai/mem0/pull/4806)) - **S3 Vectors:** Handle `vector=None` in `update()` to prevent boto3 validation error when `event=NONE` ([#4594](https://github.com/mem0ai/mem0/pull/4594)) - **LLMs:** Made OpenAI `store` parameter opt-in to prevent leaking to non-OpenAI backends like Google Gemini ([#4757](https://github.com/mem0ai/mem0/pull/4757)) - **LLMs:** Forward `response_format` to Azure OpenAI API to prevent JSON parsing failures ([#4689](https://github.com/mem0ai/mem0/pull/4689)) - **Core:** Guard `temp_uuid_mapping` lookups against LLM-hallucinated IDs with safe `.get()` and warnings ([#4674](https://github.com/mem0ai/mem0/pull/4674)) - **Client:** Prevent `MemoryClient.feedback()` telemetry TypeError by merging feedback data into single payload ([#4795](https://github.com/mem0ai/mem0/pull/4795)) **Improvements:** - **Telemetry:** Sample OSS hot-path events at 10% via PostHog `before_send` hook to reduce event volume ([#4771](https://github.com/mem0ai/mem0/pull/4771)) See the [OSS v2 to v3 migration guide](https://docs.mem0.ai/migration/oss-v2-to-v3) and [Platform migration guide](https://docs.mem0.ai/migration/platform-v2-to-v3) for upgrade instructions. **New Features & Updates:** - **SDK:** Added `multilingual` parameter to project update ([#4314](https://github.com/mem0ai/mem0/pull/4314)) **Bug Fixes:** - **LLMs:** Fixed Groq model configuration ([#4700](https://github.com/mem0ai/mem0/pull/4700)) - **Core:** Prevented thread and memory leaks from PostHog telemetry ([#4535](https://github.com/mem0ai/mem0/pull/4535)) - **Vector Stores:** Used `DatetimeRange` for datetime string values in Qdrant range filters ([#4659](https://github.com/mem0ai/mem0/pull/4659)) - **Configs:** Added missing `ConfigDict` to vector store configs (Elasticsearch, MongoDB, Neptune, OpenSearch, PGVector, Supabase, Valkey) ([#4656](https://github.com/mem0ai/mem0/pull/4656)) **New Features & Updates:** - **LLMs:** Added MiniMax provider support for AWS Bedrock ([#4609](https://github.com/mem0ai/mem0/pull/4609)) **Bug Fixes:** - **Configs:** Migrated CassandraConfig and AzureMySQLConfig to pydantic v2 ConfigDict ([#4646](https://github.com/mem0ai/mem0/pull/4646)) - **LLMs:** Forward `response_format` to OpenAI-compatible API for DeepSeek ([#4635](https://github.com/mem0ai/mem0/pull/4635)) - **LLMs:** Forward `response_format` to OpenAI-compatible API for vLLM ([#4608](https://github.com/mem0ai/mem0/pull/4608)) - **Vector Stores:** Only list authorized collections when listing MongoDB collections ([#3888](https://github.com/mem0ai/mem0/pull/3888)) - **Core:** Reset graph database in `Memory.reset()` ([#4185](https://github.com/mem0ai/mem0/pull/4185)) - **Core:** Make `AsyncMemory.from_config` a regular classmethod ([#4183](https://github.com/mem0ai/mem0/pull/4183)) **New Features & Updates:** - **LLMs:** Added `reasoning_effort` parameter support for reasoning models ([#4461](https://github.com/mem0ai/mem0/pull/4461)) **Bug Fixes:** - **Core:** Preserved original `actor_id` during memory update ([#4570](https://github.com/mem0ai/mem0/pull/4570)) - **Core:** Set `updated_at` on creation and preserve pre-existing `created_at` ([#4499](https://github.com/mem0ai/mem0/pull/4499)) - **Core:** Centralized entity cleanup and skip malformed LLM relation dicts ([#4515](https://github.com/mem0ai/mem0/pull/4515)) - **Core:** Removed `README.md` from wheel shared-data ([#4052](https://github.com/mem0ai/mem0/pull/4052)) - **Vector Stores:** Handled `vector=None` in Milvus and Qdrant update methods ([#4568](https://github.com/mem0ai/mem0/pull/4568)) - **Vector Stores:** Rebuilt FAISS index on vector deletion ([#4178](https://github.com/mem0ai/mem0/pull/4178)) **Improvements:** - **Embeddings:** Updated default Gemini and Vertex AI embedder model to `gemini-embedding-001` ([#4571](https://github.com/mem0ai/mem0/pull/4571)) **New Features & Updates:** - **Vector Stores:** Integrated Turbopuffer as a vector database provider ([#4428](https://github.com/mem0ai/mem0/pull/4428)) - **LLMs:** Added MiniMax LLM provider ([#4431](https://github.com/mem0ai/mem0/pull/4431)) **Bug Fixes:** - **Core:** Fixed merging of multiple filter operators for the same key ([#4559](https://github.com/mem0ai/mem0/pull/4559)) - **Core:** Prevented in-place mutation of metadata in `_create_memory` ([#4529](https://github.com/mem0ai/mem0/pull/4529)) - **Core:** Preserved custom metadata when updating memory ([#4495](https://github.com/mem0ai/mem0/pull/4495)) - **Core:** Handled chatty LLM responses in JSON parsing ([#4525](https://github.com/mem0ai/mem0/pull/4525)) - **Core:** Prevented double embedding in `mem0.add` ([#3996](https://github.com/mem0ai/mem0/pull/3996)) - **Core:** Raised `ValueError` when deleting nonexistent memory ([#4455](https://github.com/mem0ai/mem0/pull/4455)) - **Core:** Cleaned up graph store data on `Memory.delete()` ([#4505](https://github.com/mem0ai/mem0/pull/4505)) - **Vector Stores:** Prevented SQL injection in Databricks vector store ([#4558](https://github.com/mem0ai/mem0/pull/4558)) - **Vector Stores:** Upgraded MongoDB vector store from deprecated `knnVector` to GA `vectorSearch` ([#3995](https://github.com/mem0ai/mem0/pull/3995)) - **Vector Stores:** Prevented embedding corruption in Valkey and Redis when vector is `None` ([#4362](https://github.com/mem0ai/mem0/pull/4362)) - **Vector Stores:** Accepted default `/tmp/chroma` path in `ChromaDbConfig` validator ([#4179](https://github.com/mem0ai/mem0/pull/4179)) - **Vector Stores:** Wrapped vector and payload in lists for `Langchain.update` ([#4446](https://github.com/mem0ai/mem0/pull/4446)) - **Graph:** Soft-delete graph relationships instead of hard `DELETE` ([#4188](https://github.com/mem0ai/mem0/pull/4188)) - **Graph:** Sanitized hyphens in Neo4j Cypher relationship names ([#4154](https://github.com/mem0ai/mem0/pull/4154)) - **Graph:** Used root LLM config as fallback for graph store instead of hardcoded OpenAI default ([#4466](https://github.com/mem0ai/mem0/pull/4466)) - **Qdrant:** Fixed `do not remove local path on init` ([#4475](https://github.com/mem0ai/mem0/pull/4475)) - **Qdrant:** Implemented enhanced metadata filtering operators ([#4127](https://github.com/mem0ai/mem0/pull/4127)) - **Embeddings:** Fixed OpenAI embedding dimensions ([#4481](https://github.com/mem0ai/mem0/pull/4481)) - **LLMs:** Omitted `topP` for Anthropic Converse in Bedrock; used `AWSBedrockConfig` in `LlmFactory` ([#4469](https://github.com/mem0ai/mem0/pull/4469)) - **LLMs:** Avoided sending both `temperature` and `top_p` to Anthropic API ([#4471](https://github.com/mem0ai/mem0/pull/4471)) - **LLMs:** Handled `None` content and empty candidates in `GeminiLLM` parsing ([#4462](https://github.com/mem0ai/mem0/pull/4462)) - **LLMs:** Added missing `_parse_response` to `AzureOpenAIStructuredLLM` ([#4434](https://github.com/mem0ai/mem0/pull/4434)) - **History:** Added timestamps for `DELETE` operations in history ([#4492](https://github.com/mem0ai/mem0/pull/4492)) **Improvements:** - **Vector Stores:** Added vector validation to OpenSearchDB to ensure non-null, non-empty, and correct-dimension vectors ([#4472](https://github.com/mem0ai/mem0/pull/4472)) **Bug Fixes:** - **Core:** Fixed control characters in LLM JSON responses causing parse failures ([#4420](https://github.com/mem0ai/mem0/pull/4420)) - **Core:** Replaced hardcoded US/Pacific timezone references with `timezone.utc` ([#4404](https://github.com/mem0ai/mem0/pull/4404)) - **Core:** Preserved `http_auth` in `_safe_deepcopy_config` for OpenSearch ([#4418](https://github.com/mem0ai/mem0/pull/4418)) - **Core:** Normalized malformed LLM fact output before embedding ([#4224](https://github.com/mem0ai/mem0/pull/4224)) - **Embeddings:** Pass `encoding_format='float'` in OpenAI embeddings for proxy compatibility ([#4058](https://github.com/mem0ai/mem0/pull/4058)) - **LLMs:** Fixed Ollama to pass tools to `client.chat` and parse `tool_calls` from response ([#4176](https://github.com/mem0ai/mem0/pull/4176)) - **Reranker:** Support nested LLM config in `LLMReranker` for non-OpenAI providers ([#4405](https://github.com/mem0ai/mem0/pull/4405)) - **Vector Stores:** Cast `vector_distance` to float in Redis search ([#4377](https://github.com/mem0ai/mem0/pull/4377)) **Improvements:** - **Embeddings:** Improved Ollama embedder with model name normalization and error handling ([#4403](https://github.com/mem0ai/mem0/pull/4403)) **Bug Fixes:** - **Telemetry:** Fixed telemetry vector store initialization still running when `MEM0_TELEMETRY` is disabled (#4351) - **Core:** Removed destructive `vector_store.reset()` call from `delete_all()` that was wiping the entire vector store instead of deleting only the target memories (#4349) - **OSS:** `OllamaLLM` now respects the configured URL instead of always falling back to localhost (#4320) - **Core:** Fixed `KeyError` when LLM omits the `entities` key in tool call response (#4313) - **Prompts:** Ensured JSON instruction is included in prompts when using `json_object` response format (#4271) - **Core:** Fixed incorrect database parameter handling (#3913) **Dependencies:** - Updated LangChain dependencies to v1.0.0 (#4353) - Bumped protobuf dependency to 5.29.6 and extended upper bound to `<7.0.0` (#4326) - **Telemetry Fix** - Fixed an issue where the PostHog client was initialized even after telemetry was disabled. Although events were not captured, the client was unnecessarily initialized. **New Features & Updates:** - **Memory Update:** - Added `timestamp` parameter to `update()`: accepts Unix epoch (int/float) or ISO 8601 string **New Features & Updates:** - **Project Settings:** - Added inclusion prompt, exclusion prompt, memory depth, and usecase setting **New Features & Updates:** - **Vector Stores:** - Added DriverInfo metadata to MongoDB vector store **New Features & Updates:** - **Vector Stores:** - Added Apache Cassandra vector store support - **Embeddings:** - Added FastEmbed embedding support for local embeddings - **Graph Store:** - Added configurable embedding similarity threshold for graph store node matching **Bug Fixes:** - **Core:** - Fixed condition check for memories_result type in Memory class - Fixed list_memories endpoint Pydantic validation error - Fixed memory deletion not removing from vector store **New Features & Updates:** - **Vector Stores:** - Added Azure MySQL support - Added Azure AI Search Vector Store support - **LLMs:** - Added Tool Call support for LangchainLLM - Enabled custom model and parameters for Hugging Face with huggingface_base_url - Updated default LLM configuration - **Rerankers:** - Added reranker support: Cohere, ZeroEntropy, Hugging Face, Sentence Transformers, and LLMs - **Core:** - Added metadata filtering for OSS - Added Assistant memory retrieval - Enabled async mode as default **Improvements:** - **Prompts:** - Improved prompt for better memory retrieval - **Dependencies:** - Updated dependency compatibility with OpenAI 2.x - **Validation:** - Validated embedding_dims for Kuzu integration **Bug Fixes:** - **Vector Stores:** - Fixed Databricks Vector Store integration - Fixed Milvus DB bug and added test coverage - Fixed Weaviate search method - **LLMs:** - Fixed bug with thinking LLM in vLLM **New Features & Updates:** - **Vector Stores:** - Added Valkey vector store support - Added support for ChromaDB Cloud - Added Mem0 vector store backend integration for Neptune Analytics - **Graph Store:** - Added Neptune-DB graph store with vector store - **Core:** - Implemented structured exception classes with error codes and suggested actions **Improvements:** - **Dependencies:** - Updated OpenAI dependency and improved Ollama compatibility - **Testing:** - Added Weaviate DB test - Added comprehensive test suite for SQLiteManager - **Documentation:** - Updated category docs - Updated Search V2 / Get All V2 filters documentation - Refactored AWS example title - Fixed Quickstart cURL example **Bug Fixes:** - **Vector Stores:** - Databricks bug fixes - Fixed S3 Vectors memory initialization issue from configuration - **Core:** - Fixed JSON parsing with new memories - Replaced hardcoded LLM provider with provider from configuration - **LLMs:** - Fixed Bedrock Anthropic models to use system field **New Features & Updates:** - **OpenMemory:** - Added memory export / import feature - Added vector store integrations: Weaviate, FAISS, PGVector, Chroma, Redis, Elasticsearch, Milvus - Added `export_openmemory.sh` migration script - **Vector Stores:** - Added Amazon S3 Vectors support - Added Databricks Mosaic AI vector store support - Added support for OpenAI Store - **Graph Memory:** Added support for graph memory using Kuzu - **Azure:** Added Azure Identity for Azure OpenAI and Azure AI Search authentication - **Elasticsearch:** Added headers configuration support **Improvements:** - Added custom connection client to enable connecting to local containers for Weaviate - Updated configuration AWS Bedrock - Fixed dependency issues and tests; updated docstrings - **Documentation:** - Fixed Graph Docs page missing in sidebar - Updated integration documentation - Added version param in Search V2 API documentation - Updated Databricks documentation and refactored docs - Updated favicon logo - Fixed typos and Typescript docs **Bug Fixes:** - Baidu: Added missing provider for Baidu vector DB - MongoDB: Replaced `query_vector` args in search method - Fixed new memory mistaken for current - AsyncMemory._add_to_vector_store: handled edge case when no facts found - Fixed missing commas in Kuzu graph INSERT queries - Fixed inconsistent created and updated properties for Graph - Fixed missing `app_id` on client for Neptune Analytics - Correctly pick AWS region from environment variable - Fixed Ollama model existence check **Refactoring:** - **PGVector:** Use internal connection pools and context managers **New Features & Updates:** - **Pinecone:** Added namespace support and improved type safety - **Milvus:** Added db_name field to MilvusDBConfig - **Vector Stores:** Added multi-id filters support - **Vercel AI SDK:** Migration to AI SDK V5.0 - **Python Support:** Added Python 3.12 support - **Graph Memory:** Added sanitizer methods for nodes and relationships - **LLM Monitoring:** Added monitoring callback support **Improvements:** - **Performance:** - Improved async handling in AsyncMemory class - **Documentation:** - Added async add announcement - Added personalized search docs - Added Neptune examples - Added V5 migration docs - **Configuration:** - Refactored base class config for LLMs - Added sslmode for pgvector - **Dependencies:** - Updated psycopg to version 3 - Updated Docker compose **Bug Fixes:** - **Tests:** - Fixed failing tests - Restricted package versions - **Memgraph:** - Fixed async attribute errors - Fixed n_embeddings usage - Fixed indexing issues - **Vector Stores:** - Fixed Qdrant cloud indexing - Fixed Neo4j Cypher syntax - Fixed LLM parameters - **Graph Store:** - Fixed LM config prioritization - **Dependencies:** - Fixed JSON import for psycopg **Refactoring:** - **Google AI:** Refactored from Gemini to Google AI - **Base Classes:** Refactored LLM base class configuration **New Features & Updates:** - Enhanced project management via `client.project` and `AsyncMemoryClient.project` interfaces - Full support for project CRUD operations (create, read, update, delete) - Project member management: add, update, remove, and list members - Manage project settings including custom instructions, categories, retrieval criteria, and graph enablement - Both sync and async support for all project management operations **Improvements:** - **Documentation:** - Added detailed API reference and usage examples for new project management methods. - Updated all docs to use `client.project.get()` and `client.project.update()` instead of deprecated methods. - **Deprecation:** - Marked `get_project()` and `update_project()` as deprecated (these methods were already present); added warnings to guide users to the new API. **Bug Fixes:** - **Tests:** - Fixed Gemini embedder and LLM test mocks for correct error handling and argument structure. - **vLLM:** - Fixed duplicate import in vLLM module. **New Features:** - **OpenAI Agents:** Added OpenAI agents SDK support - **Amazon Neptune:** Added Amazon Neptune Analytics graph_store configuration and integration - **vLLM:** Added vLLM support **Improvements:** - **Documentation:** - Added SOC2 and HIPAA compliance documentation - Enhanced group chat feature documentation for platform - Added Google AI ADK Integration documentation - Fixed documentation images and links - **Setup:** Fixed Mem0 setup, logging, and documentation issues **Bug Fixes:** - **MongoDB:** Fixed MongoDB Vector Store misaligned strings and classes - **vLLM:** Fixed missing OpenAI import in vLLM module and call errors - **Dependencies:** Fixed CI issues related to missing dependencies - **Installation:** Reverted pip install changes **Bug Fixes:** - **Gemini:** Fixed Gemini embedder configuration **New Features:** - **Memory:** Added immutable parameter to add method - **OpenMemory:** Added async_mode parameter support **Improvements:** - **Documentation:** - Enhanced platform feature documentation - Fixed documentation links - Added async_mode documentation - **MongoDB:** Fixed MongoDB configuration name **Bug Fixes:** - **Bedrock:** Fixed Bedrock LLM, embeddings, tools, and temporary credentials - **Memory:** Fixed memory categorization by updating dependencies and correcting API usage - **Gemini:** Fixed Gemini Embeddings and LLM issues **New Features:** - **OpenMemory:** - Added OpenMemory augment support - Added OpenMemory Local Support using new library - **vLLM:** Added vLLM support integration **Improvements:** - **Documentation:** - Added MCP Client Integration Guide and updated installation commands - Improved Agent Id documentation for Mem0 OSS Graph Memory - **Core:** Added JSON parsing to solve hallucination errors **Bug Fixes:** - **Gemini:** Fixed Gemini Embeddings migration **New Features:** - **Baidu:** Added Baidu vector database integration **Improvements:** - **Documentation:** - Updated changelog - Fixed example in quickstart page - Updated client.update() method documentation in OpenAPI specification - **OpenSearch:** Updated logger warning **Bug Fixes:** - **CI:** Fixed failing CI pipeline **New Features:** - **AgentOps:** Added AgentOps integration - **LM Studio:** Added response_format parameter for LM Studio configuration - **Examples:** Added Memory agent powered by voice (Cartesia + Agno) **Improvements:** - **AI SDK:** Added output_format parameter - **Client:** Enhanced update method to support metadata - **Google:** Added Google Genai library support **Bug Fixes:** - **Build:** Fixed Build CI failure - **Pinecone:** Fixed pinecone for async memory **New Features:** - **MongoDB:** Added MongoDB Vector Store support - **Client:** Added client support for summary functionality **Improvements:** - **Pinecone:** Fixed pinecone version issues - **OpenSearch:** Added logger support - **Testing:** Added python version test environments **Improvements:** - **Documentation:** - Updated Livekit documentation migration - Updated OpenMemory hosted version documentation - **Core:** Updated categorization flow - **Storage:** Fixed migration issues **New Features:** - **Cloudflare:** Added Cloudflare vector store support - **Search:** Added threshold parameter to search functionality - **API:** Added wildcard character support for v2 Memory APIs **Improvements:** - **Documentation:** Updated README docs for OpenMemory environment setup - **Core:** Added support for unique user IDs **Bug Fixes:** - **Core:** Fixed error handling exceptions **Bug Fixes:** - **Vector Stores:** Fixed GET_ALL functionality for FAISS and OpenSearch **New Features:** - **LLM:** Added support for OpenAI compatible LLM providers with baseUrl configuration **Improvements:** - **Documentation:** - Fixed broken links - Improved Graph Memory features documentation clarity - Updated enable_graph documentation - **TypeScript SDK:** Updated Google SDK peer dependency version - **Client:** Added async mode parameter **New Features:** - **Examples:** Added Neo4j example - **AI SDK:** Added Google provider support - **OpenMemory:** Added LLM and Embedding Providers support **Improvements:** - **Documentation:** - Updated memory export documentation - Enhanced role-based memory attribution rules documentation - Updated API reference and messages documentation - Added Mastra and Raycast documentation - Added NOT filter documentation for Search and GetAll V2 - Announced Claude 4 support - **Core:** - Removed support for passing string as input in client.add() - Added support for sarvam-m model - **TypeScript SDK:** Fixed types from message interface **Bug Fixes:** - **Memory:** Prevented saving prompt artifacts as memory when no new facts are present - **OpenMemory:** Fixed typos in MCP tool description **New Features:** - **Neo4j:** Added base label configuration support **Improvements:** - **Documentation:** - Updated Healthcare example index - Enhanced collaborative task agent documentation clarity - Added criteria-based filtering documentation - **OpenMemory:** Added cURL command for easy installation - **Build:** Migrated to Hatch build system **New Features:** - **Memory:** Added Group Chat Memory Feature support - **Examples:** Added Healthcare assistant using Mem0 and Google ADK **Bug Fixes:** - **SSE:** Fixed SSE connection issues - **MCP:** Fixed memories not appearing in MCP clients added from Dashboard **New Features:** - **OpenMemory:** Added OpenMemory support - **Neo4j:** Added weights to Neo4j model - **AWS:** Added support for Opsearch Serverless - **Examples:** Added ElizaOS Example **Improvements:** - **Documentation:** Updated Azure AI documentation - **AI SDK:** Added missing parameters and updated demo application - **OSS:** Fixed AOSS and AWS BedRock LLM **New Features:** - **Neo4j:** Added support for Neo4j database - **AWS:** Added support for AWS Bedrock Embeddings **Improvements:** - **Client:** Updated delete_users() to use V2 API endpoints - **Documentation:** Updated timestamp and dual-identity memory management docs - **Neo4j:** Improved Neo4j queries and removed warnings - **AI SDK:** Added support for graceful failure when services are down **Bug Fixes:** - Fixed AI SDK filters - Fixed new memories wrong type - Fixed duplicated metadata issue while adding/updating memories **New Features:** - **HuggingFace:** Added support for HF Inference **Bug Fixes:** - Fixed proxy for Mem0 **New Features:** - **Vercel AI SDK:** Added Graph Memory support **Improvements:** - **Documentation:** Fixed timestamp and README links - **Client:** Updated TS client to use proper types for deleteUsers - **Dependencies:** Removed unnecessary dependencies from base package **Improvements:** - **Client:** Fixed Ping Method for using default org_id and project_id - **Documentation:** Updated documentation **Bug Fixes:** - Fixed mem0-migrations issue **New Features:** - **Integrations:** Added Memgraph integration - **Memory:** Added timestamp support - **Vector Stores:** Added reset function for VectorDBs **Improvements:** - **Documentation:** - Updated timestamp and expiration_date documentation - Fixed v2 search documentation - Added "memory" in EC "Custom config" section - Fixed typos in the json config sample **Improvements:** - **Vector Stores:** Initialized embedding_model_dims in all vectordbs **Bug Fixes:** - **Documentation:** Fixed agno link **New Features:** - **Memory:** Added Memory Reset functionality - **Client:** Added support for Custom Instructions - **Examples:** Added Fitness Checker powered by memory **Improvements:** - **Core:** Updated capture_event - **Documentation:** Fixed curl for v2 get_all **Bug Fixes:** - **Vector Store:** Fixed user_id functionality - **Client:** Various client improvements **New Features:** - **LLM Integrations:** Added Azure OpenAI Embedding Model - **Examples:** - Added movie recommendation using grok3 - Added Voice Assistant using Elevenlabs **Improvements:** - **Documentation:** - Added keywords AI - Reformatted navbar page URLs - Updated changelog - Updated openai.mdx - **FAISS:** Silenced FAISS info logs **New Features:** - **LLM Integrations:** Added Mistral AI as LLM provider **Improvements:** - **Documentation:** - Updated changelog - Fixed memory exclusion example - Updated xAI documentation - Updated YouTube Chrome extension example documentation **Bug Fixes:** - **Core:** Fixed EmbedderFactory.create() in GraphMemory - **Azure OpenAI:** Added patch to fix Azure OpenAI - **Telemetry:** Fixed telemetry issue **New Features:** - **Langchain Integration:** Added support for Langchain VectorStores - **Examples:** - Added personal assistant example - Added personal study buddy example - Added YouTube assistant Chrome extension example - Added agno example - Updated OpenAI Responses API examples - **Vector Store:** Added capability to store user_id in vector database - **Async Memory:** Added async support for OSS **Improvements:** - **Documentation:** Updated formatting and examples **New Features:** - **Upstash Vector:** Added support for Upstash Vector store **Improvements:** - **Code Quality:** Removed redundant code lines - **Build:** Updated MAKEFILE - **Documentation:** Updated memory export documentation **Improvements:** - **FAISS:** Added embedding_dims parameter to FAISS vector store **New Features:** - **Langchain Embedder:** Added Langchain embedder integration **Improvements:** - **Langchain LLM:** Updated Langchain LLM integration to directly pass the Langchain object LLM **Bug Fixes:** - **Langchain LLM:** Fixed issues with Langchain LLM integration **New Features:** - **LLM Integrations:** Added support for Langchain LLMs, Google as new LLM and embedder - **Development:** Added development docker compose **Improvements:** - **Output Format:** Set output_format='v1.1' and updated documentation **Documentation:** - **Integrations:** Added LMStudio and Together.ai documentation - **API Reference:** Updated output_format documentation - **Integrations:** Added PipeCat integration documentation - **Integrations:** Added Flowise integration documentation for Mem0 memory setup **Bug Fixes:** - **Tests:** Fixed failing unit tests **New Features:** - **FAISS Support:** Added FAISS vector store support **New Features:** - **Livekit Integration:** Added Mem0 livekit example - **Evaluation:** Added evaluation framework and tools **Documentation:** - **Multimodal:** Updated multimodal documentation - **Examples:** Added examples for email processing - **API Reference:** Updated API reference section - **Elevenlabs:** Added Elevenlabs integration example **Bug Fixes:** - **OpenAI Environment Variables:** Fixed issues with OpenAI environment variables - **Deployment Errors:** Added `package.json` file to fix deployment errors - **Tools:** Fixed tools issues and improved formatting - **Docs:** Updated API reference section for `expiration date` **Bug Fixes:** - **OpenAI Environment Variables:** Fixed issues with OpenAI environment variables - **Deployment Errors:** Added `package.json` file to fix deployment errors - **Tools:** Fixed tools issues and improved formatting - **Docs:** Updated API reference section for `expiration date` **New Features:** - **Supabase Vector Store:** Added support for Supabase Vector Store - **Supabase History DB:** Added Supabase History DB to run Mem0 OSS on Serverless - **Feedback Method:** Added feedback method to client **Bug Fixes:** - **Azure OpenAI:** Fixed issues with Azure OpenAI - **Azure AI Search:** Fixed test cases for Azure AI Search **New Features:** - **Client:** Add `expirationDate` to `AddMemoryOptions`, `update()`, and the `Memory` interface; add `showExpired` to `SearchMemoryOptions` and `GetAllMemoryOptions` ([#5874](https://github.com/mem0ai/mem0/pull/5874)) - **LLMs:** Add `MiniMaxLLM` provider backed by the OpenAI-compatible MiniMax API (`api.minimax.io/v1`, default model `MiniMax-M2.7`) ([#5858](https://github.com/mem0ai/mem0/pull/5858)) - **LLMs:** Add `LiteLLM` provider for routing requests through a local or hosted LiteLLM proxy ([#5830](https://github.com/mem0ai/mem0/pull/5830)) - **Vector Stores:** Add `connectionString` and `ssl` options to the PGVector config, allowing connection via URI instead of individual host/user/password/port fields ([#5789](https://github.com/mem0ai/mem0/pull/5789)) **Bug Fixes:** - **Memory (OSS):** Validate and trim entity IDs (`userId`, `agentId`, `runId`) in `deleteAll()` via `validateAndTrimEntityId` ([#5735](https://github.com/mem0ai/mem0/pull/5735)) - **Vector Stores:** Use nullish coalescing for `hash` and timestamps in the Redis `insert()` and `update()` paths so entity payloads that omit those fields no longer crash ([#5860](https://github.com/mem0ai/mem0/pull/5860)) **Security:** - **Dependencies:** Bump `undici` to `>=6.27.0` via pnpm override to remediate CVE-2026-12151 ([#5861](https://github.com/mem0ai/mem0/pull/5861)) **Bug Fixes:** - **Memory (OSS):** Align entity extraction with Python by reducing generic entity noise, preserving useful topic phrases, and exact-deduplicating entity links before semantic matching ([#5829](https://github.com/mem0ai/mem0/pull/5829)) **Bug Fixes:** - **Memory (OSS):** Guard against malformed `image_url` entries in `parseVisionMessages` to prevent crashes ([#5631](https://github.com/mem0ai/mem0/pull/5631)) - **Memory (OSS):** Return `attributedTo` from `get()`, `search()`, and `getAll()` ([#5675](https://github.com/mem0ai/mem0/pull/5675)) - **Memory (OSS):** Preserve message roles in the extraction input so assistant facts aren't attributed to the user ([#5643](https://github.com/mem0ai/mem0/pull/5643)) - **Memory (OSS):** Reject empty or blank messages in `Memory.add()` to prevent hallucinated memories ([#5545](https://github.com/mem0ai/mem0/pull/5545)) - **Memory (OSS):** Check `message.role` instead of `content` when detecting system messages ([#3921](https://github.com/mem0ai/mem0/pull/3921)) - **LLMs:** Honor the configured `baseURL` in `AnthropicLLM` ([#5740](https://github.com/mem0ai/mem0/pull/5740)) - **Client:** Preserve `customCategories` names through key conversion ([#5741](https://github.com/mem0ai/mem0/pull/5741)) - **Client:** Prevent hallucinated memories on an empty messages payload ([#5613](https://github.com/mem0ai/mem0/pull/5613)) - **Client:** Preserve user metadata keys across the case-conversion round-trip ([#5515](https://github.com/mem0ai/mem0/pull/5515)) **Security:** - **Dependencies:** Upgrade `form-data` to `>=4.0.6` across pnpm workspaces to remediate CVE-2026-12143 ([#5618](https://github.com/mem0ai/mem0/pull/5618)) **Bug Fixes:** - **LLMs:** Fix Anthropic `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](https://github.com/mem0ai/mem0/pull/5537)) - **Memory (OSS):** Preserve custom metadata fields during `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](https://github.com/mem0ai/mem0/pull/5480)) - **Client:** Preserve user-defined schema keys in `createMemoryExport` ([#5594](https://github.com/mem0ai/mem0/pull/5594)) **Security:** - **Dependencies:** Bump `esbuild` to `>=0.28.1` across all npm packages via pnpm overrides to remediate upstream vulnerability ([#5563](https://github.com/mem0ai/mem0/pull/5563)) **New Features:** - **Memory:** Add a contextual OSS-to-Platform notices system that surfaces occasional, situation-aware messages (first run, scale/performance thresholds, slow queries, and when temporal/decay features are relevant) pointing to the corresponding Mem0 Platform capabilities; disable via `MEM0_TELEMETRY=false` ([#5494](https://github.com/mem0ai/mem0/pull/5494)) **Security:** - **Dependencies:** Upgrade `@langchain/community` to `^1.1.18` to remediate CVE-2026-27795 and CVE-2026-26019 ([#5510](https://github.com/mem0ai/mem0/pull/5510)) - **Dependencies:** Resolve all open MEDIUM Dependabot alerts via pnpm overrides ([#5489](https://github.com/mem0ai/mem0/pull/5489)) **New Features:** - **Embeddings:** Add `LMStudioEmbedding` provider for local embeddings via the LM Studio server ([#5377](https://github.com/mem0ai/mem0/pull/5377)) - **Memory:** Add opt-in `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](https://github.com/mem0ai/mem0/pull/5102)) **Bug Fixes:** - **Memory:** Parallelize entity boost searches in `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](https://github.com/mem0ai/mem0/pull/5377)) - **Vector Stores:** Normalize similarity scores to `[0, 1]` (higher = better): fixed score inversion in the Redis vector store adapter ([#5391](https://github.com/mem0ai/mem0/pull/5391)) - **Embeddings:** Request `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](https://github.com/mem0ai/mem0/pull/5170)) **Security:** - **Dependencies:** Bumped `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:** - **Client:** `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](https://github.com/mem0ai/mem0/pull/5270)) **Bug Fixes:** - **Vector Stores:** PGVector adapter now supports rich filter operators (`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](https://github.com/mem0ai/mem0/pull/5263)) **Bug Fixes:** - **Telemetry:** Stitch OSS and platform PostHog identities on `MemoryClient` init so `$identify` events fire and a single user is no longer tracked as two or three disconnected personas ([#5040](https://github.com/mem0ai/mem0/pull/5040)) - **Vector Stores:** Fix inverted vector distance in PGVector implementation ([#4944](https://github.com/mem0ai/mem0/pull/4944)) - **Security:** Harden against SQL injection and prompt injection ([#4997](https://github.com/mem0ai/mem0/pull/4997)) **New Features:** - **SDK:** Expose `decay` on `project.update` ([#5062](https://github.com/mem0ai/mem0/pull/5062)) **Bug Fixes:** - **LLMs:** Forward `timeout` config to OpenAI client in JS OSS LLM providers ([#4770](https://github.com/mem0ai/mem0/pull/4770)) **Improvements:** - **Telemetry:** Harden TS telemetry version injection and require changelog entry on version bump ([#4900](https://github.com/mem0ai/mem0/pull/4900)) - **Docs:** Update memory tool list, CLI usage, and config file reading logic ([#4861](https://github.com/mem0ai/mem0/pull/4861)) **Bug Fixes:** - **Telemetry:** SDK version is now injected into telemetry at build time via esbuild's `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](https://github.com/mem0ai/mem0/pull/4897)). **Major Release**: TypeScript SDK with V3 memory pipeline, camelCase parameters, and cleaned-up API surface. **V3 Memory Pipeline (OSS):** - **Single-Pass Extraction:** Additive extraction pipeline aligned with Python SDK: memories accumulate, no UPDATE/DELETE events ([#4805](https://github.com/mem0ai/mem0/pull/4805)) - **Entity Extraction & Linking:** New `entity_extraction.ts` module (720+ lines) with cross-memory relationship retrieval ([#4805](https://github.com/mem0ai/mem0/pull/4805)) - **Message Persistence:** SQLite-based message history via new `SQLiteManager.ts` with rolling window for LLM context ([#4805](https://github.com/mem0ai/mem0/pull/4805)) - **Batch Embeddings:** `embedBatch()` support in OpenAI and Azure embedding providers ([#4805](https://github.com/mem0ai/mem0/pull/4805)) - **Scoring & Lemmatization:** New `scoring.ts` and `lemmatization.ts` utilities for hybrid search ([#4805](https://github.com/mem0ai/mem0/pull/4805)) - **New Prompts:** `prompts/index.ts` (592+ lines) with additive extraction prompt aligned with Python SDK ([#4805](https://github.com/mem0ai/mem0/pull/4805)) - **V3 API Endpoints:** `MemoryClient.add()` now posts to `/v3/memories/add/`; `MemoryClient.getAll()` posts to `/v3/memories/` with paginated envelope `{ count, next, previous, results }` ([#4856](https://github.com/mem0ai/mem0/pull/4856)) - **Default model:** `gpt-5-mini` is now the default in `OpenAI`, `OpenAIStructured`, and `Azure` LLM providers ([#4829](https://github.com/mem0ai/mem0/pull/4829)) **Breaking Changes:** - **External Graph Store Removed (OSS):** `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](https://github.com/mem0ai/mem0/pull/4805)) - **camelCase Parameters (Client SDK):** All user-facing parameters converted from snake_case to camelCase. Mapping is transparent at API boundary via `camelToSnakeKeys()` / `snakeToCamelKeys()` ([#4776](https://github.com/mem0ai/mem0/pull/4776)) ```typescript // Before client.add(messages, { user_id: "alice", top_k: 5 }); // After client.add(messages, { userId: "alice", topK: 5 }); ``` - **Per-Method Option Types:** Replaced monolithic `MemoryOptions` with typed interfaces: `AddMemoryOptions`, `SearchMemoryOptions`, `GetAllMemoryOptions`, `DeleteAllMemoryOptions` ([#4740](https://github.com/mem0ai/mem0/pull/4740)) - **Removed Deprecated Parameters:** `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](https://github.com/mem0ai/mem0/pull/4740)) - **`limit` renamed to `topK` (OSS):** Update all search calls ([#4740](https://github.com/mem0ai/mem0/pull/4740)) - **`topK` default changed 100 → 20** in `Memory.getAll()` and `Memory.search()`. Pass `topK: 100` explicitly to restore the old behavior ([#4843](https://github.com/mem0ai/mem0/pull/4843)) - **Entity ID validation:** `userId` / `agentId` / `runId` are trimmed; empty-string and whitespace-only values now throw ([#4843](https://github.com/mem0ai/mem0/pull/4843)) - **Search params validation:** `threshold` must be in `[0, 1]`; `topK` must be a non-negative integer: invalid inputs throw ([#4843](https://github.com/mem0ai/mem0/pull/4843)) - **`messages` in `Memory.add()` is required:** Passing `undefined` or `null` now throws ([#4843](https://github.com/mem0ai/mem0/pull/4843)) - **`customPrompt` renamed to `customInstructions` (OSS):** Update memory and vector store configurations ([#4740](https://github.com/mem0ai/mem0/pull/4740)) - **`enableGraph` removed (OSS):** Config option removed: graph memory no longer available in OSS ([#4776](https://github.com/mem0ai/mem0/pull/4776)) **New Features:** - **LLMs:** Added DeepSeek LLM provider with OpenAI-compatible integration using custom baseURL to `api.deepseek.com` ([#4613](https://github.com/mem0ai/mem0/pull/4613)) - **Entity store isolation:** `MemoryVectorStore` now uses a dedicated `_entities.db` file, preventing entity/memory store collisions ([#4829](https://github.com/mem0ai/mem0/pull/4829), [#4841](https://github.com/mem0ai/mem0/pull/4841)) - **Payload backward compatibility:** Legacy camelCase payload keys normalized to snake_case on read ([#4841](https://github.com/mem0ai/mem0/pull/4841)) **Bug Fixes:** - **V3 migration:** Fixed crashes in the OSS migration path; entity linking works end-to-end ([#4836](https://github.com/mem0ai/mem0/pull/4836)) - **PGVector init race:** `PGVector.initialize()` now memoises the in-flight init promise ([#4841](https://github.com/mem0ai/mem0/pull/4841)) - **Redis module detection:** Handles both node-redis v4+ and legacy `moduleList` response shapes ([#4841](https://github.com/mem0ai/mem0/pull/4841)) - **Config:** Fixed `ConfigManager.mergeConfig()` to only include `graphStore` when explicitly provided by user, preventing default Neo4j connection attempts ([#4776](https://github.com/mem0ai/mem0/pull/4776)) - **LLMs:** Config manager now falls back to `userConf.url` for `baseURL`: prevents custom LLM providers (Ollama, LMStudio) from silently connecting to OpenAI ([#4761](https://github.com/mem0ai/mem0/pull/4761)) **Improvements:** - **Telemetry:** Sample OSS hot-path events at 10% to reduce PostHog event volume ([#4771](https://github.com/mem0ai/mem0/pull/4771)) See the [TypeScript SDK migration guide](https://docs.mem0.ai/migration/ts-v2-to-v3) for upgrade instructions. **New Features & Updates:** - **Client:** Added `multilingual` parameter to project update types ([#4314](https://github.com/mem0ai/mem0/pull/4314)) **Bug Fixes:** - **OSS:** Replace `.single()` with `.maybeSingle()` in SupabaseDB.get() to handle missing rows ([#4599](https://github.com/mem0ai/mem0/pull/4599)) - **Embeddings:** Pass dimensions parameter to OpenAI embeddings API ([#4632](https://github.com/mem0ai/mem0/pull/4632)) - **OSS:** Extract JSON from chatty LLM responses in fact retrieval ([#4533](https://github.com/mem0ai/mem0/pull/4533)) **Bug Fixes:** - **OSS:** Fixed Qdrant Cloud "Illegal host" error by defaulting to port 6333 when URL has no explicit port ([#4565](https://github.com/mem0ai/mem0/pull/4565)) **New Features & Updates:** - **OSS:** Added pgvector support to NodeJS OSS `VectorStoreFactory` ([#3997](https://github.com/mem0ai/mem0/pull/3997)) **Bug Fixes:** - **OSS:** Made pgvector `pg` import compatible with ESM ([#4544](https://github.com/mem0ai/mem0/pull/4544)) - **OSS:** Registered pgvector in `VectorStoreFactory` ([#4502](https://github.com/mem0ai/mem0/pull/4502)) - **OSS:** Used root LLM config as fallback for graph store instead of hardcoded OpenAI default ([#4466](https://github.com/mem0ai/mem0/pull/4466)) - **OSS:** Fixed `toCamelCase` in Redis `get` method for the payload ([#3172](https://github.com/mem0ai/mem0/pull/3172)) - **Client:** Fixed Zod Schema incompatibility with OpenAI Structured Outputs API ([#3462](https://github.com/mem0ai/mem0/pull/3462)) **Bug Fixes:** - **Client:** Fixed webhook `createWebhook` and `updateWebhook` API serialization - **Client:** Added missing `MEMORY_CATEGORIZED` event type to `WebhookEvent` enum - **Types:** Added `WebhookCreatePayload` and `WebhookUpdatePayload` for better type safety **Tests:** - Added end-to-end unit test coverage for the platform client: CRUD, batch, search, webhooks, users, project, and initialization (#4357) - Added real API integration tests for memory CRUD, batch operations, search, user management, project configuration, and webhook lifecycle (#4395) - Deleted obsolete e2e test files replaced by the new structured test suite (#4419) **Bug Fixes:** - **Core:** Fixed code block content extraction: content inside code blocks is now properly extracted instead of being deleted (#4317) **Improvements:** - **Code Quality:** Fixed linting issues across the SDK (#4334) **Bug Fixes:** - **OSS Storage:** Fixed `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`. - **OSS Storage:** Fixed `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. - **OSS Storage:** Added `ensureSQLiteDirectory()`: parent directories for SQLite database files are now auto-created before opening, preventing `SQLITE_CANTOPEN` when using nested paths. **Improvements:** - **Migration:** Added deprecation warning when an existing `vector_store.db` is found at the old `process.cwd()` location, guiding users to move it or set `vectorStore.config.dbPath` explicitly. - **Config:** Limited default SQLite config spreading to only SQLite history providers, preventing config leaking into Supabase or other providers. **Breaking Changes:** - **Dependencies:** Minimum Node.js version for OSS sqlite features is now Node 20+ (due to `better-sqlite3` v12) **Bug Fixes:** - **OSS Storage:** Replaced `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. - **OSS Storage:** Fixed async init race condition in `SQLiteManager`: `init()` is now synchronous - **OSS Vector Store:** Migrated `MemoryVectorStore` from `sqlite3` to `better-sqlite3` with transactional batch inserts **Improvements:** - **Performance:** Cached prepared statements in `SQLiteManager` for faster history operations - **Performance:** Batch `insert()` in `MemoryVectorStore` wrapped in a transaction for atomicity - **Build:** Updated `tsup.config.ts` externals from `sqlite3` to `better-sqlite3` **New Features & Updates:** - **Memory Update:** - Added `timestamp` parameter to `update()`: accepts Unix epoch or ISO 8601 string **New Features & Updates:** - **Project Settings:** - Added inclusion prompt, exclusion prompt, memory depth, and usecase setting **Improvements:** - **Client:** Added support for keyword arguments in `add` and `search` methods, allowing additional properties beyond defined options for experimental features **New Features:** - **Vector Stores:** Added Azure AI Search vector store support **Improvements:** - **Config:** Fixed embedder config schema to support `embeddingDims` and `url` parameters - **Graph Memory:** Replaced hardcoded LLM provider with provider from configuration **Bug Fixes:** - **Embedders:** Fixed hardcoded `embeddingDims` values in embedders (OpenAI, Ollama, Google, Azure) - **Build:** Fixed TypeScript build errors **New Features:** - **Client:** Added `metadata` param to `update` method. **New Features:** - **OSS:** Added `RedisCloud` search module check **New Features:** - **Client:** Added `structured_data_schema` param to `add` method. **New Features:** - **Client:** Added `createMemoryExport` and `getMemoryExport` methods. **New Features:** - **OSS:** Added Gemini support **Improvement:** - **Client:** Added `immutable` param to `add` method. **Improvement:** - **Client:** Made `api_version` V2 as default. **Improvement:** - **Client:** Added param `filter_memories`. **New Features:** - **OSS:** Added Cloudflare support **Improvements:** - **OSS:** Fixed baseURL param in LLM Config. **Improvements:** - **Client:** Added Async Mode Param for `add` method. **Improvements:** - **SDK:** Update Google SDK Peer Dependency Version. **Improvements:** - **OSS:** Added baseURL param in LLM Config. **Improvements:** - **Client:** Removed type `string` from `messages` interface **Improvements:** - **Client:** Improved error handling in client. **New Features:** - **Client:** Added new param `output_format` to match Python SDK. - **Client:** Added new enum `OutputFormat` for `v1.0` and `v1.1` **New Features:** - **Client:** Updated `deleteUsers` to use `v2` API. - **Client:** Deprecated `deleteUser` and added deprecation warning. **New Features:** - **Client:** Updated `deleteUser` to use `entity_id` and `entity_type` **Improvements:** - **OSS SDK:** Bumped version of `@anthropic-ai/sdk` to `0.40.1` **Improvements:** - **Client:** Fixed `organizationId` and `projectId` being assigned to default in `ping` method **Improvements:** - **Client:** Added support for `timestamps` **Improvements:** - **Client:** Added support for custom instructions **New Features:** - **OSS SDK:** Added support for Langchain LLM - **OSS SDK:** Added support for Langchain Embedder - **OSS SDK:** Added support for Langchain Vector Store - **OSS SDK:** Added support for Azure OpenAI Embedder **Improvements:** - **OSS SDK:** Changed `model` in LLM and Embedder to use type any from `string` to use langchain llm models - **OSS SDK:** Added client to vector store config for langchain vector store - **OSS SDK:** - Updated Azure OpenAI to use new OpenAI SDK **Bug Fixes:** - **Azure OpenAI:** Fixed issues with Azure OpenAI **New Features:** - **Azure OpenAI:** Added support for Azure OpenAI - **Mistral LLM:** Added Mistral LLM integration in OSS **Improvements:** - **Zod:** Updated Zod to 3.24.1 to avoid conflicts with other packages **Improvements:** - **Client:** Added support for Mem0 to work with Chrome Extensions **New Features:** - **Mastra Example:** Added Mastra example - **Integrations:** Added Flowise integration documentation for Mem0 memory setup **Improvements:** - **Demo:** Updated Demo Mem0AI - **Client:** Enhanced Ping method in Mem0 Client - **AI SDK:** Updated AI SDK implementation **Improvements:** - **Introduced `ping` method to check if API key is valid and populate org/project id** **New Features:** - **Vercel AI SDK Update:** Support threshold and rerank **Improvements:** - **Made add calls async to avoid blocking** - **Bump `mem0ai` to use `2.1.12`** **New Features:** - **Mem0 OSS:** Support infer param **Improvements:** - **Updated Supabase TS Docs** - **Made package size smaller** **New Features:** - **Supabase Vector Store Integration** - **Feedback Method** **Security:** - **Telemetry key handling:** CLI telemetry no longer passes the Mem0 API key to a child process through command-line arguments. The context is sent over stdin, so the key is not visible in `ps`, `/proc//cmdline`, or Activity Monitor. Fixes #4862. **Bug Fixes:** - **Python package version:** `__version__` now matches the packaged `mem0-cli` version. **Security:** - **Dependencies:** Pinned transitive dependencies via pnpm overrides to remediate high-severity CVEs: `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 `:** 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. - **PII safety prompt:** The first interactive `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`. - **Config schema:** Added `agent_rush.acknowledged_at` for the local acknowledgement timestamp. **Changes:** - **Agent Rush telemetry:** Agent Rush commands send `X-Mem0-Mode: agent-rush` so platform telemetry can split game traffic from regular CLI usage. **Bug Fixes:** - **Claim flow error message:** The `email_already_claimed` tip in `mem0 init --email` previously suggested running `mem0 link `: 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](https://github.com/mem0ai/mem0/pull/5152)) **New Features:** - **Agent Mode (`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 ` (memories preserved, same key keeps working) ([#5123](https://github.com/mem0ai/mem0/pull/5123)) - **Self-declared agent identity:** Agents pass `--agent-caller ` (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](https://github.com/mem0ai/mem0/pull/5123)) - **`mem0 identify `:** 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](https://github.com/mem0ai/mem0/pull/5123)) - **Plugin sync:** `~/.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](https://github.com/mem0ai/mem0/pull/5123)) - **Claim flow:** `mem0 init --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](https://github.com/mem0ai/mem0/pull/5123)) **Bug Fixes:** - **Decision tree network resilience:** `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](https://github.com/mem0ai/mem0/pull/5123)) - **Rate-limit error clarity:** DRF's opaque `"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](https://github.com/mem0ai/mem0/pull/5123)) - **JSON envelope `command` field:** `mem0 init --agent --json` error envelopes now populate the `command` field correctly instead of returning an empty string ([#5123](https://github.com/mem0ai/mem0/pull/5123)) - **Bootstrap envelope validation:** Defends against partial/malformed backend responses (e.g. `{api_key: null}`) silently persisting null/undefined into typed string fields ([#5123](https://github.com/mem0ai/mem0/pull/5123)) **New Features:** - **V3 API Routes:** Migrated `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](https://github.com/mem0ai/mem0/pull/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](https://github.com/mem0ai/mem0/pull/4916)) **Bug Fixes:** - **Telemetry:** Replaced shared `"anonymous-cli"` fallback with a persistent per-machine random hash (`cli-anon-`), so anonymous CLI users are counted individually in PostHog instead of collapsing into one identity ([#4789](https://github.com/mem0ai/mem0/pull/4789)) - **Telemetry:** Added PostHog `$identify` event on first authenticated run to stitch pre-signup anonymous history onto the authenticated user profile ([#4789](https://github.com/mem0ai/mem0/pull/4789)) **Improvements:** - **API:** All API calls now include `source=CLI` in request bodies (POST/PUT) and query params (GET/DELETE) for server-side attribution ([#4789](https://github.com/mem0ai/mem0/pull/4789)) **New Features:** - **Telemetry:** Added PostHog telemetry and source tracking to both Python and Node CLIs ([#4699](https://github.com/mem0ai/mem0/pull/4699)) - **Validation:** API key validated upfront via `/v1/ping/` on startup: fail-fast with a helpful error instead of cryptic 401s ([#4701](https://github.com/mem0ai/mem0/pull/4701)) **Bug Fixes:** - **CD:** Fixed OIDC trusted publishing with `npx npm@latest` ([#4724](https://github.com/mem0ai/mem0/pull/4724)) - **CD:** Removed npm self-upgrade from CD workflows ([#4723](https://github.com/mem0ai/mem0/pull/4723)) **New Features:** - **Docs:** Comprehensive README with installation, usage examples, and purple branding ([#4680](https://github.com/mem0ai/mem0/pull/4680)) **Bug Fixes:** - **npm:** Added `repository` field to Node packages for npm provenance ([#4671](https://github.com/mem0ai/mem0/pull/4671)) - **CD:** Added CD workflows for Node SDK packages with OIDC trusted publishing ([#4670](https://github.com/mem0ai/mem0/pull/4670)) **New Features:** - **`event` commands:** `mem0 event list` shows recent background processing events in a table; `mem0 event status ` shows full detail including nested memory results ([#4649](https://github.com/mem0ai/mem0/pull/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](https://github.com/mem0ai/mem0/pull/4649)) - **Agent output sanitization:** Raw API responses projected to only relevant fields per command (e.g., `add` → `{id, memory, event}`, `search` → `{id, memory, score, created_at, categories}`) ([#4649](https://github.com/mem0ai/mem0/pull/4649)) - **Email login:** Added email verification code login to `mem0 init` ([#4623](https://github.com/mem0ai/mem0/pull/4623)) - **Brand update:** Updated color palette from purple to golden ([#4664](https://github.com/mem0ai/mem0/pull/4664)) - **CI/CD:** Added CI pipelines and CD workflows for both CLIs ([#4640](https://github.com/mem0ai/mem0/pull/4640), [#4653](https://github.com/mem0ai/mem0/pull/4653)) **Bug Fixes:** - **Node:** Fixed critical `MODULE_NOT_FOUND` crash on `status`, `import`, and all commands when installed globally: replaced runtime `createRequire` with build-time version injection ([#4636](https://github.com/mem0ai/mem0/pull/4636)) - **Node:** API errors now show full response detail instead of bare "Bad Request" ([#4636](https://github.com/mem0ai/mem0/pull/4636)) - **Python:** Fixed double error printing on all commands ([#4636](https://github.com/mem0ai/mem0/pull/4636)) - **`status` command:** Replaced heavyweight `/v1/entities/` check with dedicated `GET /v1/ping/` endpoint ([#4649](https://github.com/mem0ai/mem0/pull/4649)) - **`add` command:** Deduplicated PENDING results from API; changed misleading count message ([#4649](https://github.com/mem0ai/mem0/pull/4649)) - **`init` command:** Partial flags now work in non-TTY; warns before overwriting existing config; added `--force` flag ([#4649](https://github.com/mem0ai/mem0/pull/4649)) - **`delete` command:** Fixed entity delete via v2 API for all entity types ([#4649](https://github.com/mem0ai/mem0/pull/4649)) **Improvements:** - Tables now show full UUIDs (was truncated to 8 chars, making `mem0 get ` fail) ([#4636](https://github.com/mem0ai/mem0/pull/4636)) - Search table includes Score column ([#4636](https://github.com/mem0ai/mem0/pull/4636)) - `config get api_key` short-form aliases added ([#4636](https://github.com/mem0ai/mem0/pull/4636)) - Client-side validation for `--expires`, `--page-size`, `--page`, `--top-k`, `--threshold`, and empty content ([#4636](https://github.com/mem0ai/mem0/pull/4636)) - `printInfo` / `printScope` moved to stderr to avoid contaminating JSON piping ([#4636](https://github.com/mem0ai/mem0/pull/4636)) **Initial Release: Official Mem0 CLI** A full-featured command-line interface for Mem0, available in both Python and Node.js: - **Install:** `pip install mem0-cli` (Python) or `npm install -g @mem0/cli` (Node.js) - **Full command suite:** `add`, `search`, `list`, `get`, `update`, `delete`, `import`, `config`, `init`, `status`, `entity` - **Interactive setup:** `mem0 init` with API key entry and user ID configuration - **Works everywhere:** Platform (Mem0 Cloud) and self-hosted OSS modes - **Scriptable:** `-o json` flag for CI/CD pipelines and automation - **Dual SDK:** Same commands, same experience across Python and Node.js - **Shared spec:** Both implementations driven by a single `cli-spec.json` ensuring identical behavior ([#4575](https://github.com/mem0ai/mem0/pull/4575)) **Fixes:** - **Session summary metadata:** `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:** - **Reranked auto-injected context:** File-context, bash-error lookup, and session-resume prefetch now rerank by default. Disable with `MEM0_RERANK=0`, `false`, `no`, or `off`. **Fixes:** - **Editor telemetry attribution:** Antigravity is no longer counted as Claude Code, Codex no longer falls back to the generic `plugin` bucket, and Cursor wrappers now pin their platform before delegating to shared hook scripts. - **Per-editor plugin version:** Telemetry reads the manifest for the detected platform instead of always reading the Claude plugin manifest. **New Features:** - **`MEM0_PLATFORM` override:** Explicit platform markers now win over env-var auto-detection for reliable telemetry labels. **New Features:** - **File-context injection:** Before supported editors read a file, Mem0 searches for memories that reference that path and injects a compact prior-work timeline. - **Stop hook session summaries:** Session-end hooks store structured summaries with request, decisions, learnings, next steps, and files touched. - **SessionStart activity timeline:** Sessions with existing memories show recent decisions, bug fixes, and session summaries on startup. **Changes:** - Added shared `file_context.py`, `capture_session_summary.py`, and `session_timeline.py` helpers for the hook pipeline. **New Features:** - **Global search mode:** `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`. - **Automatic coding categories:** The coding taxonomy is installed in the background on session start and gated by an API-key and taxonomy fingerprint. - **Global scope controls:** `/mem0:switch-project --global` and `/mem0:switch-project --no-global` persist global-search behavior in `~/.mem0/settings.json`. - **Scope-aware startup:** Session banners show `scope=global` when global search is active, and startup memory counts use the same global filter. - **Category setup state:** `~/.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. - **Tests:** Added coverage for category fingerprints, state-file gating, state save/load, and idempotent category application. **Changes:** - Session start spawns `auto_setup_categories.py` in the background alongside project-file auto-import. - Onboarding no longer asks users to install coding categories manually; it verifies status and applies categories only if the background run has not finished. - New-project startup copy now tells users that coding categories install automatically. **Fixes:** - **First-install auth:** Removed `authorizationUrl` from `.mcp.json` so Claude Code uses the `MEM0_API_KEY` header instead of falling into a broken OAuth reconnect flow. - **Onboarding auth copy:** `/mem0:onboard` no longer tells users to complete browser OAuth. - **Invalid configure command:** Removed `claude plugin configure mem0` references and clarified that Claude Code stores the plugin API key through the enable UI prompt. **Fixes:** - **Memory count and stats:** Removed the `run_id: "*"` filter from read paths so memories written without `run_id` are visible again. - **Write scoping:** `add_memory` moved session tracking from top-level `run_id` to `metadata.session_id`, keeping new memories in the default query partition. - **Session stats:** Memory add/search tracking moved into `enforce_metadata_defaults.sh`, because plugin MCP tools do not trigger PostToolUse hooks. - **Auto-capture reliability:** Added direct API auto-capture every third message plus a proportional prompt nudge when few memories have been stored. - **Desktop API keys:** `_identity.sh` and `_identity.py` can read `MEM0_API_KEY` from common shell profiles when Claude Code Desktop does not inherit shell env vars. - **Import cleanup:** Stale auto-import chunks now delete through the v1 delete endpoint, matching Mem0 v3 add behavior. **Removed:** - Removed Stop and SessionEnd hook capture paths, redundant post-commit/task/subagent scripts, dead settings, and the deleted file-read test. **Changes:** - Stats and tour now query with `user_id` + `app_id` filters only. - Session banners now tell agents to store learnings incrementally instead of waiting until session end. - Session-start resets per-user message counters so nudges begin cleanly. **Fixes:** - **Hook schema:** PostToolUse scripts now read `tool_response`, Stop hook output is schema-compliant, and SessionStart uses visible raw stdout. - **Tool coverage:** Memory write blocking includes `MultiEdit`, and metadata enforcement covers add, search, get, update, and delete-all variants. - **Identity injection:** `add_memory`, `search_memories`, `get_memories`, and `delete_all_memories` receive safe default `user_id` and `app_id` values when the agent omits them. - **Skill API calls:** Export, stats, pin, health, memory-reviewer, dream, tour, onboard, context-loader, and weekly stats examples now use the correct filter and `top_k` shapes. - **Compact summary capture:** `capture_compact_summary.py` is spawned correctly after compaction and guarded against unset identity variables. **New Features:** - **Stop hook analyzer:** Added `stop_hook_check.py` to detect meaningful work before prompting memory capture. - **Skill checklists:** Added progress checklists to `/mem0:dream` and `/mem0:onboard`. **Changes:** - `enforce_metadata_defaults.sh` was rewritten around handler-based dispatch and never overrides explicitly provided identity. **Fixes:** - **PostToolUse matcher:** Supports both `mcp__mem0__` and `mcp__plugin_mem0_mem0__` names so session stats record memory operations again. - **File-read noise:** File-read recall now prefers `metadata.files` plus score threshold before falling back to basename search. - **Pinning:** `/mem0:pin` no longer uses removed `immutable=True`; it relies on pinned metadata/text conventions. - **Project listing:** `/mem0:list-projects` merges null-scoped and app-scoped memories so legacy records are counted. - **ID lookup:** `/mem0:peek` routes memory-id references to `get_memory` instead of semantic search. **New Features:** - **Session ID capture:** SessionStart persists the Claude session ID for session-scoped memory operations. - **Search controls:** `_search.py` gained `min_score`, metadata filters, rerank, and threshold support. - **Reranked tour and peek:** `/mem0:tour` and `/mem0:peek` use reranking for better precision. **Removed:** - Removed the nonexistent `PostToolUseFailure` hook and the superseded `/mem0:protocol` skill. **New Features:** - **Read hook:** Added `PreToolUse(Read)` file recall with skip rules for non-code files, lockfiles, and `node_modules`. - **Shared search module:** Added `_search.py` for v3 search calls and consistent context formatting. - **Settings file:** Added `~/.mem0/settings.json` with search, retention, confidence, debug, and capture settings. - **Memory skills:** Added `/mem0:forget`, `/mem0:peek`, `/mem0:memory-reviewer`, and `/mem0:context-loader`. - **Compact output style:** Added compact `[type] content [mem0:id]` memory display. - **Claude userConfig:** Added sensitive `api_key` plugin config support. **Changes:** - Skills were renamed to shorter command names, bash-error hooks now run real searches, resume prompts prefetch context, and remember-intent phrases route to `/mem0:remember`. - API key resolution now checks `CLAUDE_PLUGIN_OPTION_API_KEY`, and hook timeouts increased for prompt and bash-output searches. **Removed:** - Removed `/mem0:dream --forget`, `/mem0:dream --schedule`, `/mem0:health --fix`, and CLI config fallback. **Fixes:** - **Compaction writes:** Prevented duplicate pre-compaction captures and shortened session-state content before letting Mem0 infer structured memories. - **Error detection:** Reduced false positives from routine test and linter output. - **Git commit noise:** Removed automatic background commit-context writes and gated post-commit prompts behind settings. - **Project identity:** Added git-remote hash fallback when folders are renamed. - **Dependency install race:** Added a lock and failure sentinel for `ensure_deps.sh`. - **Telemetry:** Switched `distinct_id` from MD5 to SHA-256, protected system props, and loaded plugin version from the manifest. **New Features:** - **Chunking and import:** Added shared chunking helpers and Markdown chunk imports. - **Metadata defaults:** Added `enforce_metadata_defaults.sh` for default confidence, source, and type on `add_memory`. - **Project utilities:** Added list-projects, all-project tour, weekly stats, dream forget mode, and competing-tools import. **Removed:** - Removed `on_pre_commit.py` and merged digest, forget, import-tools, and peek flows into existing skills. **New Features:** - **Skill suite:** Added 11 skills for dream, export, import, tool import, forget, health, peek, pin, remember, stats, and digest. - **Hook suite:** Added bash-error recall, git/commit context hooks, compaction recovery, session-end capture, subagent reminders, tool-failure recovery, and pre-commit capture. - **Telemetry:** Added sampled PostHog telemetry with no memory content or API keys and `MEM0_TELEMETRY=false` opt-out. - **Coding categories:** Added 10 more coding categories and dependency-managed SDK install through `ensure_deps.sh`. - **Project onboarding:** Added auto-onboarding, `mem0.md` config loading, inactive API-key banner, import/export parsers, and competing-tool import. **Changes:** - Memory scoping moved from `metadata.project_id` to top-level `app_id`, and write paths moved to `/v3/memories/add/`. - Session stats gained category counters and recent memory IDs. - Tour, onboard, prompt hooks, and MCP guidance were updated for project-aware workflows. **Fixes:** - Shared scripts now resolve plugin API-key env vars consistently and pass hook CWD into project/branch resolution. **New Features:** - **Project-scoped memories:** Deterministic project IDs from git remotes isolate memories per repo. - **Branch-aware tagging:** Session-state and compact-summary memories include branch metadata. - **Project file import:** SessionStart imports `CLAUDE.md`, `AGENTS.md`, `.cursorrules`, `.windsurfrules`, and `mem0.md` as project-profile memories. - **Active identity banner:** Startup shows user, project, branch, and memory count. - **Session report:** Stop hook reports memory writes, retrieves, and touched categories. - **Onboarding, tour, and switch-project skills:** Added first-run setup, proof-of-value browsing, and manual project override. - **Session stats tracker:** Added local add/search tracking for reports. **Fixes:** - **User ID regression:** `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:** - The `~/.mem0/identity.json` cache is no longer used. - Users who stored memories under the short-lived API-key hash can recover them by temporarily setting `MEM0_USER_ID` to the old hash. **New Features:** - **Identity resolver:** Added deterministic user-id resolver, later reverted in v0.1.3. - **Compact summaries:** Added SessionStart compact handler for `compact_summary` memories. - **Coding taxonomy setup:** Added one-shot coding category setup for architecture, anti-patterns, task learnings, tooling, bug fixes, conventions, and preferences. - **Debug logging:** Added opt-in hook logs with `MEM0_DEBUG=1`. - **Shared MCP skill:** Replaced the Claude-Code-specific Codex skill with `mem0-mcp`. **Fixes:** - Session IDs are stored in memory metadata, startup exits quietly without an API key, memory-write blocking avoids `docs/memory/*.md`, duplicate compact writes were removed, and hook captures now expire after 90 days. **Fixes:** - Cursor plugin became fully functional. - Codex plugin support and integration docs were added. - Codex lifecycle hooks became available through the opt-in installer. - Invalid Claude plugin config keys were removed. **Mem0 Plugin for Claude Code, Cursor, and Codex** Initial release of the Mem0 plugin for Claude Code and Cursor, followed by Codex support: - **9 MCP memory tools:** `add_memory`, `search_memories`, `get_memories`, `get_memory`, `update_memory`, `delete_memory`, `delete_all_memories`, `delete_entities`, `list_entities`: all via `mcp.mem0.ai`. - **Lifecycle hooks:** Automatic memory capture at session start, context compaction, task completion, and session end. - **Cloud MCP server:** Managed endpoint replaces local MCP and Smithery setup. - **Streamable HTTP transport:** New MCP transport protocol for real-time streaming. - **Codex-specific skill:** Dedicated skill in `mem0-plugin/skills/mem0-codex` for Codex workflows. **Breaking Changes:** - **Native SDK tools:** Memory tools are registered through `@opencode-ai/plugin` and backed by the `mem0ai` SDK directly. The plugin no longer registers or depends on `mcp.mem0.ai`. - **Skills load in place:** The `config` hook adds `opencode-skills/` to `skills.paths`; skills are no longer copied into user config directories. - **Focused skill set:** Trimmed to 9 skills: `context-loader`, `dream`, `forget`, `status`, `search`, `scope`, `pin`, `remember`, and `tour`. **New Features:** - **Memory scopes:** Memory operations support `project`, `session`, and `global` scope, with `/mem0-scope` for changing the default. - **Auto-dream:** Gated memory consolidation can merge duplicates, drop stale/sensitive entries, and rewrite vague memories. - **Expanded telemetry:** OpenCode emits the shared `plugin.*` schema, including prompt, bash-error, pre-compact, session-stop, dream-triggered, and dream-completed events. **Fixes:** - **Project ID detection:** Git remote parsing now handles HTTPS, SSH, and custom SSH host aliases before falling back to the repo root. - **Auto-dream visibility:** `/mem0-status` shows which dream gate is blocking consolidation. - **Delete-all safety:** User-wide deletes require explicit `scope="global"`, regardless of the default scope. **New Features:** - **File-context injection:** Before a file read, the plugin searches for memories referencing that path and injects prior work as system context. - **Structured compaction summaries:** Session compaction stores `session_summary` memories with `infer=True`. - **Recent activity timeline:** Initial memory loading shows typed memories with age labels instead of bare text. - **PostHog telemetry:** Anonymous plugin telemetry uses the shared `plugin.*` schema and never sends memory content, prompts, or API keys. **New Features:** - **Automatic coding categories:** Sets up 17 coding categories at startup, idempotently and in the background. - **Global search mode:** Adds `global_search` support across initial load, per-message recall, resume detection, error lookup, and compaction context. - **Global search env:** Exports `MEM0_GLOBAL_SEARCH` to child shells via the `shell.env` hook. **Changes:** - Search filters now follow the `global_search` setting instead of always using project-scoped filters. - Resume and error-pattern searches broadened by removing narrow metadata type filters. **Changes:** - Renamed the package to `@mem0/opencode-plugin` ([#5272](https://github.com/mem0ai/mem0/pull/5272)). - Added the plugin array to the bundled `opencode.json` ([#5271](https://github.com/mem0ai/mem0/pull/5271)). - Fixed `tsconfig`, added `publishConfig` and the bun lockfile ([#5273](https://github.com/mem0ai/mem0/pull/5273)). - Validated the CI/CD publish flow ([#5288](https://github.com/mem0ai/mem0/pull/5288)). **Initial Release:** - **Native OpenCode plugin:** Added `@mem0/opencode-plugin` with TypeScript hooks for chat messages, tool execution, system-message transforms, session compaction, and shell env injection. - **Memory tooling:** Added add, search, update, delete, delete-all, entity tools, session-start memory loading, per-prompt semantic search, error-pattern lookup, auto-capture, and compaction capture. - **Skills and commands:** Bundled 16 OpenCode-native Mem0 skills and slash commands. - **Safety:** Blocks `MEMORY.md` writes and redacts secrets before memory storage. **Fixes:** - **Readable session metadata:** Stop-hook session summaries now store `files_touched` as a real list instead of a double-encoded JSON string, so returned memories show clean file paths. **Improvements:** - **Reranked injected context:** File-context, bash-error lookup, and session-resume recall now rerank by default for higher-quality automatic context. Disable with `MEM0_RERANK=0`, `false`, `no`, or `off`. **Fixes:** - **Telemetry attribution:** Antigravity is now reported as `antigravity` instead of being counted as Claude Code. - **Per-editor version reporting:** Telemetry reads Antigravity's own `plugin.json`, so events report the Antigravity plugin version instead of the Claude plugin version. **New Features:** - **Platform override support:** Shared scripts honor `MEM0_PLATFORM` when an editor needs to pin its telemetry platform explicitly. **Initial Release:** - **Self-contained plugin:** Added Antigravity plugin packaging with `plugin.json`, `mcp_config.json`, `hooks.json`, lifecycle hooks, shared scripts, and shared Mem0 skills. - **AGENTS.md support:** Uses Antigravity's `contextFileName: "AGENTS.md"` convention. - **Shared memory layer:** Reuses the Mem0 Platform MCP server, shared hook scripts, and 16 slash-command skills. - **Lifecycle hooks:** Wires session start, user prompt, file read, memory-tool metadata enforcement, bash output, post-tool tracking, and stop summaries. - **Install options:** Supports `degit` installs into `~/.gemini/config/plugins/mem0` and local Antigravity plugin installs. - **Codex parity:** Added missing Codex Write/Edit/MultiEdit blocking and pre-compaction hooks during the shared-plugin restructure. **Fixes:** - **Custom categories payload:** `customCategories` is converted into the list shape expected by the Mem0 SDK before add calls ([#5345](https://github.com/mem0ai/mem0/pull/5345)). - **Metadata registration:** `register()` exits early in `cli-metadata` mode, avoiding backend initialization and hook installation during OpenClaw metadata scans ([#5383](https://github.com/mem0ai/mem0/pull/5383)). **Security:** - Bumped `mem0ai` to `3.0.7` and added a `uuid` override to resolve known dependency advisories ([#5460](https://github.com/mem0ai/mem0/pull/5460), [#5489](https://github.com/mem0ai/mem0/pull/5489)). **Improvements:** - **Repo consolidation:** OpenClaw moved to `integrations/openclaw/`; npm provenance now points to the correct subdirectory ([#5491](https://github.com/mem0ai/mem0/pull/5491)). **Docs:** - **Agent Mode onboarding:** README documents `mem0 init --agent --json` for autonomous setup without email, OTP, or browser. **Security:** - Added overrides for `langsmith`, `picomatch`, `vite`, and `@qdrant/js-client-rest`. **Dependencies:** - Bumped `mem0ai` to `3.0.3` and refreshed Vitest coverage tooling. **New Features:** - **Skills-mode auto-setup:** Onboarding enables triage, recall, dream consolidation, and full tool profile automatically. - **Memory runtime capability:** Exposes `runtime.getMemorySearchManager()` and `resolveMemoryBackendConfig()`. - **Dimension-aware collections:** OSS wizard creates a new collection when embedder dimensions change. - **Tool docs in skills:** Memory triage and dream skills now include full tool reference sections. **Improvements:** - Auto-capture and auto-recall default to enabled. - Skills prefer `memory_update` over delete+add for atomic edits. - Default search threshold lowered to `0.1` for broader recall. - Config writes preserve OpenClaw gateway `plugins` state. **Security:** - Telemetry identity now uses SHA-256 hashes instead of MD5, and user email is hashed before telemetry submission. **Fixes:** - Version-pinned installs are rewritten to updatable specs. - `searchThreshold` is standardized across docs, README, and manifest. - `PLUGIN_VERSION` is injected at build time from `package.json`. **Manifest Compliance:** - Removed non-spec manifest fields and moved endpoint declarations to spec-compliant `providerEndpoints`. **Security & Compliance:** - **Manifest security metadata:** Added required env var declarations, sensitive config schema fields, data locations, privacy notes, and external endpoint declarations for platform and OSS modes. - **Static-analysis cleanup:** Tests now use `vi.stubEnv` / `vi.unstubAllEnvs` instead of direct environment access in places flagged by plugin scanning. **Tests:** - Expanded coverage to 421 tests across 15 files. **New Features:** - **OSS onboarding wizard:** Guided setup for LLM provider, embedding provider, vector store, and user ID. - **Agent-friendly CLI:** `--json` added to all 16 CLI commands. - **Non-interactive OSS setup:** Added `--mode open-source` with `--oss-llm`, `--oss-embedder`, and `--oss-vector`. - **JSON helpers:** Added structured `jsonOut`, `jsonErr`, and `redactSecrets` helpers. **New Features:** - **Chat-based setup:** Users can configure the Mem0 platform connection inside OpenClaw chat instead of editing config files manually. **Improvements:** - **V3 SDK compatibility:** Bumped the `mem0ai` dependency to `3.0.1` for Mem0 v3 API support. - **Config cleanup:** Removed deprecated `orgId`, `projectId`, and `enableGraph` setup paths from docs and CLI prompts. - **Noise filtering:** Expanded memory-add filtering and improved JSON extraction when model output includes leading text. **Fixes:** - **Telemetry identity:** Anonymous users now get a persistent per-machine hash instead of the shared `anonymous-openclaw` fallback. - **Telemetry stitching:** First authenticated runs emit `$identify` so anonymous history can attach to the authenticated profile. - **CLI event flushing:** Short-lived CLI invocations flush queued telemetry before exit. - **Email resolution:** API-key-only users resolve email lazily through `/v1/ping/`. **Improvements:** - **OpenClaw source tag:** Provider calls now send `source: "OPENCLAW"` across add, search, list, recall, CLI, and OSS backend paths. **Fixes:** - **Init menu selection:** `openclaw mem0 init` number choices now select the intended option. - **OSS pgvector recovery:** Warmup errors now reset initialization so failed pgvector clients do not cascade into repeated `client.connect()` failures. **Removed:** - 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** - **Interactive init flow:** `openclaw mem0 init` supports email verification and direct API key setup. - **Unified tools:** `memory_add` and `memory_delete` replace legacy memory tools and match Mem0 naming. - **CLI commands:** Added `init`, `status`, `config`, `import`, `event list`, and `event status`. - **Modular architecture:** Extracted tools, CLI, filesystem safety, and backend modules. - **Security and tests:** Added path traversal protection, pinned dependencies, and 329 tests across 10 files. **Fixes:** - **Path traversal protection:** Added `safePath()` containment checks for skill and domain-overlay reads. - **Noise filter correction:** Restored the `Post-Compaction` pattern after an incorrect rename. **Security:** - Pinned `mem0ai` to exact `2.3.0`. **Fixes:** - **Env resolution:** Removed plugin-side env-var expansion from config because OpenClaw already resolves env references before plugin registration. **New Features:** - **CD workflow:** Added trusted-publishing release workflow. - **Plugin metadata:** Added compatibility and build metadata to `package.json`. - **License:** Added Apache-2.0 license file. **Fixes:** - **Dream gate:** Fixed cheap-first ordering, session isolation, and completion verification. - **Graceful startup:** Plugin starts cleanly when no API key is configured. **New Features:** - **Skills-based memory architecture:** Added the skill loader, memory triage skill, memory dream skill, batched extraction, and skill-aware recall. - **Dream gate:** Added idle-period memory consolidation. - **Enhanced recall:** Added `recall.ts` with improved retrieval and injection logic. - **Plugin manifest:** Added `openclaw.plugin.json` and setup helper scripts. **New Features:** - **Extraction quality:** Improved noise filtering, deduplication, and extraction instructions. **Fixes:** - Improved credential, API key, and secret detection during extraction. - Prevented standalone timestamps from being stored as memories. **New Features:** - **Trigger filtering:** Skips recall and capture for cron, heartbeat, automation, and schedule triggers. - **Subagent isolation:** Routes ephemeral subagent sessions back to the parent namespace. - **Dynamic recall thresholding:** Drops candidates below 50% of the top score. - **OSS resilience:** Adds SQLite init retry and `oss.disableHistory`. **Fixes:** - Lifecycle hooks now use `ctx.sessionKey` directly, removing a concurrent-session race. **New Features:** - **Message filtering pipeline:** Multi-stage noise removal before extraction. - **Broad recall:** Short or new-session prompts trigger secondary broad search. - **Temporal anchoring:** Extraction instructions include the current date. **Changes:** - Extraction now reads the last 20 messages and the monolithic plugin file was split into focused modules. **Fixes:** - Updated `mem0ai` for the SQLite to `better-sqlite3` migration. **New Features:** - **Multi-agent isolation:** Added per-agent memory isolation via `agentId`. - **Docs:** Added guidance for understanding `userId`. **Fixes:** - Migrated platform search to the Mem0 v2 API. **New Features:** - Added a source field for OpenClaw memory entries. **Fixes:** - Fixed auto-recall injection and auto-capture message drops. **Initial Release:** - **Memory backend:** Added Mem0 Cloud and self-hosted OSS modes for OpenClaw. - **Auto-recall:** Injects relevant memories before each turn. - **Auto-capture:** Stores facts after each turn. - **Config:** Added `topK`, `threshold`, and `apiVersion` options. **Fixes:** - **Visible command feedback:** `/mem0-remember`, `/mem0-forget`, `/mem0-pin`, and `/mem0-scope` now render persistent message blocks instead of easy-to-miss status notifications. - **Relevance-filtered search:** Search, forget, and pin commands now pass `threshold`, `top_k`, and `rerank` to avoid weak unrelated matches. **Improvements:** - **Richer command output:** Commands show scope, query, match counts, and affected memories. - **Cleaner dream flow:** `/mem0-dream` keeps the consolidation protocol hidden behind a concise status line. - **Configurable relevance floor:** `searchThreshold` defaults to `0.3` in `mem0-config.json` and is shown in `/mem0-status`. **Chores:** - Version bump to validate the new `pi-agent-plugin-checks.yml` and `pi-agent-plugin-cd.yml` release pipeline. **Initial Release:** - **Extension entry point:** Registers the `mem0_memory` tool, 8 slash commands, and auto-capture hooks. - **Agent tool:** Supports search, add, get-all, delete, and delete-all with scoped filters. - **Slash commands:** Adds `/mem0-remember`, `/mem0-forget`, `/mem0-search`, `/mem0-tour`, `/mem0-dream`, `/mem0-pin`, `/mem0-scope`, and `/mem0-status`. - **Auto-capture:** Extracts and stores memories from user and assistant messages on `agent_end`. - **Dream consolidation:** Merges duplicates, resolves contradictions, and prunes stale entries behind session, time, and memory-count gates. - **System prompt injection:** Appends `MEMORY_POLICY` before every agent turn. - **Project scoping:** Uses `git rev-parse --show-toplevel` for stable `app_id` values across monorepos. - **Scopes and categories:** Supports project, session, and global scopes plus 10 default memory categories. - **Agent skills:** Bundles `context-loader`, `remember`, `search`, `forget`, `dream`, `tour`, `pin`, and `status` skills. - **Safety:** Confirmation dialogs protect destructive commands, pins preserve memory IDs, full memory UUIDs stay visible, outputs are truncated, all tool actions respect `AbortSignal`, and shutdown releases dream locks. - **Telemetry:** Batched PostHog telemetry uses PII-safe error payloads. **Major Release**: Migrated to Vercel AI SDK v6 (`LanguageModelV3` / `ProviderV3`) and Mem0 v3 API. **Breaking Changes:** - **AI SDK v6:** Upgraded from AI SDK v5 (`LanguageModelV2`) to v6 (`LanguageModelV3`). Users must upgrade `ai` to `^6.0.199` and all `@ai-sdk/*` provider packages to `^3.x` ([#4741](https://github.com/mem0ai/mem0/pull/4741)) - **Mem0 v3 API:** Memory endpoints migrated from `/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](https://github.com/mem0ai/mem0/pull/4741)) - **Graph memory removed:** All `enable_graph`, graph prompts, and relation-extraction code removed. Graph memory is now a project-level setting on the Platform ([#4741](https://github.com/mem0ai/mem0/pull/4741)) - **Deprecated params removed:** `org_id`, `project_id`, `org_name`, `project_name`, `output_format`, `filter_memories`, `async_mode`, `enable_graph`, `version`, `api_version` removed from `Mem0ConfigSettings` ([#4741](https://github.com/mem0ai/mem0/pull/4741)) **New Features:** - **V3 provider contract:** `specificationVersion: 'v3'`, `supportedUrls` property, V3 content array in `doGenerate`, V3 stream lifecycle events in `doStream` ([#4741](https://github.com/mem0ai/mem0/pull/4741)) - **Mem0 source in responses:** Memories are attached as a `source` in `generateText`/`streamText` responses with `providerMetadata.mem0.memories` for programmatic access ([#4741](https://github.com/mem0ai/mem0/pull/4741)) - **Raw search helper:** `searchMemories()` is exported alongside `addMemories()`, `retrieveMemories()`, and `getMemories()` for callers that need raw semantic search results. - **Self-hosted API support:** `mem0ApiKey` and `host` can be passed per request, letting apps override the environment API key and point at a custom Mem0 API base URL. - **Provider coverage:** Built-in provider selection covers OpenAI, Anthropic, Google/Gemini, Groq, and Cohere through the AI SDK provider packages. - **Multimodal memory input:** File, image, Markdown, and PDF prompt parts are converted into the Mem0-compatible message shape when adding or searching memories. **Bug Fixes:** - **Async memory storage:** `addMemories` is now properly `await`ed: memories no longer silently fail to store ([#4741](https://github.com/mem0ai/mem0/pull/4741)) - **Prompt mutation:** Prompt array is now cloned before injecting memory context, preventing side effects on the caller's array ([#4741](https://github.com/mem0ai/mem0/pull/4741)) - **Null guard on content:** `doGenerate` guards against null `content` from upstream providers ([#4741](https://github.com/mem0ai/mem0/pull/4741)) - **Stream response:** `doStream` now returns the full `LanguageModelV3StreamResult` object preserving all V3 fields ([#4741](https://github.com/mem0ai/mem0/pull/4741)) - **Response normalization:** `getMemories` and `retrieveMemories` now handle both array and `{results: [...]}` envelope responses from the v3 API ([#4741](https://github.com/mem0ai/mem0/pull/4741)) **Security:** - **Dependencies:** Pinned transitive dependencies via pnpm overrides to remediate high-severity CVEs: `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:** - Removed unnecessary dependencies to make the package lighter. **New Features:** - Added file support for multimodal capabilities with memory context (v2.0.3) **Bug Fix:** - Fixed version parameter to use V2 for addition (v2.0.4) **Bug Fix:** - Fixed streaming response in the AI SDK. **New Features:** - Migration to AI SDK V5 (v2.0.0) - Added `host` param to the config (v2.0.1) **New Features:** - Added `filter_memories` param. **New Features:** - Added support for Google provider. **New Features:** - Added support for `output_format` param (v1.0.4) **Improvements:** - Added graceful failure handling when services are down (v1.0.3) **New Features:** - Added support for graph memories.