---
title: "The shared memory of AI agents: what we retain, who can read it, and when we forget"
description: "Agents Shared Memory explained in practice: context, provenance, access, concurrent updates, and information expiration."
canonical: https://i8.ro/en/blog/shared-memory-for-ai-agents-what-to-keep-who-can-read-and-when-to-forget
---

# The shared memory of AI agents: what we retain, who can read it, and when we forget

> Agents Shared Memory explained in practice: context, provenance, access, concurrent updates, and information expiration.

Source: https://i8.ro/en/blog/shared-memory-for-ai-agents-what-to-keep-who-can-read-and-when-to-forget

**Series II: From infrastructure to agentic projects in production. Episode 10 of 20.**

In a project with multiple AI agents, the next agent needs to be able to find relevant decisions without receiving the entire conversation history. But a statement repeated three times is still just a statement—it doesn’t automatically become an approved decision. For the fictitious B2B portal in this series, the key question is: what information is worth preserving between tasks, and who confirms its validity?

## Four things we too easily call “memory”

**Conversation context** is the text available to the agent in the current session. It helps continue the dialogue but may contain abandoned ideas and contradictory instructions. **Execution state** keeps track of the current step in a flow; a *checkpoint* is an intermediate save point from which the flow can be resumed. It doesn't prove that all statements in the flow are correct.

**Knowledge base** holds documents, procedures, and project specifications, each with their own versions and owners. **Persistent shared memory** selectively retains reusable conclusions across sessions: a technical decision, a confirmed limitation, or the result of a test. “Shared” means authorized agents can consult it—not that every agent can read or write anything.

The LangGraph documentation separates short-term memory, which is tied to the conversation thread, from long-term memory that’s available across conversations. This separation is one way to implement things—it’s not an obligation to use that product. The RAG method can retrieve relevant passages, but the relevance of a search neither determines access rights nor proves a passage is true.

## The main decision: we promote information, not transcripts

The proposal for the portal is to store a record only if it will influence a later decision and can be verified at the source. A development agent may propose an entry, but changes affecting API contracts, security, or client data require validation by the designated owner. Conversely, a working hypothesis can remain scoped to a task, kept short-term, and not added to active memory.

For example, the team decides that documents uploaded to the portal are visible only to the organization that sent them. This is a confirmed rule if there’s an approved specification and tests verifying it. A message like “we’ll probably allow organization-to-organization sharing” is just a hypothesis. Agents developing the portal shouldn’t treat it as a rule. If, later, the portal includes agents for end-users, they will have a separate memory, subject to the rights of each organization.

A minimal record might include: the project and subject ID, the precise statement, its type (decision, finding, hypothesis), the source with version or commit reference, the proposer, the validator, the validation date, the record version, and the review date. **Provenance** is the chain from the statement to the original document or test. A bare link without version can become insufficient after the document changes.

We do not store passwords, tokens, unnecessary personal data, or entire copies of confidential documents just for easier searches. The record can point to the authorized location of the source. Sensitive data stays in systems designed for it, with their own policies for access and retention.

## Who can read and who can edit

A *namespace* is a logical space grouping records—by project and organization, for example. It helps with structure, but its name is not a security barrier. The app must check identity and rights before each read, search, write, or delete. In a portal with different clients, filtering only in the agent’s prompt isn’t enough—control needs to be enforced in the service delivering the data.

For the agents building the app, we can grant read access to the project’s technical decisions and proposal rights for new entries. Approval remains with the domain owner. For an agent integrated into the portal, rights derive from the user and organization it serves; it doesn’t get internal development notes by default. We record who read or changed an important record and the reason for the action, according to audit policy.

This is a design rule, not a function guaranteed by any particular memory store. The conceptual document from NIST in February 2026 covers agent identification, authorization, delegation, and traceability of actions. It’s an exploratory document, not certification of a specific architecture. The project’s policy must be implemented and tested in the chosen systems.

## What happens when two agents change the same record

Suppose one agent updates an access rule after a spec is approved, while another is working from an older checkpoint. Without controls, the latest write might revert to an outdated version. A proposed solution is optimistic versioning: the reader gets the version number, and the server only accepts changes if that version is still current. On conflict, agents re-read the sources and request a decision—without automatically merging two incompatible rules.

Active memory indicates one authoritative version for each decision. Old variants can stay in the change log for auditing, but aren’t given to agents as current instructions. If a source document changes, its record enters review. The system doesn’t assume validity just because the same sentence appears in several messages.

## When we review, expire, and forget

Each record gets an owner and a review date appropriate to its subject. A decision about the API contract is reviewed when the contract version changes; a note about a temporary bug can expire when the incident closes. The review date doesn’t always mean immediate deletion—it means the record stops being used automatically until checked. The proposed states are: proposed, validated, under review, replaced, and withdrawn.

Corrections must also reach the search index, cache, and derived summaries—or else an old version can reappear. Deletion from backup copies follows their retention policy; that’s why we avoid storing data that shouldn’t be remembered in the first place. An academic study published as a preprint in June 2026 shows that data entered through regular channels can contaminate an agent’s persistent memory. The result points to a design risk, without proving that every implementation will be compromised.

For the sample project, the practical outcome is a small registry of decisions with sources and review, separate from conversations and client data. The team can start with a few manually approved records, test what each role sees, and simulate a version conflict. Only then is it worth automating how new memories are proposed. The next episode will use these rules to evaluate what a programming agent can do under real-world project conditions.

## Sources

- [LangGraph, Memory: short- and long-term memory](https://docs.langchain.com/oss/python/langgraph/add-memory)
- [LangGraph, Persistence: checkpoints and retention](https://docs.langchain.com/oss/python/langgraph/persistence)
- [NIST NCCoE, Accelerating the Adoption of Software and AI Agent Identity and Authorization, conceptual document, February 2026](https://www.nccoe.nist.gov/sites/default/files/2026-02/accelerating-the-adoption-of-software-and-ai-agent-identity-and-authorization-concept-paper.pdf)
- [Dash et al., From Untrusted Input to Trusted Memory, preprint, June 2026](https://arxiv.org/abs/2606.04329)
