An agent recalls a sentence and forgets who said it, when it applied, or whether it was true. Fixing that requires more than a larger context window.
The National Institute on Aging describes dementia as a loss of thinking, remembering, and reasoning that interferes with daily life. Its examples include repeating questions, getting lost in a familiar neighborhood, and having trouble paying bills. Someone with dementia can retain pieces of information and still lose the connection that gave them meaning.
Those symptoms belong to a serious human condition. The comparison to AI has limits. A model has no brain, lived identity, or disease. But agents exhibit their own failures of continuity. They ask the same question in a later conversation. They lose track of an unfinished task. They retrieve an old preference after it has changed. Sometimes they remember the words and lose the person, time, or situation that gave those words meaning.
These failures come from design decisions, so the repair belongs in the architecture around the model.
A Sentence Is Not a Memory
Context matters to human memory. A review of context memory in Alzheimer’s disease describes one part of episodic memory as remembering where information came from, including who communicated it. That distinction is just as important for an agent.
Consider four statements an agent might hear:
- “I need crutches until this cast comes off.”
- “My mother hasn’t been sleeping well.”
- “I dreamed that I quit my job.”
- “I used to prefer morning meetings.”
A text store can preserve every sentence perfectly and still get all four wrong. The first is a temporary constraint with an end condition. The second is about another person. The third describes a dream. The fourth is a past preference. Flatten them into strings, retrieve them by similarity, and the agent may assume you will walk with crutches forever, mistake your mother’s sleeping habits for your own, treat your dream as a decision, or keep scheduling meetings at a time you no longer prefer.
The failure occurs during capture. The agent saved the words but lost their context.
I’ve been working on a memory design that treats every durable item as a typed claim. The record identifies the subject, the way the statement was framed, its temporal scope, the uses it permits, and the exact turn that produced it.
type MemoryClaim = {
subject: Self | ResolvedPerson
frame: Asserted | Quotation | Dream | Hypothetical
temporal: Current | Past | Temporary | Unknown
category: Need | Constraint | Preference | Context
allowedUses: MemoryUse[]
provenance: {
sessionID: string
turnID: string
capturedAt: string
method: "direct_user_statement" | "explicit_user_correction"
}
}
The model proposes the meaning. The surrounding application supplies the account, session, turn, capture time, and write authority. If the subject is an unresolved third party, the claim stays out of durable memory until the agent can clarify who the person is. Session-only observations remain transient. A temporary claim needs an explicit end condition before time can make it inactive.
This is a narrower capture boundary than saving transcripts or model-written summaries. It preserves what the person established without turning every conversation into a permanent profile.
[ FIELD NOTE / AUTHORITY ]
Use similarity to find related memories, then verify their source and permitted use.
Changing a Memory
People change their minds. Circumstances change. Two statements about the same subject can also be true in different situations. A reliable agent needs a deliberate way to tell those cases apart.
A simple implementation can use recency as authority: find a similar record and let the newer statement replace the older one. That rule is convenient, but the timestamp proves only when the text arrived. It does not prove who the statement described, whether the speaker was quoting someone, or whether the new language was a correction.
The memory design I’m using gives each meaning a stable semantic key. Repeating the same meaning returns a duplicate result and performs no write. A different value for the same key returns a conflict. Replacement requires an explicit correction tied to the exact active fact.
if (sameMeaning(incoming, active)) return duplicate(active.id)
if (!correction?.targets(active.id)) {
return conflict("explicit_correction_required")
}
return compareAndSet(active.revision, supersede(active, incoming))
The expected fact ID prevents a delayed correction from overwriting a newer change. A compare-and-set revision prevents two concurrent sessions from silently choosing different winners. Deterministic IDs make a retried request idempotent, so a lost network acknowledgement does not create a second memory.
This adds friction exactly where memory becomes consequential. The conversation can continue while the conflict waits for clarification. The agent just cannot pretend that ambiguity has already been resolved.
Recall Is a Permission Check
Retrieval usually starts with a query and asks which stored text looks similar. In a personal agent, relevance belongs near the end of the process.
Before a claim can enter the candidate set, the retrieval boundary verifies:
- The authenticated account owns it.
- Its lifecycle state is active.
- Its subject and frame are resolved.
- Its time boundary still permits use.
- The requested purpose is allowed.
- Its sensitivity, topic, and safety constraints permit recall now.
Only eligible claims can be ranked or selected. An embedding may eventually improve the order of that set. It cannot make an ineligible memory usable.
My current implementation gives the model a compact index of eligible claims, paginated at 20 items. The model selects exact IDs for the present purpose, and the relay revalidates those IDs before returning at most five full details. A stale cursor fails instead of quietly reading a different version of the index.
Constraints travel outside that five-item allowance. A safety requirement must not disappear because five more interesting preferences filled the prompt first. If an older constraint cannot be decoded safely, retrieval asks for resolution instead of treating the missing detail as permission.
Recall is also read-only. Retrieving a fact 100 times does not raise its confidence, extend its life, or count as confirmation from the user. Otherwise the agent can strengthen its own assumption merely by repeating it. Reinforcement requires new evidence from the person or another authorized source.
Forgetting Without Losing History
A useful memory needs limits, but automatic decay creates another authority problem. An old preference may still be current. A rarely retrieved safety constraint may still matter. Popularity and elapsed time do not establish that either one has changed.
The current design forgets through explicit lifecycle transitions. A person can correct or retract a claim. A temporary claim can expire at an end condition the person supplied. An authorized source can carry its own expiry. A review date marks uncertainty and asks for review; it does not invent a replacement fact.
Superseded and retracted versions move out of the bounded current record into private, immutable archive entries. The archive write and the replacement of current memory happen in one atomic commit under the same account, revision, and reset guards. A retry cannot revive retired history or archive it twice.
Archiving is different from erasure. The history remains available for correction lineage and review while staying outside ordinary recall. Account deletion must reach both current and archived memory.
Continuity With Evidence
The context window still matters. It carries the small set of facts needed for the model’s next response. Larger windows can hold longer transcripts, but the window cannot decide which statement is authoritative, which person it describes, or what that statement is allowed to influence. Those decisions belong to the application around the model.
This changes the engineering goal. The memory store is not a biography assembled by an AI. It is a set of attributable claims with explicit uses and a controlled way to change. Capture rejects unsupported meaning. Correction preserves conflict until the person resolves it. Retrieval applies permission before relevance. Archival removes retired history from ordinary recall without rewriting the past.
Human dementia is a disease that affects a person and the people around them. AI dementia comes from applications that preserve words while discarding the relationships between them. Restoring those relationships lets the agent remember who you are.