Multi-Agent Systems with Shared Memory
Modern AI applications often require multiple specialized agents working together. Memori enables seamless multi-agent coordination by providing shared memory spaces where agents can contribute knowledge and recall context from other agents.Why Multi-Agent Memory Matters
Multi-agent systems fail when agents can’t share context:- Information silos — Each agent starts from scratch
- Redundant work — Agents duplicate research and analysis
- Lost context — Agent handoffs lose critical information
- Inconsistent responses — Agents contradict each other
- Facts are shared across all agents for the same entity
- Process attribution tracks which agent contributed what
- Conversations are isolated per agent while facts remain shared
- Context flows seamlessly during agent handoffs
Memory Sharing Model
Memori’s multi-agent memory model uses three key concepts:What’s Shared vs. Isolated
| Data Type | Scope | Example |
|---|---|---|
| Facts | Shared across all processes for same entity | ”Uses PostgreSQL”, “Located in Paris” |
| Preferences | Shared per entity | ”Prefers TypeScript”, “Likes dark mode” |
| Skills | Shared per entity | ”Python developer”, “AWS certified” |
| Attributes | Isolated per process | ”Research agent handles data analysis” |
| Conversations | Isolated per entity + process + session | Individual agent conversation history |
| Knowledge Graph | Shared per entity | Relationships and semantic connections |
Use Case 1: Research + Analysis Pipeline
Build a pipeline where a research agent gathers information and an analysis agent processes it.Use Case 2: Customer Support Agent Handoff
Build a support system where specialized agents handle different issue types with shared customer context.Use Case 3: Development Team Agents
Build a team of agents that collaborate on software development tasks.Use Case 4: Parallel Agent Execution
Run multiple agents in parallel with shared memory context.Agent Communication Patterns
Sequential Pipeline
Agents process tasks in sequence, each building on the previous agent’s work.
Parallel Execution
Multiple agents work simultaneously, then a synthesis agent combines results.
Specialist Handoff
General agent triages, then hands off to specialists who share context.
Collaborative Team
Multiple agents collaborate on a shared goal, each contributing expertise.
Best Practices
Use Descriptive Process IDs
Use Descriptive Process IDs
Give each agent a clear, descriptive process ID:
Share Entity ID for Collaboration
Share Entity ID for Collaboration
Isolate with Different Entity IDs
Isolate with Different Entity IDs
Use different entity IDs when agents should NOT share context:
Wait for Augmentation Between Agent Handoffs
Wait for Augmentation Between Agent Handoffs
Ensure memory processing completes before critical handoffs:This is especially important in short-lived scripts or when immediate handoff is critical.
Monitoring Multi-Agent Systems
Use the Memori Dashboard to monitor agent collaboration:- Graph Explorer — Visualize how facts flow between agents
- Process View — See which agent contributed which memories
- Entity Timeline — Track how context builds over time
- Session History — Debug agent handoffs and context gaps
Example: Complete Multi-Agent System
Here’s a complete example combining multiple patterns:Next Steps
AI Agents
Learn single-agent patterns and best practices
Copilot Applications
Build AI copilots with persistent context
Knowledge Graph
Understand how agent memories connect
Multi-User Support
Learn about memory isolation and sharing