Skip to main content
Multi-Agent Memory gives all agents in a workflow access to shared memory, so knowledge discovered by one agent is available to others.
The user runs a multi-agent workflow; all agents read and write shared memory under one user id.

Quick Start

1

Simple Usage

2

With Custom Embedder


Configuration Options

MultiAgentMemoryConfig SDK Reference

Full parameter reference for MultiAgentMemoryConfig
Precedence ladder:

How It Works


Configuration Options

Full list of options, types, and defaults — MultiAgentMemoryConfig

Common Patterns

Pattern 1 — Project-scoped research memory


Best Practices

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.
Agents that intentionally share a user_id write safely under one process — see Concurrency and shared user_id.
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 one rag_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 same user_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.
For hierarchical runs that share memory, see how the hierarchical process surfaces the final worker task’s output.

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