What is a temporal knowledge graph, and why do AI agents need one?
The short answer
A temporal knowledge graph is a knowledge graph in which every fact carries time: the period during which it was true in the world, and usually also the moment it was recorded. A plain knowledge graph says that a person works at a company. A temporal one says since when, whether that is still true, what it replaced and when you learned it. That is what lets an AI agent tell what is true now from what was true when a decision was made.
A plain knowledge graph and a temporal one, side by side
| Question | Plain knowledge graph | Temporal knowledge graph |
|---|---|---|
| Who is the buyer at this customer? | The last name someone entered | The current buyer, since when, and who held the role before |
| What price applies to this order? | Today's price | The price that was valid on the order date |
| Is this supplier certified? | Yes or no, as last updated | Certified from one date to another, with the source of each date |
| Why did we approve this exception last year? | No answer, the facts behind it have since changed | The facts as they stood on the day of the approval |
| What changed this week? | Hard to say, old values were overwritten | Every fact whose period started or ended this week |
Two clocks: when it was true and when you learned it
Time enters a fact in two different ways, and a good temporal graph keeps them apart.
The first is valid time: the period during which the fact held in the world. A contact was head of purchasing from March 2024 to June 2026. A price list applied from 1 January to 31 March.
The second is record time, often called transaction time or system time: the moment the fact entered your records. You may have learned about that role change in August, two months after it happened.
A graph that tracks both is called bitemporal. Martin Fowler describes the same split for payroll records: actual history is what happened, and record history is how your knowledge of it changed. Relational databases have supported this since the SQL:2011 standard, which names the two kinds application time period tables and system versioned tables, and allows both on one table. A temporal knowledge graph applies the same idea to entities and their relationships rather than to rows in one table.
Both clocks matter for agents. Valid time answers "what was true on 3 March?" Record time answers "what did we know on 3 March?" When someone asks why an agent drafted a quote the way it did, the honest answer depends on the second question: what the records said at the moment the agent acted, not what we know today.
Why AI agents doing ongoing work need it
A chat assistant answering one question can often get away with the latest value of everything. An agent doing ongoing work cannot, because the work itself spans time.
- Stale facts look current. A CRM field shows the last value someone typed. If the buyer left in June and nobody updated the record, an agent writing to that buyer in September has no way to know, which is the gap described in why coding agents work and company agents don't. When each fact carries a period and a source, a fact that has not been confirmed for months can be treated as uncertain rather than current.
- Decisions depend on what was true then. Order disputes, credit checks, renewals and audits all ask about a past date. An agent that only sees today's values will explain last year's decision with this year's facts.
- Changes are where the work is. A certificate that expires, a price that moves, a contact who changes role or a regulation that takes effect are often the reason something needs doing. A graph that overwrites old values hides the change itself.
- People need to check the agent. If an agent's action is questioned, someone needs to replay what it saw. That is only possible when the record keeps what was known at that moment.
Research on agent memory points the same way. Zep, a memory layer for agents built on a temporally aware graph engine called Graphiti, reports up to 18.5% higher accuracy than baseline implementations on the LongMemEval benchmark, which includes temporal reasoning tasks, with lower response latency. Those are the vendor's own results on a public benchmark, so read them as a direction rather than a promise for your data.
What a temporal knowledge graph stores
| Element | What it holds | Example |
|---|---|---|
| Entity | One identity per real thing, kept across systems | One customer, even though the CRM, the ERP and email each spell it differently |
| Fact or relationship | A statement about one or more entities | This person is head of purchasing at this customer |
| Valid from and valid to | The period the fact held in the world; an open end means it still holds | From March 2024 to June 2026 |
| Recorded at | When the fact entered the records, and when it was superseded | Recorded 12 August 2026 |
| Source | Where the fact came from | A public company register, a signed contract, a sales call note |
| Status | Whether the fact is accepted or only proposed | Accepted from the register; proposed by an agent from a call transcript |
The last two rows are not about time, but a temporal graph is not much use without them. A date without a source cannot be trusted, and an agent's guess with a date on it still looks like a fact unless it is marked as a proposal.
Supersede, never overwrite
The working rule of a temporal knowledge graph is that a new fact supersedes the old one instead of replacing it. When a contact changes role, the old role gets an end date and the new role starts. Nothing is deleted. "What is true now" has one answer, "what was true in May" has another, and both stay answerable.
The same rule applies to corrections. If you find out that a price was entered wrongly, the correction is recorded as a new fact about the same period, with its own record time. The wrong value stays in the history, marked as superseded, so anyone can see that the records once said something else and when that changed.
Questions it can answer that a snapshot cannot
- Which customers had an open order on the day a supplier's certificate lapsed?
- Who was the account owner when this discount was approved, and who is it now?
- What did our records say about this customer on the day the agent sent the offer?
- Which facts about this account changed in the last 30 days, and from which source?
- How long has it been since anyone confirmed this contact still holds the role?
Temporal knowledge graph vs retrieval
Search and retrieval augmented generation (RAG) find the document or record you ask for. They do not keep a connected picture of how things changed, so two documents that disagree are returned side by side and the model has to guess which one is current. A temporal graph settles that before the agent reads anything: each fact has a period, a source and a status. Retrieval is still useful for finding evidence, and connected retrieval is covered in the case for GraphRAG. The temporal graph decides which evidence describes the world as it stands.
Where it fits in a world model
A temporal knowledge graph is one part of what we call a world model for knowledge work: a sourced, current map of a company and the world it operates in, with history kept as facts change. The world model adds the rules and allowed actions agents work through, and it keeps what agents conclude apart from what the company has accepted. The difference between the two is covered in world model vs knowledge graph, and the other ways the term is used are in what is an enterprise world model.
That is how we build it at Ortelian. Accepted facts come in from connected systems and outside sources with their source and the period they were true. A new fact supersedes the old one. What agents and people learn during the work goes into the Notebook as questions, explanations and dated observations, and an agent's conclusion never becomes an accepted fact just because an agent wrote it. A person approves that step. The history is also the part nobody can copy later: a company that starts recording what changed and when today will have two years of it in two years, and that record cannot be rebuilt afterwards from today's systems.
How to start
- Pick one piece of work. Choose a job an agent should do, such as preparing quotes or renewals, and list the facts it depends on.
- Mark which facts change. Roles, prices, certifications, owners, stages and terms change. Company identifiers and founding dates rarely do.
- Give every changing fact a period and a source. Add valid from, valid to, recorded at and source. If you only have record time today, start with that; it is still better than overwriting.
- Change updates into supersessions. When a value changes, close the old fact and open a new one instead of editing it in place.
- Keep agent conclusions apart. Store what an agent infers as a proposal with its evidence until a person or an agreed rule accepts it. Approvals and control for AI agents covers where that approval sits.
- Test with questions about the past. Ask the five questions above for one account. If the graph cannot answer them, the agent cannot either.
Frequently asked questions
Is a temporal knowledge graph the same as a bitemporal database?
They rest on the same idea. A bitemporal database tracks valid time and record time for rows in tables. A temporal knowledge graph tracks them for entities and the relationships between them, which suits questions that cross several systems, such as a certificate, a supplier and the orders that depend on it.
Do I need a graph database to build one?
No. The model matters more than the storage. You can store periods and sources in relational tables, in a graph database or in both. What you need is one identity per thing, a period and source on every changing fact, and updates that supersede instead of overwrite.
Is a temporal knowledge graph the same as agent memory?
Agent memory usually means what one agent remembers from its own conversations. A temporal knowledge graph for a company holds facts about the business from many sources, shared by every agent and person who works on it. Some memory systems, such as Graphiti, use a temporal graph inside; the difference is whose knowledge it holds and who can rely on it.
How is this different from keeping a change log?
A change log records that something changed. A temporal graph lets you ask what was true at any moment and get a connected answer: the customer, its contacts, its orders and its certificates as they all stood on one date.
Sources
Preston Rasmussen and others, "Zep: A Temporal Knowledge Graph Architecture for Agent Memory", arXiv, January 2025. arxiv.org/abs/2501.13956
Zep, "Graphiti: build real time knowledge graphs for AI agents", GitHub repository. github.com/getzep/graphiti
Martin Fowler, "Bitemporal History", 7 April 2021. martinfowler.com
"SQL:2011", Wikipedia, on application time period tables, system versioned tables and bitemporal tables. en.wikipedia.org/wiki/SQL:2011
Li Cai and others, "A Survey on Temporal Knowledge Graph: Representation Learning and Applications", arXiv, 2024. arxiv.org/abs/2403.04782
