Skip to content

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.
Written by
The PrizenLabs team
Published
Updated
Reading time
2 min

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, and that includes filtering by what the person asking is allowed to see.

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.

The memory engine we bring to new builds grew out of this work. If you are building something where memory is the hard part, it is what our AI memory and knowledge graph work is for, and it matters most in legal and professional services. Tell us about it.

Next step

Bring us the workflow that's stuck.

Tell us the decision you want automated, or the AI system that isn't holding up. The people who would build it will read it and reply.

What happens next

  1. 01Tell us the problemA short note or a 30-minute call: the workflow, the data and what better would look like.
  2. 02Hear back within 48 hoursFrom the people who would build it, not a sales filter.
  3. 03A one-week discoveryWe find the decision, measure today's baseline and draft the evaluation set. You get a clear answer either way.