Engineering
Agents forget. Here is how we give them a memory
Most AI agents start every conversation from zero. The four layers we use to give them a memory that lasts, with examples from DeltaMemory and Holmes.
PrizenLabs//2 min read
A language model has no memory of its own. Everything it knows about your situation has to fit in the context window of the current request, and when the conversation ends, so does that knowledge. For a chatbot that is fine. For an agent that works on a project for months, it is the main thing standing between a clever demo and a tool people rely on.
We have built memory into several products, most visibly DeltaMemory and Holmes. The details differ, but the same four layers keep coming back.
1. Working context
The model's own context window: the conversation so far, the documents in play, the instructions. It is fast and exact, and it is small. The engineering here is deciding what earns a place in it, because everything else has to be fetched.
2. A record of what happened
Underneath sits a durable log of events: messages, meetings, tickets, documents and decisions. Nothing is summarised away at this layer. Its job is to be the source of truth that every later claim can point back to, which is why every statement in a DeltaMemory brief links to its source.
3. Extracted knowledge
Raw history is too large to search well, so a background process reads it and pulls out what is worth remembering: commitments, obligations, decisions, the edge cases a lawyer will care about next year. In Holmes, a memory agent does this after each conversation, and the results go into a semantic graph shared across matters.
Two rules matter more than any choice of model:
- Keep the link to the source. An extracted fact without a citation becomes a rumour.
- Never overwrite. When a decision is reversed, keep both, with dates. DeltaMemory's decision history keeps rejected and superseded options for exactly this reason.
4. Retrieval at the right moment
The last layer decides what to bring back into the working context, and when. Semantic search finds what means the same as the question; the graph finds what is connected to it; recency and status filter out what no longer applies. Good retrieval is mostly good filtering.
What we have learned
- Memory is a product decision before it is a technical one. What should the system remember, for whom, and for how long? The answers shape the schema.
- Show your sources. People trust a memory they can check. Cited answers do more for adoption than a better model.
- Plan for forgetting. Some things should expire, and some should never leave the user's machine. Holmes keeps documents local for that reason.
- Agents need to know about each other too. Once agents work together they need identity and discovery, which is the problem Zynd AI solves at the level of the network.
If you are building something where memory is the hard part, it sits squarely in our AI infrastructure and knowledge systems work. Tell us about it.