AI agents preserve experience in histories, notes, and reusable instructions, then bring it back through search and retrieval. Their models also carry broad knowledge learned during training. But for memory to improve future behavior, it must help a system notice what matters, recognize a situation, and choose an appropriate action.
Memento: a life held together by notes
In Christopher Nolan’s Memento, Leonard struggles to form new lasting memories. He uses photographs, notes, and tattoos to work out what happened and what to do next.
The notes help him carry on. But which note does he find? What did it leave out? Does he read it correctly? He can keep a conclusion and lose the reason he trusted it.
That is a useful way to think about agent memory. A deployed language model usually does not change its parameters after each conversation. These are the numerical settings it learned during training. Software around the model saves the history and brings information back when work resumes.
The comparison has limits. The model already knows a lot. It can reason about new information and help check its records. Still, the film gives us a good question: How does yesterday’s note help with today’s decision?
Four different things we mean by memory
Think about learning to cook.
- Working memory helps you keep track of the pan and what to do next.
- Episodic memory lets you recall the dinner you burned and what happened that evening.
- Semantic memory is general knowledge, such as knowing that thin slices cook quickly.
- Procedural memory helps you do things you have practiced, like moving the pan and adjusting the heat without talking yourself through every step.
These functions work together. They are not identical boxes, and a memory does not have to pass through them in order.
An agent’s log can help it use a past event. Written instructions can help it carry out a task. But the files alone do not show that it remembers or acts the way a person does.
Knowledge in the model, continuity around it
During training, a model learns language, facts, relationships, and ways to solve problems. That knowledge is spread across its parameters. It is not a library of pages the model searches.
When we use it, we supply context: instructions, conversation, information found through search, and tool results. Examples and corrections in the context can change its answer without changing its parameters.
The agent harness is the software around the model. It manages tools, keeps track of the task, and decides what the model receives next. It can save chats, pull out lessons, find documents, or load a Skill: reusable instructions, sometimes with scripts and supporting files.
This helps. A saved preference can improve tomorrow’s answer. A tested script can make a task more reliable. But once a correction leaves context, something has to save it and bring it back when needed.
Experience changes what stands out
An experienced cook hears the sizzling change and lowers the heat. A beginner may hear the same sound and miss the warning. Practice helped the cook notice something useful.
We will use a few terms for this throughout the series:
- Goal: What you want to achieve
- Attention: What you notice and focus on
- Recognition: What you think you are looking at
- Belief or expectation: What you think is true or will happen next
- Judgment: What you decide to believe or do
These affect each other. If you expect trouble, you look more closely. If you see something surprising, you may change your expectation.
Human experiments show that past experience can guide attention even when we are not trying to recall it. People still forget and make bad calls. The useful point is that experience can change how we read the next situation.
Where the past can lose its influence
An agent saves a log, writes a lesson, and stores it. Later, a search or a selector chooses what to bring into context. Some guidance is added automatically.
There are several ways this can go wrong. The lesson leaves out an exception. Its description does not match the new task. Or the agent finds the right note, but the situation has changed.
This is where I would look: Did yesterday’s experience help the agent notice the right thing and make a better choice today?
Look for better judgment
“Memory is what we keep from the past. Learning is how the past changes what we do next.”
Useful learning should help later work. Does the agent spot a familiar risk, change an outdated expectation, or choose a method with fewer reminders?
A saved rule, a better selector, or model training could help. External memory also gives us something we can read and correct.
More records alone do not prove competence. I want to see the agent still do the job well when the situation changes, including when an old method should not be used.
The next question is how the system knows which saved lesson matters now.
Up next in the series: Your Agent Saved the Lesson. Why Didn’t It Use It?
Resources
- Conscious and Unconscious Memory Systems: Human memory functions; the agent comparison is functional, not a literal brain mapping, Squire and Dede
- Contextual Cueing: Learned visual context guiding attention without explicit recognition, Chun and Jiang
- In-Context Learning: Adaptation without parameter updates in controlled linear-model tasks, Akyürek and colleagues
- Attention Is All You Need: Computational attention, Vaswani and colleagues
- Effective Context Engineering: Context and external continuity mechanisms, Anthropic
The article originally appeared on LinkedIn.