How it works

The model

What a memory layer has to be able to represent before retrieval quality even becomes the right question — and the three things a list of strings cannot hold.

On this page

The premise

Most “memory” for agents is a list of strings and a similarity search. That is enough to make a demo feel like recall, and it fails in three specific ways that show up in production.

None of them are retrieval bugs. They are modelling bugs: the store has no way to represent what actually happened, so the failure is invisible at query time and only shows up as an agent being confidently wrong.

It cannot hold a contradiction

Two stored claims that cannot both be true are, in a flat list, indistinguishable from two unrelated facts. There is nowhere to put “these disagree” — so one of them quietly wins, and the agent proceeds on a premise the user has already contradicted.

This is the failure that is hardest to notice, because the agent is fluent either way. A user says “actually, we switched to Postgres”, the newer statement is retrieved or is not, and either way nothing in the system records that there was a disagreement to resolve.

Here a contradiction is a first-class record: a pair, an actionable question, and a status. It is pinned into every prompt until it is answered.

It has no notion of cost

A similarity search returns k results, and k is chosen by whoever wrote the call. As the store grows, so does the prompt, and the material included falls into two groups: things that were relevant, and things that merely looked like they might be.

The second group is what Chroma’s 2025 context-rot report measures. Adding topically-related distractors is not free: it costs tokens, it costs attention, and it makes the model worse at the thing you were trying to help it with.

The fix is to make cost a decision rather than a side effect. Tiers do that: what is in the prompt every turn, what is only there if something asks for it, and what costs nothing at all until it is promoted.

It cannot say why something matched

A cosine score is not an explanation. When a user asks why their agent believes something, the honest answer is a floating point number, which is not an answer.

Every injection here is recorded with the rule that produced it — index, trigger, tension, or guardrail — and its token cost. So the context preview can show the exact block your agent would be given, line by line, with the reason each line is there.

That is what makes a memory store debuggable. Without it, the only way to find out why an agent believed something is to change the prompt and observe, which is a debugging loop measured in hours.

What follows from that

Three commitments, each of which costs something, and each of which is a decision:

  • Contradictions are rows. They are stored, pinned, and resolved explicitly. This means the system can ask a question instead of picking a winner.
  • Cost is explicit. Every line has a price and a reason, and the budget is a number you set rather than a side effect of k. See the four tiers.
  • No model in the retrieval path. Recall is token overlap, because a memory service that can fail because a provider is slow is a memory service you cannot reason about mid-conversation.

The last one is a real trade and it is worth stating plainly: fuzzy paraphrase over a very large corpus is exactly where an embedding index earns its keep, and this gives that up. The reasoning is on the recall page.