AI Self-Evolution 8: How Agents Can Improve Their Own Memory
What an agent remembers, how it organizes it, and when it retrieves it are all opportunities for improvement.
In the last installment I looked at agents improving prompts. The survey now turns to memory. I’ve written before about giving agents a separate memory store and why a knowledge base made for people may work poorly for a machine. I had thought of memory as one of the most mature parts of recursive self-improvement. Taking it apart revealed more choices than I expected.
The survey divides memory into three dimensions. The object is what to keep and in what form, from raw material and lessons to representations a person can’t read. The structure is how to arrange the material, such as in levels, trees, or networks. Processing covers when to add, retrieve, update, and delete it. [1] Each dimension can be improved in its own way.
![Three dimensions of agent memory, adapted from Figure 8 and Section 6.2 of the survey. The dimensions interact. [1]](/essays/ai-self-evolution-008-memory/figure-01.png)
Three dimensions of agent memory, adapted from Figure 8 and Section 6.2 of the survey. The dimensions interact. [1]
What to keep from a mistake
Suppose an announcement says work is “expected to begin at the end of the year.” The agent reports that construction has already started. You correct it and the agent revises its answer.
Memory could retain the whole conversation. It could also store a sentence saying that the user corrected the start date. Both preserve something that happened. When the next release says construction is “scheduled for next year,” the experience will be more useful if it left a lesson: when assessing a project, distinguish planned milestones from events that have occurred.
ReasoningBank extracts reusable reasoning strategies from successes and failures and retrieves them for later tasks, adding experience as it goes. [2] A failure helps when it leads to a concrete way of avoiding the same mistake.
![The loop from experience to reusable lesson, adapted from ReasoningBank Figure 2. This is the structure of the method. [2]](/essays/ai-self-evolution-008-memory/figure-02.png)
The loop from experience to reusable lesson, adapted from ReasoningBank Figure 2. This is the structure of the method. [2]
Keeping ten copies of that lesson would add little. Mem0 compares candidate facts with what it already holds and can add, update, delete, or leave the memory as it is. [3] Once the agent has a rule for judging tentative language, the next example can strengthen the same memory. The original announcement can be retained separately if the details matter.
Retrieving memories can work a bit like zooming in on a map. Locate the right subject, project status, then the right distinction, plans versus events. Return to the original release if the case needs it. Storage and retrieval can save the agent from having to derive the same judgment again from a pile of old conversations. [1]
Does memory have to be written down in words?
In earlier sections, language helped a model explain errors, suggest improvements, and rewrite instructions. The survey also describes implicit memory: latent vectors, internal model states, or additions to the model’s cache. Text and source files are easier for people to inspect and revise. An internal representation can be more compact and harder to check. [1]
![Text memory and generative latent memory, redrawn from the survey and MemGen. [1, 4]](/essays/ai-self-evolution-008-memory/figure-03.png)
Text memory and generative latent memory, redrawn from the survey and MemGen. [1, 4]
We wrote the lesson from the announcement as a sentence because a person can check it and another model can use it. A machine running through a calculation needs a representation it can use. It may have no need for the complete sentence. The savings still come with compute, cache, and training costs, and a person may struggle to identify which memory went wrong. That is one reason I still value a separate store that I can examine and control.
How an agent decides when to use memory
MemGen keeps the main model frozen and trains two smaller modules. A trigger decides whether to invoke memory. A weaver produces latent memory the model can use. At boundaries such as commas and periods the trigger reads the model’s hidden state and outputs an invocation probability. If called, the weaver supplies a representation and the model continues generating. [4]
How does the trigger know? Its job is narrow: call memory or skip it. Training rewards task success and penalizes needless calls. The weaver learns representations that help with the task, and its trainable parameters retain much of what was learned. The overall system learns even though the main model stays frozen.
![The frozen reasoner, trained trigger, and memory weaver are distinct roles in MemGen. [4]](/essays/ai-self-evolution-008-memory/figure-04.png)
The frozen reasoner, trained trigger, and memory weaver are distinct roles in MemGen. [4]
With the announcement, it would help to call up a lesson at the distinction between a planned and an actual date. When the evidence is already clear, the model can move on. Learning when an intervention is likely to help still leaves room for missed errors.
Learning when to stop retrieving
If I write retrieval rules by hand, they soon become specific to the job: look at documentation when coding, go to the original text for policy, and add a new rule when a new task arrives. A model can also learn when the current step needs more information.
Self-RAG uses reflection tokens to learn when to retrieve and how to judge the relevance of what comes back and the quality of what it generates. It retrieves external information. What I want to carry over to personal memory is the idea that retrieval itself can be a learned decision. It takes training, and it can fail on a different task. [5]
![Fixed retrieval and retrieval on demand, redrawn from Self-RAG Figure 1. [5]](/essays/ai-self-evolution-008-memory/figure-05.png)
Fixed retrieval and retrieval on demand, redrawn from Self-RAG Figure 1. [5]
Suppose the announcement explicitly says construction formally began today. Ten older announcements mentioning a proposed start might only distract the model. Look up a character enough times and you can convince yourself you’ve written it wrong. The same problem can affect a model. Using memory well includes knowing when it has enough.
Improvements have to work together
When people learn a job, they gradually work out what to remember, how to arrange it, when to recall it, and how to correct it. Over time those steps come together into a dependable way of working. Agent memory is only part of a task and can itself be divided into many places to improve.
A more precise lesson helps if we preserve its conditions, retrieve it when it applies, and check whether it actually improved the outcome. It’s easy to commit the fallacy of composition. A shorter summary can lose an exception. A cleaner memory store can drop rarely used but crucial evidence. Fewer retrieval calls may mean an agent misses the one call that would have saved it.

Local improvements need to be tested on the full task. Illustration based on the announcement example.
After improving one part, put it back into a complete task. Can the agent still reach the right conclusion and adapt to a new case? Can we trace the error if it gets something wrong?
This gives me a more concrete expectation for recursive self-improvement. If experience can improve what the agent does next and also how it summarizes, organizes, and uses experience, then the improvement process has itself become part of what can improve. Small improvements that work together stand a chance of becoming a system that gets more done, year after year.
Sources
- Ren et al., 2026, Self-Improvements in Modern Agentic Systems: A Survey, § 6.2
- Ouyang et al., 2025, ReasoningBank: Scaling Agent Self-Evolving with Reasoning Memory, §§ 3 and 5.2
- Chhikara et al., 2025, Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory
- Zhang, Fu, and Yan, 2025, MemGen: Weaving Generative Latent Memory for Self-Evolving Agents, § 4
- Asai et al., 2023, Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection