Skip to main content

Temporal Awareness

People change jobs. Companies rename products. Projects get cancelled. A memory system that only stores the latest fact loses the history that often matters for context. Agentium memory tracks when facts became true and when they stopped being true, across User Facts, Entity Memory, and Graph Memory. Old facts are never deleted — they’re superseded.

The Problem

Consider this sequence of conversations over several months:
  1. January: “I just started at Acme Corp as a junior developer.”
  2. March: “I got promoted to senior developer!”
  3. June: “I left Acme and joined Globex as a tech lead.”
A naive memory system would show: “Works at Globex as tech lead” — losing the history. But that history matters: the agent should know the user has Acme experience, was promoted there, and recently switched roles.

How It Works

Every fact and entity carries two temporal fields:
When the extraction model detects a new fact that contradicts an existing one, the old fact is not deleted. Instead:
  1. The old fact gets an invalidatedAt timestamp
  2. The new fact is created with a fresh validFrom
  3. Both remain in storage

Contradiction Detection

During background extraction, the memory model compares new facts against existing ones. Contradiction detection uses semantic similarity — it doesn’t require exact string matches:
The extraction model handles nuance:
  • “I also use Python”additive (doesn’t contradict existing “Uses TypeScript”)
  • “I switched to Python”contradictory (supersedes “Uses TypeScript”)
  • “I’m no longer on the platform team”negation (invalidates without a replacement)

What the Agent Sees

By default, buildContext() only injects currently valid facts (where invalidatedAt is undefined). The agent sees a clean, current view:

Including History

If your use case benefits from historical awareness, enable it:
With includeSuperseded, the context becomes:
This gives the agent historical awareness — useful for career coaches, medical history, or project timelines.

Viewing Temporal History

Query the full timeline for a user programmatically:

Works Across Store Types

Temporal awareness is built into multiple memory subsystems: User Profile is the exception — structured fields like name and timezone are simply overwritten since there’s only one current value. The decision log is append-only by design.

Code Example: Full Lifecycle


Cross-References