Skip to main content

Multi-Agent Memory

When you have multiple agents working together — whether in a CrewAI crew, a LangGraph workflow, or a custom orchestrator — they often need to share knowledge. This guide covers patterns for memory sharing in Z3rno.

How Sharing Works

Z3rno scopes memories by agent_id within an organisation. To share memory between agents, you have two options:
  1. Same agent_id — Multiple agents read/write the same memory space.
  2. Cross-agent recall — Agents have their own memory spaces but can query other agents’ memories.

Pattern 1: Shared Memory Space

The simplest sharing pattern. All agents use the same agent_id, creating a single shared memory pool.
When to use: Agents working on the same task that need full visibility into each other’s findings. Good for pipelines where one agent’s output feeds directly into another.

Pattern 2: Isolated Agents with Cross-Query

Each agent maintains its own memory space. When collaboration is needed, an orchestrator queries across agent memories.
When to use: Agents that are semi-independent and only need occasional access to each other’s knowledge. Good when you want to maintain clear ownership of memories.

Pattern 3: Hierarchical Memory

Agents have private memories plus access to a shared organizational knowledge base.

Pattern 4: Message-Passing Memory

Agents communicate by storing messages in memory that other agents poll for.

Pattern 5: Session-Scoped Collaboration

Agents share working memory within a session, then memories consolidate when the session ends.

Choosing a Pattern

Next Steps