memnode
Sign InSign Up
Back to Articles

Canonization: How a Memory System Decides What It Believes

A naive store treats every recorded fact as equally true forever. memnode gives each memory a status that changes over its lifecycle: provisional, supported, canonical, disputed, deprecated, quarantined. How evidence drives promotion and demotion, and why it makes agent memory accountable.

memnode9 min read
agent memorymemnodecanonizationmemory statustrustdesign notes

The simplest possible memory for an agent is a list. You record an item, it exists. You delete an item, it is gone. Every row in that list is treated as equally and permanently true. This is how most memory layers behave, and it is the reason an agent will confidently repeat something it heard once, from a single unreliable source, months ago, with exactly the same certainty it gives a fact it has verified a hundred times.

memnode does not treat memory as a binary of exists versus deleted. Every consolidated memory carries a status that moves over the memory's lifetime: it starts cautious, earns its way up as evidence accumulates, and gets demoted or fenced off when something goes wrong. That status is the system's answer to a question a flat store never even asks: how much do I currently believe this, and why?

This article is about the lifecycle of a single memory. The harder question of how two memories that disagree with each other are reconciled is the subject of the next piece, on belief networks. Here we stay focused on one fact and how its standing changes.

Why a memory needs a lifecycle, not a tombstone

Consider an agent maintaining memory about a codebase. On Monday it observes a comment in a config file claiming the deploy target is staging-east: one observation, from one place, never acted on. On Friday, after five successful deploys that all confirmed the same target, the agent has something much stronger: a fact corroborated by repeated use, with a trail of evidence behind it.

In a flat store these two situations are indistinguishable. Both are just rows. The information that matters most for good behavior, namely how earned is this belief, is exactly the information a list throws away.

A lifecycle restores that information. A memory is not simply present or absent; it occupies one of several states that describe its current standing in the system. memnode uses six:

  • provisional: freshly distilled into a fact, plausible but unproven. The default starting point for anything the consolidation engine first forms.
  • supported: corroborated by more than one source or reinforced by use, but not yet trusted enough to win every argument.
  • canonical: the system's current best belief on this point. Stable, well corroborated, with no live unresolved objections.
  • disputed: in active conflict with another memory the system also takes seriously.
  • deprecated: superseded by a newer, corrected version. Kept for history, suppressed from active recall.
  • quarantined: not trusted enough to influence answers at all, because of where it came from or how it behaves.

Crucially these states live on the consolidated, semantic layer of memory. Raw observations land first as episodic entries, time stamped and source rich. The consolidation engine is what distills clusters of episodes into stable semantic facts, and it is those facts that carry a status and move through the lifecycle. The agent records; the system decides what to believe.

Quarantine by default: guilty until corroborated

Promotion is the interesting direction, but the safest starting point is worth stating first. Not every memory begins life as merely provisional. Anything whose origin the system has reason to distrust starts further down, in quarantine.

Quarantine is the default for imported memory, for memory generated or inferred by a model rather than directly observed, and for memory arriving from another agent. The framing is borrowed from immunology: the system has a notion of self and non-self, and treats anything foreign as suspect until it proves benign. A quarantined memory can sit in the graph, but it cannot influence a canonical answer. It has to earn promotion the same way everything else does, by accumulating corroboration and surviving contradiction.

This is the structural defense against memory poisoning. An attacker who plants a single convincing-looking observation does not get to write directly into the agent's canonical beliefs. The injected memory lands quarantined, isolated from recall, and the promotion path is designed so that one unsupported assertion cannot climb it alone. Trust in memnode is structural, not just access controlled: the lifecycle itself is part of the security model.

What evidence moves a memory up

Canonization is the rule-gated promotion of a memory toward canonical status. The key word is gated. Nothing becomes canonical automatically or on a timer. A memory is promoted only when it clears a set of conditions, evaluated together rather than any one in isolation:

  • Corroboration. How many distinct supporting episodes back this fact? A claim resting on a single observation is weaker than one independently observed several times.
  • Repeated successful use. Has this memory been recalled and acted on, without being corrected afterward? Recall in memnode is not read only; it reinforces. A fact that keeps getting used and never gets walked back is a fact the system trusts more.
  • Source trust. Where did the supporting evidence come from? A directly observed repository convention carries more weight than something reported secondhand or inferred by a model. Epistemic type, declared at write time, feeds directly into this.
  • Absence of unresolved objections. Are there live, high-weight contradictions pointing at this memory? A memory cannot be canonical while something the system also takes seriously is actively rebutting it.
  • Stability over time. Has the belief held steady through a window of observation, or is it still churning? Promotion favors facts that have stopped changing.
  • Low tension. A memory carries a tension measure derived from the support and rebuttal evidence around it. Promotion wants that pressure low.

The exact numbers behind these checks, how many corroborating sources, how long a stability window runs, where the contradiction-pressure line sits, are tunable thresholds that the system calibrates against measured recall quality rather than fixed constants worth publishing. What matters at the design level is the shape: a memory climbs from provisional to supported as corroboration and use accumulate, and reaches canonical only when it is well supported, stable, and unopposed. The path is a ratchet built from evidence, not a clock.

Returning to the deploy target: the Monday observation produces a provisional fact. As a second config reference and the first successful deploy corroborate it, it becomes supported. After a window of stable, repeated, uncorrected use with no competing claim, it crosses into canonical. Nothing about that promotion happened because time passed. It happened because evidence arrived and nothing contradicted it.

What evidence moves a memory down

A lifecycle that only promotes is just a slower flat store. The demotion paths are what make status honest. Three things can pull a memory back down.

Contradiction makes it disputed

When a new memory directly conflicts with a standing one, and the new memory is itself credible, the standing memory does not silently win or lose. It is marked disputed. A disputed canonical fact loses its privileged standing immediately: it stops being treated as settled truth at recall time even though it has not been deleted or corrected. The system is admitting, in its own state, that it no longer knows which of two claims to trust. Resolving that disagreement, rather than just flagging it, is where the belief network takes over.

Supersession makes it deprecated

Sometimes there is no genuine conflict, just an update. A convention changes; a value is corrected. This is the deprecated path, and it is driven by correction. When an agent records a correction, memnode creates a typed edge from the old memory to the new one, and the old memory is marked deprecated. It is not erased. It stays in the graph, linked into a correction chain, suppressed from active recall but fully visible in history. Recall follows the chain forward to the latest truth and answers with that, while the deprecated predecessor remains available to explain how the belief got here.

Misbehavior or bad provenance sends it to quarantine

A memory that starts looking poisoned, that suddenly attracts contradictions, drifts away from the evidence that originally supported it, or turns out to trace back to an untrusted source, can be pulled into quarantine even after it was previously trusted. Demotion to quarantine is the strongest move available: the memory is pulled out of the recall pool entirely until it can re-earn standing.

These demotions are not edits. A demoted memory keeps its identity and its history; only the status field changes. That distinction is what lets the system explain itself later instead of presenting a clean but unaccountable surface.

How status changes the answer

Status would be a bookkeeping curiosity if it did not change behavior. It does, at recall time, in two ways.

First, status shapes ranking. When the recall pipeline assembles competing candidates and scores them, a memory's status adjusts how strongly it competes. Canonical memories are favored. Quarantined and deprecated memories are held out of active recall. Provisional and disputed memories can still surface, but they do not get to behave as if they were settled.

Second, status shapes confidence and phrasing. A recall response in memnode is not a bare string; it carries a confidence and a justification. When the answer rests on a canonical memory, the system can speak plainly. When it rests on something only provisional, the answer is hedged, and the hedge is honest rather than decorative. The difference an agent should feel is roughly this:

recall("what is the deploy target?")

# backed by a canonical memory
-> "The deploy target is staging-east."
   confidence: high
   status of supporting fact: canonical

# backed by a provisional memory
-> "The deploy target may be staging-east, but this is
    based on a single unconfirmed observation."
   confidence: low
   status of supporting fact: provisional

Same underlying fact, same query, very different answer, because the system tracks how earned the belief is and refuses to launder a guess into a certainty. An agent built on a flat store cannot make this distinction. An agent built on a lifecycle can hedge exactly when it should and commit exactly when it can.

Status, correction, and lineage are one system

Memory status does not stand alone. It is the visible state of a memory whose history is recorded underneath it. Every transition, provisional to supported, supported to canonical, canonical to disputed, an old fact deprecated by a correction, is part of that memory's lineage: the supporting episodes, the consolidation events, the corrections, the support and rebuttal evidence, and the status changes themselves.

This is what makes canonization inspectable rather than magical. For any memory you can ask not just what does the system believe but why does it believe that, and what would change its mind. You can see that a canonical fact rests on four corroborating observations from a trusted source and survived two windows of stable use. You can see that a deprecated fact was superseded by a specific correction on a specific date, and read both. The status is the headline; the lineage is the reporting behind it.

That coupling is the whole point. A flat store gives you a fact and asks you to trust it. A lifecycle gives you a fact, a standing, and a paper trail, and lets the agent calibrate accordingly. The system is not trying to be infallible. It is trying to be accountable about exactly how confident it has earned the right to be.

Status, then, is the verdict; the next question is what happens when the evidence will not settle on one verdict at all. That is where the lifecycle of a single memory hands off to the relationships between conflicting memories, which the belief network exists to hold.

The memnode design series