What should the agent preserve, and what must it forget?
The quality of an agent's memory is determined by the meaning, origin, and validity of the stored information; its quantity tells us little. The task of design is to ensure that fact, inference, obsolescence, and deletion are distinct operations.
How this was made: this essay was written by the author's own research and analysis system from the cited sources; Zoltán Varga edited the topic, structure and final text. The cited works are the source of its factual claims.
The promise of a remembering AI assistant is continuity: it keeps track of ongoing projects, recognises recurring considerations, and in the next conversation already seeks to continue the joint work. I consider the other side of this promise the more difficult question: the situation where memories are partly inaccurate, have changed in the meantime, or were originally only assumptions. In such cases, the system transfers its errors from one conversation to the next just as reliably as it transfers its knowledge.
A developer requesting an urgent bug fix asks for a short answer, without explanation or tests. The assistant turns this into a lasting preference, then narrows the analysis to a few lines for every subsequent task. The user's instruction for one specific situation and the general picture formed of the user gradually diverge. The hypothetical example shows that the quality of memory is determined not only by the quantity of stored information but also by its meaning, origin, and validity.
Memory integrates several types of operations
The 2024 study by Theodore Sumers and colleagues, Cognitive Architectures for Language Agents, describes language agents within the CoALA framework as the interplay of memory components, internal and external actions, and decision processes. The work draws on cognitive science and earlier results from symbolic AI to build an organising architecture. In this approach, memory is interesting because the agent can search it, modify it, and use it to select the next action 1. Zeyu Zhang and colleagues' 2025 survey, A Survey on the Memory Mechanism of Large Language Model-based Agents, identifies the same component as what carries long, complex agent-environment interactions, and also notes that the proposed memory mechanisms have appeared in scattered form, without common design patterns 2.
From an engineering perspective, it is worth distinguishing between the conversation text currently available, separately stored and retrievable entries, and patterns formed in the model's parameters. Adding a conversational memory usually alters the storage and retrieval built around it, whereas modifying the model's weights is a distinct training operation. On the user interface, the same expression 'I remember' easily obscures these differences. Chip Huyen's book AI Engineering defines memory as a set of mechanisms that enable the model to retain and use information, highlighting two application types: a retrieval-based system whose extended context grows turn by turn during searches, and a multi-step agent. According to Huyen's example, an AI coach is practically unusable if the user must recount their entire life story every time 3.
So when designing a product, the first thing to clarify is what work memory should do. A customer service system must track the status of the case, a research assistant the relationship between sources and claims, and a coding agent the conventions of the repository and the reasons for earlier decisions. In each case the right memory treats different information as important, and I think a good share of later failures stem from this decision being left unstated.
A summary made from experience is a new claim
Joon Sung Park and colleagues' 2023 study, Generative Agents: Interactive Simulacra of Human Behavior, introduced simulated agents that formed higher-level summaries from observations stored in natural language, then retrieved these for their plans. In an environment with twenty-five agents, the authors examined the plausibility of the behaviour and the role of certain elements of the architecture. The study provided an important example of linking observation, reflection and planning 4.
In a workplace system, this same structural idea demands particular attention. 'The customer enquired about the price three times' is a description of an event. 'The price is the only thing that matters to the customer' is already an interpretation. If the system stores the second with the same status as the first, whoever prepares the next offer may lose the chance to check the inference.
Research into human memory has long recognised this distortion. In his book Human Error, James Reason discusses Frederic Bartlett's 1932 observation that reproductions made from memory were more regular and sensible than the original material, and Reason judges that few concepts have proved as useful in explaining regularly recurring error forms as Bartlett's schema concept 5. I apply this observation to the summarising model: its output is more ordered than the raw event log, and this orderliness can easily appear as reliability.
In storage, I would therefore mark separately the stated fact, the preference given by the user, the system's inference and the assumption that still needs checking. Alongside the summary, the link to the original conversation or document stays in place, because shortening helps the work only if one can return to the source when a detail becomes disputed. Sorting entries into types is itself a measurable task. Yiming Du and colleagues' 2024 preprint, PerLTQA, examined the classification, retrieval and use of personal memories on 8593 questions belonging to thirty characters, and found that in classifying memories BERT-based classifiers performed significantly better than the large language models tested 6. For a team, this suggests that labelling can be entrusted to a separate, smaller component, which can be tested on its own.
Even a well-stored memory can surface at the wrong time
Di Wu and colleagues' 2025 evaluation framework, LongMemEval, distinguished five long-term memory capabilities. It tested information extraction, reasoning across multiple conversations, temporal reasoning, knowledge updating, and whether the system recognises that the stored memory is insufficient to answer a question. The authors worked with a test set of five hundred questions and broke memory operation down into indexing, retrieval and interpretation 7.
This division yields more useful questions for procurement or an architectural decision than mere storage capacity. Recalling an old address, for example, may be a correct historical memory while constituting an incorrect current answer. The user might also have said they would be working from another office for a month. In such cases, the new information modifies a period, and the earlier information may later become valid again.
The error is therefore worth looking for where it originated. A different intervention is needed if the system did not record the move at all, if it recorded it but retrieved the old address, or if it saw both and misread the chronology. The uniform 'forgot' label blurs these distinct opportunities for improvement.
The method of storage also determines costs. Prateek Chhikara and colleagues' 2025 preprint, Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory, starts from the premise that a fixed-size context window makes consistency difficult in dialogue spanning multiple sessions. The authors' own system continuously extracts, consolidates and retrieves the relevant information from the conversation. According to their comparison on the LOCOMO benchmark, the 95th percentile of response time was 91 per cent lower than with a solution processing the entire conversation history, while token cost fell by more than 90 per cent, and on an accuracy metric judged by a language model they measured a 26 per cent relative improvement over OpenAI's solution 8. The figures come from the authors' evaluation of their own system, so I regard them as indicative. The lesson is independent of this: there is a measurable cost difference between a solution that loads everything into the context and a selective memory, and every step of selection is a new opportunity for error.
A previous success can also lead to an overly general rule
Noah Shinn and colleagues' 2023 preprint, Reflexion: Language Agents with Verbal Reinforcement Learning, supported agents' further attempts with verbal feedback. The system retains a textual reflection based on task feedback, which it uses in later decisions. In the study, this mechanism improved performance on the tasks examined relative to the baseline used, without updating the model's weights 9.
However, storing lessons requires separate evaluation. A hypothetical sales agent, for example, might successfully arrange a meeting after a short introductory email, and this could easily turn into an internal rule that every partner should be sent a short email. But the success may also have owed something to an existing relationship, the timing of the offer, or an earlier personal meeting. For a coding agent, the same pattern looks like this: after a failed build, the system records that the error was caused by a dependency update, and from then on avoids all updates, even though the error was tied to a single change in a single version.
In memory design, therefore, the description of the situation belongs alongside the rule drawn from experience. What goal was it working toward, what feedback confirmed it, and what counterexample would narrow its application? A generalisation becomes organisational knowledge only if its boundaries are also accessible. The system's own explanation of why something succeeded can be treated as a hypothesis worth further investigation.
Forgetting is part of accuracy
In a long-lived agent, obsolescence and revocation are separate events. The deadline of an expired project may still be important for historical analysis. A mistakenly recorded personal preference, however, requires correction. Information marked for deletion must also be handled in summaries and in further entries derived from it. These are different operations, so they require separate rules.
Dayong Ye and colleagues' 2026 preprint, Secure Forgetting: A Framework for Privacy-Driven Unlearning in Large Language Model (LLM)-Based Agents, starts from the premise that agents embedded in real applications accumulate sensitive or outdated knowledge. The authors distinguish three forgetting scenarios: forgetting of individual states or items, sequences of actions, or entire environments or task categories. Their method trains a transformation model that converts high-level forgetting requests into executable instructions; in the experiments, an adversarial model attempted to infer the forgotten knowledge. According to the paper, the procedure removed the targeted knowledge, performance on other tasks remained intact, and the adversary could not reverse-engineer the deleted content 10.
It is a different task if the content to be forgotten has entered the model's weights. Alberto Blanco-Justicia and colleagues' 2025 review, Digital forgetting in large language models: a survey of unlearning methods, describes digital forgetting as creating a new model from one exhibiting undesirable knowledge or behaviour, in which the identified problem is no longer present. This is usually carried out by machine unlearning procedures, which modify the trained model so that it behaves as if it had been trained on a subset of the training data. The authors categorise the methods according to the scope and depth of the modification, and also enumerate the open problems in the field 11. From this, I conclude that deletability is an architectural decision: what lives as a retrievable entry can be removed with a data operation, while what has entered the weights via fine-tuning requires a research-level effort to remove.
As a practical solution, memories can be given a validity period, a review condition, and a clear owner. Sales data may be modified by a role different from the one setting personal work-style preferences. A visible correction path for the user is particularly important. If a user must refute a wrong conclusion in every new conversation, memory generates more work than it saves.
The effect of deletion must also be verified in its own right. The content of a removed entry may persist in an earlier summary and reappear from there. Tracking data links within the system therefore also determines whether forgetting works, and the specific solution depends on the storage architecture.
The authority attached to a memory also matters
Storing a previous conversation and authorising an action are two separate questions. An assistant may remember that the user sent an offer last time. The historical fact alone is not enough to decide to whom, under what conditions, and with what approval it may send the next one. The scope of action must be defined by the appropriate, valid authorisation. The same situation arises in a development environment when the agent remembers that it received permission for a production deployment last week: the memory records the past event, but today's deployment requires today's approval.
Document text that enters memory can likewise describe instructions without those becoming rules the system must follow. A customer request recorded in meeting minutes and the organisation's own procedures are information of different authority, just as a request written in the text of an issue and the team's release procedure are. Memory supports reliable operation only if it preserves this distinction even after retrieval.
Memory as a data model
From the previous sections, a design principle emerges for me: the agent's memory is a data model, and a mere text store is insufficient. An entry can be used responsibly only if, alongside its content, it carries its type, source, validity period, owner, and which other entries were derived from it. These fields enable correction, obsolescence, and deletion to run as separate operations, and allow the location of an error to be identified between indexing, retrieval, and interpretation.
A rollout trial therefore includes, besides recall, correction, change over time, and situations that turn on authority. In it one can observe how the system reacts to a changed goal, whether it recognises the relationship between the old claim and the new one, and whether it really arrives at a different decision after the correction. Deletion is confirmed by a test in the same way: after the request, the content must be absent from the summaries and the derived entries as well. It is in these trials that the value of memory becomes measurable in use.
Memories that can be viewed, corrected, and revoked
Good agent memory preserves the reviewable history of collaborative work: it shows what happened, what followed from it, and what remains open. With such continuity, the user can change, reconsider their goals, and correct the image formed of them, while personalisation evolves together with the person it serves. The agent whose memories no one can view, correct, or revoke carries forward its past mistakes. The condition for introducing memory is therefore reviewability, which the team plans before storing the first entry.
Recommended reading
- Cognitive Architectures for Language Agents (Sumers, T., Yao, S., Narasimhan, K. R. and Griffiths, T. L). A framework that describes language agents as sets of memory components, operations, and decision-making processes, and provides a common vocabulary for design.
- A Survey on the Memory Mechanism of Large Language Model-based Agents (Zeyu Zhang, Quanyu Dai, Xiaohe Bo, Chen Ma et al.). A comprehensive overview of how to design and evaluate the memory module of agents, and where the limitations of existing solutions lie.
- LongMemEval. Benchmarking Chat Assistants on Long-Term Interactive Memory (Wu, D., Wang, H., Yu, W., Zhang, Y., Chang, K.-W. and Yu, D). Breaks down long-term memory measurement into five distinct memory capabilities, using a test set of five hundred questions.
- Digital forgetting in large language models: a survey of unlearning methods (Alberto Blanco-Justicia, Najeeb Jebreel, Benet Manzanares-Salor, David Sánchez et al.). A classification of machine unlearning methods for language models, with recommendations for developers and an overview of open problems.
- AI Engineering: Building Applications with Foundation Models (Chip Huyen). A practical engineering handbook on designing applications built on foundation models, including the construction of memory and agents.
Sources
- [1] Sumers, T., Yao, S., Narasimhan, K. R. and Griffiths, T. L (2024): Cognitive Architectures for Language Agents. Transactions on Machine Learning Research. https://mlanthology.org/tmlr/2024/sumers2024tmlr-cognitive/.
- [2] Zeyu Zhang, Quanyu Dai, Xiaohe Bo, Chen Ma et al. (2025): A Survey on the Memory Mechanism of Large Language Model-based Agents. ACM Transactions on Information Systems.
- [3] Chip Huyen (2024): AI Engineering: Building Applications with Foundation Models. O'Reilly Media.
- [4] Park, J. S. et al. (2023): Generative Agents. Interactive Simulacra of Human Behavior. UIST. DOI 10.1145/3586183.3606763. https://research.google/pubs/generative-agents-interactive-simulacra-of-human-behavior/.
- [5] James Reason (1990): Human Error. Cambridge University Press.
- [6] Yiming Du, Hongru Wang, Zhao, Zhengyi, Bin Liang et al. (2024): PerLTQA: A Personal Long-Term Memory Dataset for Memory Classification, Retrieval, and Synthesis in Question Answering. arXiv (Cornell University).
- [7] Wu, D., Wang, H., Yu, W., Zhang, Y., Chang, K.-W. and Yu, D (2025): LongMemEval. Benchmarking Chat Assistants on Long-Term Interactive Memory. ICLR. https://proceedings.iclr.cc/paper_files/paper/2025/hash/d813d324dbf0598bbdc9c8e79740ed01-Abstract-Conference.html.
- [8] Prateek Chhikara, Dev Khant, Saket Aryan, Taranjeet Singh et al. (2025): Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory. arXiv (Cornell University).
- [9] Shinn, N., Cassano, F., Berman, E., Gopinath, A., Narasimhan, K. and Yao, S (2023): Reflexion. Language Agents with Verbal Reinforcement Learning. arXiv, 2303.11366, version of 10 October 2023. https://arxiv.org/abs/2303.11366.
- [10] Dayong Ye, Tainqing Zhu, Congcong Zhu, Feng He et al. (2026): Secure Forgetting: A Framework for Privacy-Driven Unlearning in Large Language Model (LLM)-Based Agents. arXiv (Cornell University).
- [11] Alberto Blanco-Justicia, Najeeb Jebreel, Benet Manzanares-Salor, David Sánchez et al. (2025): Digital forgetting in large language models: a survey of unlearning methods. Artificial Intelligence Review.