My AI agent remembers *when* it believed things — valid-time memory on FalkorDB
Description and use
TimeMachine uses FalkorDB to store agent beliefs with validity intervals, enabling precise reconstruction of past beliefs and counterfactual reasoning.
Problem
AI agents cannot answer what they believed at a past time because vector memory lacks a time axis, making audit trails impossible.
Outcome
TimeMachine provides exact past‑belief reconstruction and counterfactual reasoning, enabling audit‑ready AI agents that can answer time‑specific belief questions and explore alternate histories.
Workflow
- Seed a fictional incident timeline into FalkorDB.
- Create BELIEVES and SUPPORTED_BY edges with valid_from/valid_to.
- When a belief changes, close the old BELIEVES edge by setting valid_to.
- Run an as‑of Cypher query to retrieve beliefs valid at a given timestamp.
- Use agent.ask() with an as_of parameter to get context‑specific answers.
- Use agent.why_changed() to trace why a belief changed.
- Use agent.timeline() to view full belief history.
- For counterfactuals, fork the graph with FalkorDB multi‑graph support, remove a piece of evidence, and recompute beliefs with agent.ask("What if …").
Evidence
AI agents forget. Worse — when they change their mind, the old belief is gone.
TimeMachine stores agent memory as a graph in FalkorDB where every belief edge carries a validity interval
When the agent changes its mind, the old BELIEVES edge is closed (valid_to gets set) — never deleted.
agent.ask("What caused the checkout outage?", as_of="2026-10-08") # → connection pool exhaustion
agent.ask("What if the traffic report never existed?")
- Record date: 2026-10-18T11:41:01.700Z