Quick Start
1
Simple Usage
2
With Custom Embedder
Configuration Options
MultiAgentMemoryConfig SDK Reference
Full parameter reference for MultiAgentMemoryConfig
How It Works
Configuration Options
Full list of options, types, and defaults —
MultiAgentMemoryConfigCommon Patterns
Pattern 1 — Project-scoped research memory
Best Practices
Always set user_id for project isolation
Always set user_id for project isolation
Set
user_id to a unique project or session identifier to prevent memory from bleeding between unrelated workflows. Without user_id, all workflows share the same memory namespace.Order tasks to build context
Order tasks to build context
Tasks run in order by default. Place information-gathering tasks first and synthesis/writing tasks later so downstream agents have full context from upstream agents.
Isolating collections per agent
When several agents share onerag_db_path, give each a distinct collection_name so they coexist and can be reset independently.
collection_name defaults to "memory_store". See Memory Configuration.
Concurrency and shared user_id
When multiple agents share the sameuser_id and back FileMemory (or the file-backed learn store) on the same paths, concurrent writes are now merge-safe: each mutation re-reads the on-disk state under the instance lock before appending, so two agents recording facts against the same user_id no longer overwrite each other’s entries. This applies to add_short_term, add_long_term, add_entity, auto-promotion to long-term memory, and learn/stores.py BaseStore.add.
This is a bug fix, not a new API — no configuration change is required. If you previously worked around lost writes by serializing agent runs or by giving agents distinct user_ids, you can remove that workaround where sharing was actually the goal.
File-based memory serializes writes per-process. If you run agents across separate processes on the same on-disk memory files, the per-process lock does not cover cross-process races — use per-process
user_id scoping or a shared memory provider (RAG/graph) for cross-process sharing.Related
Advanced Memory
Single-agent memory configuration
Multi-Agent Planning
Plan tasks before executing them
Multi-Agent Hooks
Intercept task lifecycle events
Learn
Continuous learning from conversations

