v2.0.10

mem0ai/mem0v2.0.10Jun 27, 2026by whysosaket

AI Summary

The Python SDK v2.0.10 introduces the ability to manage memory expiration dates and fixes critical bugs in reranking logic, vector store compatibility, and backend integration.

Key Highlights

  • Exposes `expiration_date` on MemoryClient update methods.
  • Fixes reranker scoring to prevent score collapse.
  • Fixes scale-threshold notices for Redis and search-engine backends.
  • Escapes special characters in Valkey filters to prevent injection.

New Features

  • Exposes `expiration_date` on `MemoryClient.update()` and `AsyncMemoryClient.update()`

Full Release Notes

## Mem0 Python SDK (v2.0.10)

**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))