Guides · Multi-agent
How to Share Memory Across Multiple Agents
Share memory across agents with a common store, per-agent namespaces and conflict policies — so teams of agents coordinate without overwriting each other’s knowledge.
Agent team
Patterns
Multi-agent shared memory patterns
| Pattern | How it works | Best for |
|---|---|---|
| Blackboard | Central board all agents read/write | Research + writing teams |
| Coordinator-writer | Lead agent owns writes; workers read | Low-conflict task pipelines |
| Shared graph | Temporal KG with agent provenance | CRM, evolving team knowledge |
| Event-sourced | Agents publish events; memory projects state | High-scale, eventual consistency |
Implementation
Implementation steps
- Choose store — Engram (Weaviate), Mem0, Zep graph, Redis pub/sub or LangGraph shared store
- Namespace design — org_id + team_id + agent_id metadata on every write
- Write permissions — coordinator-only vs all-agents-write
- Conflict policy — last-write-wins, versioning or temporal invalidation (Zep)
- Observability — log writes with agent_id, trace IDs, audit trail
Frameworks
Framework notes
- Engram — scoped collections per team; multi-agent state templates on Weaviate roadmap (June 2026)
- LangGraph — shared store with thread/namespace scoping; pair with LangMem for LTM
- Zep — org-level temporal graph with agent provenance on edges
- Mem0 — org_id namespace; multiple agents share org memory
- Redis — pub/sub for real-time memory sync across workers
FAQ
Frequently asked questions
Should all agents use the same memory store?
Yes for shared team knowledge — one store with namespace metadata (org_id, team_id, agent_id). Per-user private memory uses separate user_id scoping on top.
How do you handle race conditions in shared agent memory?
Coordinator write locks, optimistic versioning, or temporal invalidation (Zep). Avoid uncoordinated last-write-wins on high-stakes facts.
How does Zep support multi-agent memory?
Org-level temporal graph with agent provenance on edges. Bi-temporal invalidation resolves conflicts. LongMemEval +18.5% vs baseline (Rasmussen et al., 2025).
Shared memory for coding agent teams?
Blackboard pattern: planner writes task spec, coder reads constraints, reviewer writes feedback. See coding agents use case.
Shared memory vs message passing only?
Message passing is ephemeral; shared memory persists facts agents can retrieve later without re-deriving. Use both: messages for coordination, memory for durable state.
How do you benchmark multi-agent memory?
Test recall@k when agent B needs facts written by agent A. Run conflict scenarios in CI. See memory metrics.