Skip to content

feat: add Mem0 memory integration with config, implementation, docs, tests, and dependency#598

Open
kartik-mem0 wants to merge 1 commit intoOpenBMB:mainfrom
kartik-mem0:feat/mem0-memory-store
Open

feat: add Mem0 memory integration with config, implementation, docs, tests, and dependency#598
kartik-mem0 wants to merge 1 commit intoOpenBMB:mainfrom
kartik-mem0:feat/mem0-memory-store

Conversation

@kartik-mem0
Copy link
Copy Markdown

Closes #597

What

Adds Mem0 as a new memory store plugin (type: mem0) alongside simple, file, and blackboard.

Changes

File Change
entity/configs/node/memory.py Mem0MemoryConfig dataclass with FIELD_SPECS
entity/configs/__init__.py Export Mem0MemoryConfig
runtime/node/agent/memory/mem0_memory.py NewMem0Memory(MemoryBase) using mem0ai SDK
runtime/node/agent/memory/builtin_stores.py Register mem0 store with lazy factory
pyproject.toml Add mem0ai>=1.0.9 dependency
tests/test_mem0_memory.py New — 25 unit tests
yaml_instance/demo_mem0_memory.yaml New — Example workflow
docs/user_guide/en/modules/memory.md Mem0 section + comparison table entry

Design

  • Uses mem0ai Python SDK with lazy import (no startup cost)
  • Search uses filters dict; add uses top-level kwargs (per SDK docs)
  • user_id/agent_id scoping with OR filter when both are configured
  • Agent output uses role: "assistant" per Mem0's entity-scoped memory model
  • load()/save() are no-ops — Mem0 manages persistence server-side
  • All errors are caught and logged, never propagated

Test

uv run python -m pytest tests/test_mem0_memory.py -v  # 25 pass
                                                                            

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat: Add Mem0 as a memory store plugin

1 participant