Mem0 mem0-strands-v0.1.0

mem0-strands-v0.1.0

Mem0 Strands Integration (v0.1.0)

Added 7
  • mem0-strands package providing a native MemoryStore that integrates Mem0 with Strands Agents MemoryManager
  • Automatic recall and injection via Mem0MemoryStore.search() that runs every turn through MemoryManager to prepend relevant memories to prompts
  • Server-side extraction that renders conversation turns to text and uses Mem0's extraction pipeline with infer=True to avoid extra client-side model calls
  • Verbatim writes via add() method that stores a single fact exactly as given with infer=False
  • Entity scoping support for user_id, agent_id, run_id, and app_id with validation at construction time
  • Support for both hosted Mem0 Platform via api_key and self-hosted Mem0 OSS backend via config dict
  • Non-blocking construction with lazy initialization of Mem0 client on first use inside asyncio.to_thread

From Mem0

Initial release of mem0-strands, a native MemoryStore that plugs Mem0 into the Strands Agents MemoryManager (#7021)

New Features:

  • Automatic recall and injection: Mem0MemoryStore.search() runs every turn through the MemoryManager, so relevant memories are searched and prepended to the prompt with no explicit tool call required.

  • Server-side extraction: add_messages() renders raw conversation turns to text and hands them to Mem0's own extraction pipeline (infer=True), so enabling extraction skips an extra client-side model call to distill facts first.

  • Verbatim writes: add() stores a single fact exactly as given (infer=False), the sink used by the add_memory tool or a client-side extractor.

  • Entity scoping: Accepts user_id, agent_id, run_id, and app_id; at least one is required, and mixing the platform-only app_id with a self-hosted config raises at construction instead of failing on the first write.

  • Hosted or self-hosted: Defaults to the hosted Mem0 Platform via api_key (or $MEM0_API_KEY), or pass a config dict for a self-hosted Mem0 OSS backend.

  • Non-blocking construction: The underlying Mem0 client is built lazily on first use inside asyncio.to_thread, so API-key validation and OSS embedder/vector-store setup never block the event loop.

    Mem0MemoryStore is the automatic-recall store for the MemoryManager. For a model-called tool instead, use the mem0_memory tool from strands-agents-tools; both share the same Mem0 backend and namespace. See Strands Agents for setup.

View original

Upgraded? How did it go?

Discussion