Skip to content
arun mv
Back to blog
AI & Engineering

Episodic memory for agents with Graphiti

Episodic, bi-temporal memory with Graphiti lets an AI agent answer not just what's true now, but what was true when — without re-indexing the whole world.

· 1 min read

Episodic memory for agents with Graphiti
TL;DR the 30-second version

A static graph tells you what’s true now. An episodic graph tells you what was true at a point in time — which is what agents actually need to reason about change, audits, and their own past decisions.

In part one we argued that relationships beat raw similarity. But real knowledge isn’t static — facts get superseded, preferences change, decisions get revised.

The problem with overwriting

If your memory layer just upserts the latest value, you lose history. An agent asked “why did we switch databases?” can’t answer, because the previous state is gone.

fact: "primary database" — tracked over time, not overwritten time = Postgres valid_from switch decision = distributed store (current) "what was true then?" → Postgres "what is true now?" → new store overwrite would erase the left interval — and with it, "why did we switch?"
A fact isn't just true or false — it's true over an interval. Appending episodes with validity intervals (instead of overwriting) lets the agent answer 'what is true now?' and 'what was true then?' from the same graph.

Bi-temporal in practice

Graphiti tracks both when something happened and when the system learned about it. That bi-temporal model is what lets an agent reconstruct the world as it was — essential for audits, debugging, and explaining its own past decisions.

The cost is more edges and more careful queries. The payoff is memory that reflects reality instead of flattening it.


Related reading