MemothDB

A database that stores memory, and proves what it served.

A bitemporal memory database for AI agents, written in Rust. Every read names who is asking and leaves a sealed record before the answer goes out.

The query language

Permission is part of the question.

Built for sub-millisecond retrieval, and a read cannot be written without naming who is asking and when. Four lines from a real session:

MemothDB · from a real session
Statement and replyWhat it shows
GRANT 7 LABEL 42 VALID 1743465600 1775001600{"ok":true,"lsn":1}Agent 7 may see label 42, and only within that window.
RECALL FOR 7 AT 1756000000 TAGS 11{"ok":true,"served":["4a7f2c9e…93b41d7c"],"epoch":1,"reverified":false,"decision_lsn":3}The read comes back with the position of its own receipt, durable before you saw this line.
RECALL AT 1756000000{"ok":false,"error":"parse error: RECALL FOR <principal> AT <valid_at> — a read cannot be expressed without its principal"}There is no anonymous read to forget to authorise. The grammar will not form one.
REPLAY 3{"ok":true,"outcome":"match","served":["4a7f2c9e…93b41d7c"]}The decision re-derived from the log alone. It agrees with what was served.

The data model

Typed memory, not rows and not chunks.

The four kinds Memoth serves, stored as themselves rather than flattened into documents.

EPISODIC

What happened

Incidents, decisions, the run that failed and why.

SEMANTIC

What's true

Facts, ownership, configuration; a new value supersedes the old one.

PROCEDURAL

How it's done

Runbooks and sequences, including what an agent learned on the job.

WORKING

What's in hand

A bounded, decaying set per agent, always a subset of what it may see.

At a glance

The specification.

MemothDB · specification
Time modelWhen a memory or a grant was valid, and when the system knew it. Both are queryable.
DurabilityAn acknowledgement means on disk. A failed sync stops the writer rather than retrying.
Read semanticsEvery read names its principal and seals a decision record before the answer is returned.
RetrievalTag and label filters, vector search, a per-agent working set. Entitlement is resolved before anything is scored.

Measured, not promised

A database earns trust by how it's checked.

Permission grid
118,800

Points of who could see what and when, cross-checked against a brute-force calculation.

Fault & crash
Every I/O

Each disk operation failed in turn, plus power loss and process kills. Acknowledged data survives.

Replay
18,242

Randomized histories replayed with zero failures.

Get started

Put it under your agents.

We work with a small number of teams whose agents touch data someone will ask about later.