A temporal knowledge graph records when each fact was true and where it came from. Standard vs temporal, what bi-temporal means, and why AI agents need it.
A temporal knowledge graph is a knowledge graph in which every fact carries time — when it became true, when it stopped being true, and where it came from — so the graph represents not just what is known, but how that knowledge changed over time. Where a standard knowledge graph stores entities and relationships as if they're permanently true, a temporal knowledge graph tracks state as it evolves, which is exactly what AI agents need to reason about users and the world without contradicting themselves.
| Standard knowledge graph | Temporal knowledge graph | |
|---|---|---|
| Represents | Entities + relationships | Entities + relationships + time |
| Handles change | Overwrites or duplicates facts | Invalidates old facts, keeps history |
| Can answer “what was true then?” | No | Yes |
| Provenance | Often none | Each fact traces to its source |
| Built for | Static domains | Evolving state (users, agents, business) |
Facts about people and businesses change constantly. A user upgrades a plan, changes a preference, closes an account; a deal moves stages; a policy is updated. A graph that can't represent when a fact was true will eventually serve an agent two contradictory facts and let it pick — the single most common cause of agent hallucination. A temporal knowledge graph removes that ambiguity: it knows the current truth and the historical truth, and can answer either.
The strongest temporal knowledge graphs are bi-temporal — they track two timelines for every fact:
With both, an agent can ask “what is true now?”, “what was true on this date?”, and “where did this fact come from?” — and get a correct, auditable answer to each. When new information contradicts an existing fact, the old fact is marked invalid (not deleted), so history is preserved.
Reason for return
Additional comments
For agent memory, the graph is constructed continuously from the agent's inputs — chat messages, business data (JSON), and documents. The system extracts entities, relationships, and facts; assigns each a validity window and provenance; and updates the graph as new information arrives, invalidating superseded facts. At query time it retrieves the relevant, current (or as-of-date) slice — not the whole history.
This is what Graphiti does. Graphiti is the open-source temporal knowledge graph library purpose-built for agent memory (20,000+ GitHub stars). It constructs bi-temporal context graphs from any source and powers Zep's agent-memory platform. When scaled with Zep, Graphiti runs on top of the Context Graph Engine — the runtime that serves millions of these graphs with sub-200ms p95 retrieval. Zep is the Context Lake for AI agents: the platform that manages, governs, and serves agent memory at scale on temporal knowledge graphs.
A vector store retrieves text chunks by similarity and has no concept of time or relationships — it can return a stale fact and a current one with equal confidence. A temporal knowledge graph models the relationships and the timeline, so it returns what's true now (or as-of a date) with provenance. For agent memory, the temporal graph is the right structure; vector search is a useful component inside it, not a substitute.
Related: What is agent memory? · Graphiti (open source) · Context Graph Engine · Agent memory vs RAG
A knowledge graph that records when each fact was true and where it came from — so it can tell you what's true now, what was true before, and why.
A standard knowledge graph treats facts as timeless. A temporal one tracks how facts change, invalidating old facts while preserving history — essential for agents reasoning over evolving state.
It tracks two timelines per fact: when the fact was true in the world (valid time) and when the system learned it (ingestion time / provenance).
Graphiti is the leading open-source temporal knowledge graph built specifically for agent memory; it powers Zep's Context Lake at enterprise scale.