Skip to content

Distinguishing Past Records from Current Facts in AI Agent Memory

Design criteria for distinguishing an agent's summaries and records from current evidence and authority when resuming a long task.

4 min read
Filed underAI & ML

Knowledge maturity: growing

On this page5

Suppose an agent resuming a long task reads “verification complete” in a summary of an earlier run. That record describes what happened at the time, but it does not establish whether the files are the same now or whether the same checks pass. When resuming, the question is which memories can support the current decision, rather than what to remember.

Context

A model's context window is finite. Because it is difficult to include every past conversation and document in each request, information can be summarized or recorded externally and retrieved when needed. Even when a long input fits, performance on some tasks can vary with the position of relevant information. A larger window therefore does not itself guarantee that records are accurate or current. The findings of Lost in the Middle apply to the long-context question-answering and retrieval tasks evaluated in that study.

CoALA provides a framework for viewing agent memory as modules. A design can distinguish information by its role: working memory holds the current request and progress; episodic memory holds earlier runs and decisions; semantic memory holds reusable facts; and procedural memory holds recurring instructions. These four roles do not each require a separate database.

Design

When resuming work, examine a record's scope and verifiable original source before relying on its wording.

  1. Use the earlier summary to locate relevant files, decisions, and failure points. Treat a phrase such as “verification complete” as an episode from that time.
  2. Recheck the current files, applicable instructions, and execution results. If a record differs from its current source, base the decision on the current source and make the difference explicit.
  3. Retain only reusable principles as long-term knowledge. Do not promote the success of a particular run or temporary authority into a general rule.

For example, if a record says “tests passed” but dependent code has changed, that result cannot serve as evidence for the current change. A record containing a failed test and its relevant paths can still help narrow the next verification step.

Thread state and information retained across sessions also need separate treatment. The checkpointer and store in LangGraph's memory overview are examples of how that framework implements these two scopes. A storage location or namespace alone does not establish application-level user authorization, so verify the identity and access scope of the current request before reading records.

Alternatives

Keeping the entire conversation provides the original text but increases token and latency costs and includes more irrelevant context. Keeping only a summary makes the record shorter but can make omitted facts difficult to recover. Vector search can help find candidates, but similarity does not determine whether a source is current or whether the requester may read it. Choose only the files, search indexes, or databases needed for the scale and requirements of the records.

Evaluation

To evaluate these boundaries, check whether different users' records remain separate, whether current evidence takes precedence when an old summary conflicts with a current file, and whether memories without sources are marked uncertain. Reaching the same conclusion before and after resuming is insufficient: it must be possible to trace which current evidence supported the conclusion.

This evaluation procedure is a proposal, and its execution result is NOT_RUN. Improvements in memory reuse accuracy, isolation between users, cost, and latency have not been measured.

References

Continue reading

All →