Agent memory architecture determines how AI agents store, share, and access information. In a centralized architecture, agents draw on a shared memory store, with access controls determining what each agent can see. In a federated architecture, memory is split across separate stores, each owned and managed independently. Centralized memory makes it easier for multiple agents to work from the same context, while federated memory gives greater control over how teams, domains, or trust boundaries isolate and share information.
This post compares the two approaches across consistency, latency, and governance. It gives a practical decision rule for choosing between them. And it explains how Couchbase Agent Memory implements centralized memory with scoped access.
What is agent memory?
Agent memory gives an AI agent a way to retain useful information beyond a single interaction. It can include details a user has shared, decisions made along the way, and lessons from previous tasks. This information is stored outside the model and can be retrieved when needed to inform future responses and actions. Unlike a context window, which holds information available during a particular interaction, or a RAG corpus, which provides external information for grounding responses, agent memory can preserve context and experience across sessions. This helps agents build on previous interactions instead of starting from scratch each time.
Agent memory is commonly split into short-term memory, which holds the working context of the current task, and long-term memory, which persists across sessions. The Cognitive Architectures for Language Agents (CoALA) framework divides long-term memory further into semantic memory (facts and knowledge), episodic memory (past experiences), and procedural memory (how to perform tasks). Many off-the-shelf solutions organize memory into three practical types instead. Conversational memory preserves dialogue and context within an interaction, helping an agent keep track of what’s been said and what still needs to be done. Profile memory retains information about a user across sessions, such as language preferences, product tier, or recurring issues. Semantic memory stores facts and knowledge an agent can draw on to answer questions and reason through tasks, regardless of any particular conversation.
What is agent memory architecture?
Agent memory architecture is the arrangement of memory stores, scopes, and access rules across the agents in a system. The key design decision is where memory lives and how access is managed, not which storage engine is used. The same database can support either pattern.
Regardless of the approach, every agent memory architecture needs to address four key decisions.
- Where is memory written?
- Which agents may read it?
- How are conflicting memories resolved?
- How is memory retained, expired, and deleted?
The centralized and federated patterns answer these four questions differently. Understanding the differences lets an architect choose the right one for a given system.
In a centralized agent memory architecture, multiple agents share a memory store, and permissions control which agents can access specific memories. Memory can be organized by user, session, or other scopes, allowing each agent to access only the information it’s authorized to use. Agents with access to the same scope read the same records.
Centralized memory is a strong choice for:
- One source of truth per user – Agents acting in sequence cannot diverge on facts.
- Read-after-write consistency without a sync protocol – If Agent A writes a preference, Agent B reads it immediately.
- One place to audit – Every memory write, every retrieval, and every deletion flows through one store.
- One retention and deletion path – A user deletion request reaches all of a user’s memory in a single operation.
- Easier evaluation and debugging – You can trace a retrieval result to a single record rather than reconstruct it from multiple stores.
The primary drawbacks of centralized memory are:
- Shared dependency – Every agent depends on the same store, so its capacity and availability must cover the combined load of all agents. A distributed database can spread that load across nodes, but a slowdown or outage still affects every agent.
- Strict access control requirements – A misconfigured scope can expose memories to agents that shouldn’t have access.
- Shared impact of bad writes – An incorrect or outdated memory can affect every agent that reads it.
Federated agent memory: one store per agent
In a federated agent memory architecture, each agent maintains its own memory store and explicitly controls what information it shares with other agents. There is no automatically shared memory. Agents access one another’s information through defined interfaces and permissions, making each exchange deliberate and controlled.
It’s also important to distinguish federated memory from distributed storage. Distributed storage spreads a logical data store across multiple nodes, while federated memory involves separate stores that retain independent ownership but can share information when needed. The distinction matters because the two approaches address different architectural concerns.
Federated memory is a strong choice for:
- Isolation by default – Agents can access only the memories explicitly shared with them.
- Independent memory policies – Each agent can use a schema and retention policy tailored to its domain without affecting other agents.
- Independent deployment and lifecycle – Teams can change an agent’s memory store without coordinating changes across other teams.
- Limited impact of bad writes – An incorrect or outdated memory stays within the agent’s store rather than automatically affecting every agent.
The primary drawbacks of federated memory are:
- Divergent memories – Agents can learn the same fact independently and develop conflicting versions over time.
- Fragmented user context – Understanding everything the system knows about a user requires querying every store that might contain relevant information.
- Increasing retrieval latency – Queries across multiple stores add overhead, and the slowest response can delay any operation that needs results from all of them.
- Duplicated governance effort – Each store must be audited, retained, and purged independently, with evidence that deletion requirements have been met.
Centralized vs. federated memory: the comparison
This table highlights the key trade-offs in consistency, performance, security, and operational complexity:
Consistency
Centralized memory gives authorized agents a shared view of stored information. In a federated architecture, agents can hold conflicting versions of the same fact unless the system includes a way to synchronize them. If acting on outdated or conflicting information could lead to the wrong decision, the system needs a shared store or another explicit consistency mechanism.
Latency
Centralized memory typically requires a query to one store. Federated memory may require queries to multiple stores and combining their results, which can add latency. If a request depends on every store responding, the slowest response can hold up the result. However, physical location matters too. One centralized store close to the agents may respond faster than several federated stores spread across regions.
Governance and tenancy
Governance and tenancy are where centralized and federated memory differ most in enterprise deployments.
With centralized memory, a single write log makes it easier to trace what an agent knew and when. With federated memory, reconstructing that history requires correlating logs across multiple stores, making audits more complex.
Tenancy isolation also differs. Centralized architectures rely on correctly configured access controls, offering flexibility but increasing the risk of misconfiguration. Federated architectures use separate storage boundaries to strengthen isolation, but changing those boundaries can be more difficult as requirements evolve.
Deletion and retention add another challenge. Federated architectures must coordinate deletion across every store holding the relevant memory and verify completion. In regulated environments, meeting data-erasure requirements means designing for this process right from the start.
Before choosing an architecture, teams should identify which memory types may contain regulated data and which agents can access them. These decisions will shape access controls in a centralized design and agent-to-agent sharing rules in a federated design.
How to choose an agent memory architecture
The essence of the decision rule is simple: Share memory when agents serve the same user in the same application and act on the same facts. Separate memory when agents cross a tenant, customer, or regulatory boundary.
This five-question checklist helps apply that rule to a specific system:
- How many agents write memory, and do they write about the same subject? If multiple agents update the same user facts, a shared store avoids divergence.
- Do agents cross a tenant, customer, or regulatory boundary? If yes, separate stores provide isolation that scope configuration alone cannot guarantee.
- How stale can one agent’s view of another agent’s memory be? If staleness causes incorrect actions, the system needs a shared store for those facts.
- Who is accountable for deleting a user’s memory, and can they prove it happened? If one team must prove deletion across the whole system, a single store is easier to audit.
- Do separate teams own the agents and their release cycles? If yes, federated stores allow independent deployment without coordination.
Ultimately, the choice isn’t simply centralized or federated. It’s about deciding what information agents need to share and what should remain private. Most systems with more than a handful of agents converge on a hybrid approach. A hybrid architecture combines private memory for agent-specific state and shared memory for information that agents need across tasks, such as user preferences and session history.
Implementing centralized memory with Couchbase Agent Memory
Couchbase Agent Memory is the Agent Memory Service in the Couchbase AI Data Plane™ and follows the centralized pattern: one shared store with scoped access. Memory is isolated at the user and session level, so one user can’t reach another user’s memory. Agents within the same application can share a user’s memories, and annotations (key-value tags on memory blocks) let each agent label what it writes and filter what it retrieves. Each API key or identity-provider token carries a read, write, or admin access level.
The memory structure organizes records by user, then session within each user, then memory blocks within sessions. Each memory block holds the original message or fact, its embedding vector, an LLM-generated summary, and a timestamp. This structure supports three memory types: conversational memory (session-scoped dialog history), profile memory (long-term facts and preferences about a user), and semantic memory (long-term knowledge and facts used for grounding).
Retrieval is semantic. Memory blocks are embedded and searched by vector similarity, with timestamps available for time-range filtering and conflict resolution. Search covers the current session by default and can widen to all of a user’s sessions. Retention is set with time-to-live (TTL) values at the server, session, or memory block level, and deleting a user removes all of that user’s sessions and memory blocks in one call. Applications connect through the Agent Memory Python SDK or a REST API. Agent Memory is validated with LangGraph, CrewAI, LlamaIndex, and Strands Agents, and the REST API works with other agent frameworks.
Agent Memory does not share memory across users, stream memory changes in real time, store non-text content, or host models. It also leaves reasoning to the agent: Agent Memory stores and retrieves memories, and the agent decides how to use them.
For a hybrid design, Agent Memory can hold shared, user-level memory while each agent keeps its private working state in its own store. Each Agent Memory server connects to one bucket, and Couchbase Capella supports one Agent Memory server per operational cluster, so teams that need hard storage boundaries between tenants should plan for separate Agent Memory deployments.
- Read the Agent Memory documentation
- Learn about the Couchbase AI Data Plane
- Start building on Couchbase Capella
FAQs
What is agent memory architecture? Agent memory architecture describes how memory is stored, scoped, and governed by access rules across agents in a system. It defines where memory is written, which agents can read it, how the system resolves conflicting memories, and how it retains and deletes memory. The two primary patterns are centralized (one shared store with scoped access) and federated (one store per agent with explicit interfaces between them).
What is centralized agent memory? Centralized agent memory is a pattern in which every agent reads and writes to one shared memory store, with access limited by user and session and scoped by user, session, or other access rules rather than storage boundaries. It provides a single source of truth for user context, read-after-write consistency without a sync protocol, and a single audit and deletion path. The trade-offs are shared infrastructure that can become a bottleneck and the need to configure access permissions correctly.
What is federated agent memory? Federated agent memory is a pattern in which each agent owns its own memory store and exposes what other agents may read through a defined interface. There is no implicit shared state. It provides isolation by default, independent deployment per agent team, and a bounded blast radius when one agent writes badly. The trade-offs are that agents can end up with conflicting information, queries across multiple stores can take longer, and managing access, audits, and data deletion becomes more complicated.
Should AI agents share memory? Agents should share memory when they serve the same user in the same application, act on the same facts, and stale copies would cause incorrect actions. Keep memory separate when agents cross a tenant, customer, or regulatory boundary, or when separate teams own the agents and need independent deployment. Most multi-agent systems use a hybrid approach with shared user-level memory for cross-agent context and private per-agent stores for domain-specific working state.
How do AI agents share memory? Through a shared store with scoped access, or by querying another agent’s store through a defined interface. Both approaches require an explicit access rule. In a centralized design, scope configuration governs who reads what. In a federated design, an interface contract governs what one agent exposes to another. Implicit shared state, where any agent can read any memory without a rule, is an antipattern in both regulated and multi-tenant environments.
What’s the difference between centralized, distributed, and federated agent memory? Centralized means one logical memory store that all agents share, with access controlled by scope. Distributed means one logical store spread across nodes for availability or scale, but still treated as a single store by agents. Federated means separate stores under separate ownership that cooperate through explicit interfaces. Distributed describes the infrastructure topology of a store. Federated describes the ownership and access model across stores.
Does agent memory need a vector database? Retrieval from agent memory is typically semantic, so memory blocks are embedded and searched by vector similarity. This means the memory store needs vector search capability, but it doesn’t need to be a standalone vector database. The same store that holds the memory blocks can also hold the embeddings and serve similarity queries, which is what Couchbase Agent Memory does. Agent Memory stores memory blocks in a Couchbase bucket and automatically creates a Search vector index for them, so similarity queries run through Couchbase Vector Search, with no separate vector store required.












