Shared Memory for Multi-Agent Systems: Agent Domains, Shared Context, and Explicit Boundaries
TL;DR
- Shared agent memory is persistent context written to a common, named memory space so multiple agents can retrieve the same project or team knowledge across sessions.
- Agent protocols such as A2A coordinate work, but A2A explicitly describes collaboration "without needing access to each other's internal state, memory, or tools." Memory needs its own substrate. A2A specification
- A practical pattern is domain-scoped memory: each agent writes its working notes to an
agent:*domain and shared context toproject:*orteam:*domains. Mnemoverse multi-tenant docs- Sharing is explicit. Agents share memory by writing to common domains that other agents read. A domain organizes memory but does not restrict access: every agent with the account's key can read every domain, and the account is the boundary. Agent framework use case
Shared agent memory is persistent context written to a common, named memory space so multiple agents can retrieve the same project or team knowledge across sessions.
That definition matters because multi-agent systems often confuse coordination with memory. A task protocol can hand work from one agent to another. It can expose capabilities. It can carry messages. It does not automatically preserve the findings, preferences, decisions, or failed attempts that agents need later.
The A2A specification makes this boundary explicit. It says agents can collaborate "without needing access to each other's internal state, memory, or tools." A2A specification
That is a good protocol property. It protects opaque execution. It also leaves a separate architecture question: where does durable, cross-agent context live?
Why multi-agent systems need shared memory
Multi-agent memory — persistent context that several agents can write, read, and govern across sessions — becomes necessary the moment agents specialize. A researcher agent gathers facts. A planner turns them into a sequence. A developer agent implements. A reviewer checks the result. If each agent keeps only session-local context, the system must keep replaying discoveries through prompts, messages, or external logs.
The SAMEP paper, arXiv:2507.10562, states the issue directly: "Current AI agent architectures suffer from ephemeral memory limitations, preventing effective collaboration and knowledge sharing across sessions and agent boundaries." SAMEP, arXiv:2507.10562
A later architecture paper, arXiv:2603.10062, frames multi-agent memory as an open problem. It calls out "cache sharing across agents and structured memory access control," argues that "the most pressing open challenge is multi-agent memory consistency," and describes MCP-level connectivity as necessary—but not sufficient. arXiv:2603.10062
That is the wedge for shared memory. It is not a replacement for agent protocols. It is the substrate that lets agents remember what protocols helped them coordinate.
Agent vs shared memory
Domain-scoped memory is memory filed under named domains, so a system can tell an agent's working context from shared project, team, or tenant context.
The useful split is simple:
- working memory for each agent;
- shared project or team memory for coordinated work;
- the account boundary, which keeps one account's memory out of another's reach.
The Mnemoverse multi-tenant documentation describes this pattern for organizing memory between agents. Each agent writes its working notes to its own domain, such as agent:researcher or agent:writer. Shared context goes to project:* or team:* domains that all participating agents read. Multi-tenant memory docs
The split is a convention the application keeps, not an access rule: every agent that holds the account's key can read every domain, and a read without a domain covers all of them.
That gives agents different scopes for different kinds of knowledge.
A researcher might store intermediate notes in agent:researcher. A writer might store drafting preferences in agent:writer. Both can write accepted project facts to project:acme, if that is the shared project domain. The shared domain is not a side effect of two agents existing in the same application. It is a named coordination point.
The key rule is:
Agents share memory by writing to common domains —
project:*,team:*— that other agents read. Sharing requires explicit domain coordination, and so does staying apart: an agent sees another agent's notes when it reads that domain, or reads without one.
This rule prevents a common failure mode. Developers sometimes expect multi-agent memory to act like automatic telepathy. That is not the documented pattern. Agents must be pointed at a shared domain.
How agents share memory
A shared-memory design needs two paths: write paths and read paths.
The write path decides which facts belong to an agent's working memory and which facts should become shared context. The read path decides which domains an agent checks, and in what order.
The Mnemoverse documentation suggests a read order, one call per domain: own → project → team → tenant. Multi-tenant memory docs
That order puts the most specific context first while still allowing broader context to inform work. An agent can first consult its own memory, then project memory, then team memory, then tenant memory. The order also avoids treating every memory as equally relevant. It is an order the agent follows, not a scope the server enforces: domain names match exactly, and nothing stops a read of any other domain.
A minimal SDK-shaped example looks like this:
from mnemoverse import MnemoClient
client = MnemoClient(api_key="...")
# Working memory for the researcher agent.
client.write(
"The customer prefers short implementation notes with explicit tradeoffs.",
domain="agent:researcher",
)
# Shared project context for other participating agents.
client.write(
"The API integration should prioritize explicit error handling.",
domain="project:acme",
)
# A developer agent can read from the shared project domain.
results = client.read(
query="What project constraints should guide the integration?",
domain="project:acme",
)The method shapes shown here follow the documented SDK surface: MnemoClient, write(text, domain="agent:researcher"), read(query, domain="project:acme"), and feedback calls shaped as feedback(atom_ids=[...], outcome=..., query_concepts=...).
The important part is not the syntax. It is the convention. The researcher's domain does not become the developer's context unless the developer reads it; the shared project:* domain does. Nothing enforces that: the developer agent can read agent:researcher too if it asks for it.
The agent framework documentation says this directly in its FAQ: "Yes. Point them at the same domain…" It also states that "any agent's findings become available to the others — a researcher agent's discovery is readable by a developer agent later." Agent framework use case
Boundaries
Shared memory only works if its boundaries are explicit, and if the designer knows which of them the system enforces. Without boundaries, a shared-memory system becomes a leakage risk. Without sharing, it becomes a set of isolated notebooks.
The documented Mnemoverse security boundary is the account, the organization_id every key is bound to. The security documentation states: "Every API key is bound to a unique organization_id. All database queries are scoped to your organization. There is no way to access another tenant's private data." It also states: "No cross-tenant learning. Learned concept associations and feedback ratings are per-tenant." The one deliberate exception the security page documents is Rooms — an opt-in, membership-checked shared bucket. Security docs
That gives three practical rules.
First, shared memory is not blanket cross-organization federation. Queries against your own domains stay scoped to your account. The documented cross-account path is Rooms — an explicit, membership-checked shared pool addressed via an xroom:<room_id> domain, a separate bucket that members opt into rather than a cross-org query over anyone's private memory.
Second, shared memory is not automatic agent-to-agent propagation. The agent framework docs describe sharing by pointing agents at the same domain. Agent framework use case
Third, a domain is not an access boundary. Inside one account every key reaches every domain: a read without a domain covers all of them, and an agent can read any domain it names. Agents that must not see each other's memory need separate accounts, and what they share across accounts goes through a room. Multi-tenant memory docs
These boundaries are useful for engineering. They make behavior reviewable. They also force the application designer to decide which observations become shared memory and which remain an agent's working context.
The multi-tenant documentation says the same API and domain model scales from two agents to hundreds of agents without an architectural change. Multi-tenant memory docs The mechanism stays the same: agent domains for agent-local work, shared domains for coordinated context, and the account as the boundary between organizations.
Memory vs A2A/MCP
The boundary here is simple: coordination protocols move work; a memory substrate persists context.
A2A sits on the coordination side of that line. Its specification says agents collaborate without requiring access to each other's internal state, memory, or tools. A2A specification That is a strong reason not to treat A2A as shared memory.
MCP belongs in the integration conversation rather than the memory-substrate conversation. For a narrower discussion of memory exposed through MCP, see Memory MCP. For the protocol comparison, see A2A vs MCP. For the A2A-specific background, see A2A Protocol Explained.
The clean architecture is not "A2A or memory." It is:
- use protocols to coordinate agent work;
- use memory domains to persist context;
- use explicit read and write policy to control sharing.
That split matches the concern in arXiv:2603.10062 that MCP-level context I/O is necessary—but not sufficient when the problem includes cache sharing, structured memory access control, and unresolved multi-agent memory consistency. arXiv:2603.10062
A practical implementation checklist
Use this checklist when designing shared memory for AI agents:
Name the agent domains. Give each agent a working-memory domain of its own, such as
agent:researcheroragent:writer. Multi-tenant memory docsName the shared domains. Decide which project or team domains agents can read, such as
project:*orteam:*. Multi-tenant memory docsWrite shared facts intentionally. Do not assume that one agent's working memory becomes another agent's context. The documented pattern requires pointing agents at the same domain. Agent framework use case
Read in a deliberate order. Use the documented order, one call per domain: own → project → team → tenant. A read without a domain covers the whole account, so use one only when the agent should see everything. Multi-tenant memory docs
Keep the account boundary separate from agent sharing. Accounts are kept apart through the account each API key is bound to, and learning updates stay in the account. Domains inside an account are labels, not access boundaries. Security docs
Treat protocols and memory as different layers of responsibility. A2A coordinates agents without requiring access to internal memory. Shared memory persists cross-agent context. A2A specification
Mnemoverse's documented pattern is one concrete implementation of this design. The API overview is the right entry point for connection details, while the multi-tenant and agent-framework docs describe the domain model used for shared multi-agent memory. API overview
Common questions
Do AI agents share memory?
They can share memory when the system gives them an explicit shared substrate. In the domain pattern, each agent writes its working notes to a domain of its own and shared context to project or team domains that the other agents read.
What is shared memory for AI agents?
Shared memory for AI agents is persistent context written to a common, named memory space so multiple agents can retrieve the same project or team knowledge across sessions.
How is multi-agent memory different from A2A?
A2A coordinates collaboration while preserving opaque execution; its specification says agents collaborate without needing access to each other's internal state, memory, or tools. Shared memory is a separate substrate for persisted context.
How do agent and shared memory domains work?
Each agent writes its working notes to its own domain, such as agent:researcher or agent:writer. Shared context goes to project:* or team:* domains that participating agents read explicitly. The split organizes memory and does not restrict access: every agent that holds the account's key can read every domain.
Can one query read every memory domain at once?
Yes. In Mnemoverse a read without a domain covers every domain in the account, and POST /memory/query takes a list of domains. The documented pattern still reads one domain per call, in order: the agent's own domain, then project, team and tenant domains, so the most specific context comes first.
Does shared memory mean cross-tenant learning?
No. Every API key is bound to an organization, queries against your own domains are scoped to that organization, and Hebbian associations and valence updates are per-tenant. The documented cross-account path is Rooms — an explicit, membership-checked shared pool (an xroom:<room_id> domain) that members opt into.
Sources
Related
- A2A Protocol Explained
- A2A vs MCP
- A2A Integration How-To (Python)
- Multi-tenant memory and domains
- Agent framework memory use cases
- Memory MCP
- Rooms — shared memory across accounts
- Mnemoverse API overview
- Shared Memory Poisoning: One Bad Write, Many Agents
Mnemoverse Library — persistent memory for AI agents. Written by Edward Izgorodin.
