cd /news/artificial-intelligence/bitemporal-provenance-in-agent-memor… · home topics artificial-intelligence article
[ARTICLE · art-55764] src=news.ycombinator.com ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

Bitemporal provenance in agent memory: What did we believe, when, and why

MnesticDB, a fork of the dormant CozoDB, adds bitemporal provenance and semiring provenance to enable auditable, time-travel-capable agent memory. The database tracks both valid time and transaction time, and uses a semiring framework to compute cost, confidence, or evidence chains from the same recursive rules. These features allow developers to query what an AI agent believed at any point in time and why.

read2 min views1 publishedJul 11, 2026

CozoDB, a transactional relational-graph-vector database with embedded Datalog in Rust, went dormant in December 2024. We hard-forked it as MnesticDB (not official CozoDB), under an MPL-2.0 license, to continue Ziyang Hu and the Cozo Project Authors' vision of building a "Hippocampus for AI", or agentic memory.

But agentic memory isn't a pile of current facts with a log of past decisions. It has to track change over time, and be auditable. We've recently shipped several features that make this possible.

First, we added a distinction between valid time (when a fact is true about the world) and transaction time (when the database came to believe it). This allows time travel, the ability to audit the memory at any point and see what knowledge any past decision was based on. Every write draws its transaction time from a crash-safe monotone commit clock, an atomic high-water mark persisted inside the same transaction that commits the data, so the clock can never advance without the write landing, even across a crash. Because the stamp is allocated in the commit critical section, transaction-time order equals commit order equals visibility order, which makes time travel sound.

Then we implemented the semiring provenance framework from Green et al.'s 2007 paper: the same recursive rule computes existence, cost, confidence, or supporting evidence just by swapping the combine operator, instead of a bespoke tracking system per application. In practice, an aggregate like min_cost_k returns not just an answer but the k best derivations behind it, each with the evidence chain that justifies it. And because those annotations are ordinary values, materializing a derivation into a transaction-time relation composes the two features into an annotated belief history. Every derivation carries the transaction time we came to believe it, so an as-of read tells you not just what we believed at T, but why.

Followed by some more improvements:

  • Added ::kill and :timeout to provide the ability to interrupt long-running queries.

  • Implemented a deterministic greedy join reorder to prevent naively-ordered conjunctions, the kind that an LLM may write, from spinning. 54.5x improvement with identical results.

  • Added an opt-in Yannakakis-style per-key factorized count() instead of join enumeration, with a 4-342x improvement with identical results.

It's available on crates.io and PyPI.

https://crates.io/crates/mnestic https://pypi.org/project/mnestic/

If you're building agent memory and want time-travel + provenance in the graph database rather than bolted on, I'd love to exchange notes. Special thanks to Matthias Autrata for providing valuable feedback and guidance that was critical to implementing the above improvements.

Comments URL: [https://news.ycombinator.com/item?id=48875749](https://news.ycombinator.com/item?id=48875749)

Points: 1

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @cozodb 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/bitemporal-provenanc…] indexed:0 read:2min 2026-07-11 ·