---
title: "Temporal memory | Agent Memory | SurrealDB"
description: "Agent Memory changes its mind without losing the past: it supersedes facts rather than deleting them, and tracks three independent clocks."
url: https://surrealdb.com/agent-memory/temporal
---

TEMPORAL MEMORY

# It changes its mind without losing the past

When a fact changes, most memory systems overwrite the old one - and the agent can't tell what changed or when. Agent Memory supersedes instead of deletes: the old fact stays, the new one wins, and every fact carries three independent clocks.

[Join the waitlist](https://surrealdb.com/agent-memory/get-started) [Technical deep-dive](https://surrealdb.com/agent-memory/deep-dive)

1. ![Babcock](https://surrealdb.com/assets/static/babcock.lo4rnVg1.svg)
2. ![ING](https://surrealdb.com/assets/static/ing.X3I6S3_V.svg)
3. ![British Airways](https://surrealdb.com/assets/static/british-airways.KEsZiwV-.svg)
4. ![Nvidia](https://surrealdb.com/assets/static/nvidia.DaIEuMil.svg)
5. ![Apple](https://surrealdb.com/assets/static/apple.D5pq4flY.svg)
6. ![SpaceX](https://surrealdb.com/assets/static/spacex.CQJEk-IL.svg)
7. ![Samsung](https://surrealdb.com/assets/static/samsung.CH-vQgnb.svg)
8. ![adidas](https://surrealdb.com/assets/static/adidas.DdTC5qhk.svg)
9. ![Tencent](https://surrealdb.com/assets/static/tencent.paQmLxyy.svg)
10. ![Alibaba](https://surrealdb.com/assets/static/alibaba.B16idgfM.svg)
11. ![PolyAI](https://surrealdb.com/assets/static/poly-ai.c3w_fAg6.svg)
12. ![Later](https://surrealdb.com/assets/static/later.Ds736jFO.svg)
13. ![Verizon](https://surrealdb.com/assets/static/verizon.BI7CajdX.svg)
14. ![Liberty Mutual](https://surrealdb.com/assets/static/liberty-mutual.B7qOU1pd.svg)
15. ![Walmart](https://surrealdb.com/assets/static/walmart.BjDg_Sr8.svg)
16. ![Carrier](https://surrealdb.com/assets/static/carrier.D21gC6NX.svg)
17. ![Saks Fifth Avenue](https://surrealdb.com/assets/static/saks-fifth-avenue.COIDpLSb.svg)
18. ![San Francisco Compute Company](https://surrealdb.com/assets/static/sfcc.B7jlImq4.svg)
19. ![Shield AI](https://surrealdb.com/assets/static/shield-ai.pINZ0KJr.svg)
20. ![Wix](https://surrealdb.com/assets/static/wix.DvHhmoBi.svg)

01 |SUPERSEDE, DON'T DELETE

## The old fact stays, the new one wins

A change doesn't erase history - it supersedes it. The superseded fact remains, linked to the one that replaced it, so an agent can always see how its understanding evolved and answer questions about the past as easily as the present.

Turn 1 · 15 Mar

“I live in Berlin.”

stored · valid from Mar 15

Turn 7 · 12 Apr

“Actually, I moved to Paris.”

Berlin superseded - not deleted

Ask · later

Paris - with the trace

user_message[turn_7] · user_message[turn_1] (superseded)

Every fact knows where it came from - and when it was true.

Clock 1 · system time

The audit clock

Replay the substrate exactly as it was at any past instant - MVCC underneath.

Clock 2 · known time

When it was believed

When the system first learned the fact - turn 1 for Berlin, turn 7 for Paris.

Clock 3 · valid time

When it was true

When the fact held in the world - Berlin until March, Paris since.

## Memory with a history

Time is first-class: nothing is silently overwritten, and every fact knows when it was recorded, when it was true, and when it was learned.

### [Supersede, don't delete](https://surrealdb.com/agent-memory/deep-dive)

Old facts step aside instead of vanishing, so the past is always recoverable.

Learn more

### [Three independent clocks](https://surrealdb.com/agent-memory/deep-dive)

System, valid, and known time are tracked separately - when it was recorded, when it was true, and when it was learned.

Learn more

### [Chains you can follow](https://surrealdb.com/agent-memory/deep-dive)

Each fact links to the one it replaced, so you can walk the full history of a claim.

Learn more

### [Contradictions kept](https://surrealdb.com/agent-memory/memory)

Conflicting facts are preserved side by side, not averaged into one.

Learn more

### [Answer about the past](https://surrealdb.com/agent-memory/deep-dive)

Ask what was true last quarter as easily as what's true right now.

Learn more

### [Every change is traceable](https://surrealdb.com/agent-memory/provenance)

Supersession is recorded, so what changed and when is always provable.

Learn more

02 |ONE SUBSTRATE

## Overwriting loses the one thing you need

Overwrite a fact and you lose the ability to explain a past decision, debug a wrong answer, or prove what the agent knew at the time. Agent Memory keeps the whole history as queryable structure.

### Debuggable

When an agent gets something wrong, you can see exactly what it knew and when it knew it.

### Tri-temporal

Three clocks separate when a fact was recorded, when it held true, and when it was learned - so time questions have exact answers.

### No silent averaging

Contradictions are kept explicit and reconciled deliberately, not blurred into a single value.

## Keep exploring

### [Provenance](https://surrealdb.com/agent-memory/provenance)

How every answer traces to its source.

Explore

### [Recall](https://surrealdb.com/agent-memory/recall)

How the current fact is surfaced over the old.

Explore

### [Technical deep-dive](https://surrealdb.com/agent-memory/deep-dive)

The temporal model in full.

Explore

GET STARTED

## Give your agents a memory with a history

Temporal memory, trustworthy recall, and a queryable audit trail - one system you buy, secure, and audit once. Built on SurrealDB.

![Samsung](https://surrealdb.com/assets/static/4c58b81e7b3c9466.C_Hv0eml.svg)![NVIDIA](https://surrealdb.com/assets/static/nvidia.DaIEuMil.svg)![Apple](https://surrealdb.com/assets/static/f7dc2519e0d212bc.Cn8MYAK7.svg)![Verizon](https://surrealdb.com/assets/static/18b99996c689000f.B5PQ-nI9.svg)![Tencent](https://surrealdb.com/assets/static/401d8346058682c8.DqM87mst.svg)

SOC 2 Type 2

GDPR

Cyber Essentials Plus

ISO 27001

[Join the waitlist](https://surrealdb.com/agent-memory/get-started) [Talk to sales](https://surrealdb.com/contact/sales)

```json
{"@context":"https://schema.org","@type":"Organization","name":"SurrealDB","url":"https://surrealdb.com","logo":"https://surrealdb.com/assets/static/logo.BG7_TG2b.svg","description":"SurrealDB is the unified data layer for AI. A multi-model database for documents, graphs, vectors, and time-series.","foundingDate":"2022","legalName":"SurrealDB Ltd","identifier":{"@type":"PropertyValue","propertyID":"GB-COH","value":"13615201"},"address":{"@type":"PostalAddress","streetAddress":"3rd Floor, 1 Ashley Road","addressLocality":"Altrincham","addressRegion":"Cheshire","postalCode":"WA14 2DT","addressCountry":"GB"},"contactPoint":[{"@type":"ContactPoint","contactType":"customer support","email":"support@surrealdb.com","url":"https://surrealdb.com/contact","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"sales","email":"info@surrealdb.com","url":"https://surrealdb.com/contact","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"security","email":"security@surrealdb.com","url":"https://surrealdb.com/.well-known/security.txt","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"legal","email":"legal@surrealdb.com","url":"https://surrealdb.com/legal","availableLanguage":"English"}],"hasCertification":[{"@type":"Certification","name":"SOC 2 Type 2"},{"@type":"Certification","name":"GDPR"},{"@type":"Certification","name":"Cyber Essentials Plus"},{"@type":"Certification","name":"ISO 27001"}],"owns":[{"@type":"SoftwareApplication","name":"SurrealDB","url":"https://surrealdb.com/surrealdb"},{"@type":"SoftwareApplication","name":"Agent Memory","url":"https://surrealdb.com/agent-memory"}],"knowsAbout":["multi-model databases","document databases","graph databases","vector search","time-series databases","SurrealQL","Agent Memory","real-time databases","embedded databases","context layer","graph ontology","distributed database","knowledge graphs","distributed transaction protocols","highly-scalable databases"],"sameAs":["https://www.wikidata.org/wiki/Q124316308","https://github.com/surrealdb/surrealdb","https://twitter.com/surrealdb","https://www.youtube.com/@surrealdb","https://www.linkedin.com/company/surrealdb","https://discord.gg/surrealdb","https://www.reddit.com/r/surrealdb","https://www.instagram.com/surrealdb","https://medium.com/surrealdb","https://dev.to/surrealdb"]}
```

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://surrealdb.com"},{"@type":"ListItem","position":2,"name":"Agent Memory","item":"https://surrealdb.com/agent-memory"},{"@type":"ListItem","position":3,"name":"Temporal","item":"https://surrealdb.com/agent-memory/temporal"}]}
```
