An AI agent forgets you the moment the session ends. Agent memory is the layer you build on top of the model to stop that happening: it stores what came out of earlier conversations and puts the relevant part back in front of the agent when it is needed.
Why an agent starts from zero every time
A context window is a fresh session. The agent opens with its system prompt and nothing else. You are a helpful assistant. Here are your tools. There is no reference to anything you said yesterday.
Teach a dispatcher on Monday that one property manager wants photos on every work order and they will remember on Tuesday. Teach an agent the same thing and Tuesday is conversation one again. Between conversation one and conversation two, everything ends.
ChatGPT looks like the counter-example. It remembers that you like cookies and that you are trying to lose weight. OpenAI built a memory system on top of the model to do that. The model underneath still starts fresh. Most agents have no memory layer at all, and the ones that do give you very little control over what goes into it. ChatGPT will hold on to miscellaneous detail about your diet and still forget your current pricing or which offers are live on your site. In a business, that is the wrong half to remember.
Short-term and long-term memory
Two kinds, and the names are literal.
Short-term is anything inside the current session. Mention something 15 passes ago and the agent will probably still have it.
Long-term is anything that has to outlive the session: a preference held across months, your new pricing, or what your old pricing used to be.
RAG is how the long-term half gets back in, and we covered it earlier in this series. It gives the model a store of context it can pull from, so a fact arrives when the question calls for it.
Why you cannot just hand it everything
The obvious move is to load every past conversation in up front and let the agent sort through it. Two things stop you. You are charged on token usage, so replaying your whole history on every request fries the bill. And it burns the context window you needed for the actual work.
Without memory, each interaction starts at zero: smallest context, smallest token count, cheapest call you can make. Every piece of memory you add makes the context bigger, consumes more tokens and costs more. Memory is a budget.
Three ways to store it
| Option | What gets stored | How it holds up |
|---|---|---|
| Raw history | Full transcripts of every conversation | Complete, and you carry every word of it |
| Summaries | A condensed digest of what happened in a session | Lighter than the transcript |
| Structured data in RAG | Facts written so the agent can retrieve them on demand | Easiest for the model to understand and the cheapest to run |
Putting the information away is the easy part. Embedding a transcript into a RAG system takes no real thought.
“The retrieval is the hard part.” Luka Eric, 3:38
Getting the right piece of information back at the right moment is extremely hard, and it is where the testing goes. The memory layer that works for one agent is rarely the one that works for the next, so each gets set up separately.
Before you build a memory layer, decide which few facts have to be true in every single session. Your current pricing. The way a given property manager wants work orders sent. Everything else can start at zero, and cost you nothing.