What is agent memory?
A language model starts every call with a blank slate. Anything it seems to remember, from the last message in a chat to a preference stated last month, was put back into its input by the software around it. Agent memory is that software: what gets saved, where it's kept, and how it finds its way into the next request.
Memory is what lets an agent pick up a long task where it left off, or answer a follow-up question without being told everything again.
What are the types of agent memory?
| Type | What it holds | Where it lives | Example |
|---|---|---|---|
| Short-term (working) | The current conversation and task | The model's context window | The last few questions in a chat |
| Episodic | What happened in past runs | A log or database | Last week's run failed on a missing feed |
| Semantic | Facts and definitions | A knowledge base or semantic layer | How this client defines a conversion |
| Procedural | How to do a task | Instructions, skills, and workflows | The steps of the weekly QA check |
Long-term memory usually works like retrieval-augmented generation. Memories are stored, and when a new request arrives, the system looks up the ones that match it and adds them to the context.
What is an example of agent memory?
A follow-up that needs the thread
An analyst asks an assistant which channels drove sales last month, then asks, "How does that compare with the same month last year?"
The second question only makes sense with the first one in memory. Short-term memory carries the thread, so the assistant knows the comparison is about channel sales, which month, and which definitions.
Agent memory vs. RAG vs. a longer context window
| Longer context window | RAG | Agent memory | |
|---|---|---|---|
| What it adds | Room for more input | Documents retrieved for each question | What the agent itself was told or did |
| Lasts between sessions | No | The documents do | Yes, if it's stored |
| Main risk | Models use the middle of long inputs less well | Retrieving the wrong passage | Remembering something stale or wrong |
Why does agent memory matter, and what can go wrong?
- Continuity. Agents can work on tasks that span many steps or days without starting over.
- Less repetition. People don't have to restate their context in every request.
- Stale memories. A fact that was true last quarter can quietly steer today's answer. Memories need dates and an expiry.
- Leaks across boundaries. A memory from one client or user must never surface for another. Memory needs the same access rules as the data it came from.
- Hard to inspect. If people can't see what an agent remembers, they can't correct it.
How does Alli do this?
Ask Alli, part of Alli by PMG, keeps the thread of a conversation, so each follow-up builds on the last one, and it shows the table behind every number. The definitions an answer uses don't rely on memory: they live in Alli Semantic Layer, so every session uses the same agreed math.
Alli4u keeps separate configurations for each customer, business unit, or product line, with strict separation between them, and switches between them with one command. Alli Generative Workflows keeps a history of every run, so what happened last time is a record anyone on the team can check.
Explore Ask AlliAgent memory FAQ
Do AI agents have memory?
Not on their own. A model forgets everything between calls. Agents seem to remember because the software around them stores information and adds the relevant parts back into each request.
What is the difference between short-term and long-term memory in AI?
Short-term memory is what's in the model's context during a task, such as the current conversation. Long-term memory is stored outside the model and retrieved in later sessions.
What is episodic memory in AI agents?
It's a record of past events, such as earlier runs and what worked or failed, that an agent can look up when a similar task comes up.
Is agent memory a privacy risk?
It can be. Anything an agent remembers is stored data, so it needs access controls, retention limits, and a way for people to see and delete it.
Last updated Back to the glossary
