Article
graphlava and tiramemsu: two stores from one idea
Both projects start from the same sentence: every fact is a statement with its own ID, and an ID can be talked about. tiramemsu then decides never to forget. graphlava decides to remember only what is true now, and to do that fast. The rest of each design follows from that one choice.
Two desserts, one recipe
tiramemsu is an embedded graph database for agent memory. It was built in September and October 2026 and is released as 0.12 on crates.io, PyPI and npm. Its logo is a tiramisu whose layers are a graph. graphlava (working name meta-core in its specs) is a sibling project in design. Its logo is a diamond of baklava: layers on the side, a hyperedge on top.
The two are standalone. graphlava's specs say so directly: time travel, audit history and bitemporality are tiramemsu's job, and graphlava shares no log format with it. They are separate products for separate workloads, not a fork and its parent.
What they share
- Statements with IDs. In both, a fact is a subject, predicate and object with an ID, and that ID can be the subject of another statement. Confidence, source and belief are statements about statements, to any depth.
- The predicate is an IRI. Neither lets an edge stand in predicate position. Role statements say the same thing.
- One IR under several languages. tiramemsu compiles SPARQL and openCypher to one logical IR. graphlava compiles SPARQL 1.2 and Datalog (v0) and a Cypher subset (v1) to one extended-Datalog IR.
- Datalog. tiramemsu has an opt-in Datalog crate with temporal operators. graphlava has Datalog as a first-class query surface from v0, with materialised rules in v1.
- redb. graphlava stores everything in one redb file. tiramemsu runs on SQLite by default and on redb as an experimental second engine. graphlava's decision record for redb notes that tiramemsu already uses it.
- Embedded, for agents. Both are libraries that live inside the agent's process and hold one memory per file.
Where they split: time
A tiramemsu statement is a row that is never deleted and never edited. Next to (eid, s, p, o) it carries two clocks: when the database believed it (added and retracted) and when it was true (valid from and valid to). SQLite triggers inside the file reject DELETE and any second change to a row. Forgetting means retracting. Correcting means supersede: a new statement replaces the old one, and the layers on the old one are replayed onto the new one. You can ask what the memory believed at any past moment.
graphlava has no clocks at all. Its first two goals, in order, are performance on the agent-memory mix (small write transactions, frequent value overwrites, point lookups, short traversals, star patterns) and mutable current state: no transaction time, no valid time, no history. A statement's object can change in place, and the ID stays:
# graphlava: the same reifier on both sides keeps the statement ID
DELETE { << :alice :worksAt ?old ~ ?r >> }
INSERT { << :alice :worksAt :globex ~ ?r >> }
WHERE { << :alice :worksAt ?old ~ ?r >> }
After that request, ?r :confidence 0.9 still holds, and (:alice :worksAt :acme) is gone from every index. In tiramemsu the same correction leaves the Acme row in place with a retraction time, adds a Globex row, and copies the layers across. Both are right for what they promise. One keeps the past. The other keeps the present small.
graphlava can also make this the default for a predicate. Declared functional (ADR 0028), :worksAt allows one employer per person, and a plain insert of the new employer updates the statement in place, keeping its ID, confidence and source.
Delete differs the same way. A graphlava delete really deletes: the statement, every statement whose subject is it, transitively, in one transaction, and IDs are never reused. tiramemsu's retraction also cascades (over statements whose subject or object is the retracted ID), but every cascaded row stays readable as of the moment before.
| tiramemsu | graphlava | |
|---|---|---|
| State kept | Every version, transaction time and valid time | Current state only |
| Correct a fact | supersede: new statement, layers replayed | update in place, same ID |
| Remove a fact | Retract; the row stays, with a retraction time | Delete; annotations cascade and are gone |
| Cascade follows | subject and object references | subject references (annotations) |
| Past views | as_of, history, valid_at | None, by design |
Where they split: structure
n-ary relations
tiramemsu rows have exactly two ends. A meeting with three participants is a node with role statements, or a binary edge with extra ends as annotations. Both are plain rows, so they get time and cascade for free.
graphlava has a fourth kind of item, the hyperedge. Its type and roles are declared in the meta-model. Roles hold nodes; a literal such as a meeting's date is an inline property of the hyperedge (ADR 0028). It is stored as one record holding all role fillers, plus one incidence key per filler, and it is not written to the triple orderings. Queries see the roles as virtual triples. A role filling gets a statement ID only when something annotates it.
# reads the same in both stores; in graphlava the roles come from one record
SELECT ?a ?t WHERE { ?e a :Meeting ; :agent ?a ; :target ?t }
Graphs
In tiramemsu a named graph is a tag. Membership is one more layer statement, (e sys:inGraph g), and a graph can be named by a node or by a statement, so an edge can hold a subgraph of its own. Nesting is an ordinary statement between graphs, walked with a path.
In graphlava a graph is its own kind of ID. Each statement's ID comes from a chunk leased to one graph, so its home graph is read off the ID and costs no bytes. Extra memberships are entries in a gmem table. As in tiramemsu, a fact in several graphs stays one statement with one ID: inserting it into a second graph adds a membership, and deleting it inside one graph removes only that membership (ADR 0024). Nesting is a DAG kept with its closure, so GRAPH :g matches g and everything under it with one range filter, and a cycle is rejected at write time. Giving an edge its own contents is a pattern here (annotate the statement with a graph), not a built-in.
Duplicates
tiramemsu keeps every occurrence of a triple as its own row, because "Alice left Acme and came back" is two episodes with two histories. graphlava keeps one statement per (s, p, o) by default and allows parallel statements only on predicates declared multi. Without history, a second copy of the same fact usually has nothing to say.
Where they split: maturity
This is the largest difference today. tiramemsu is released software with SPARQL, openCypher, paths, text and vector recall, N3, Datalog and ELPI reasoning, an MCP server, Python and Node bindings, and a WebAssembly build. graphlava is a set of specifications, 30 decision records and a Rust workspace with CI for Linux, macOS, Windows, iOS and Android. Its engine is not written. The first step on its roadmap is an engine bake-off that measures redb against libmdbx and Sanakirja before any engine code is written.
The planned comparison
graphlava's benchmark plan has a section called Versus tiramemsu: the same dataset and workload on both, at 1, 10 and 100 versions per fact. The metrics are p50 and p99 latency of the agent-memory mix, file size and write throughput, per version count.
The stated expectation is that the two are close at one version per fact, and that graphlava pulls ahead as history grows, because it carries none. If graphlava is not ahead at 10 and 100 versions, the plan reads that as a bottleneck in the query layer, not in storage. This is an expectation written before any code. The target in the spec is "to be measured", and this article reports no result.
The comparison is fair only for workloads that do not need the past. A query like "what did the agent believe last Tuesday" has no graphlava answer at any speed.
Which one to use
Pick tiramemsu when:
- the agent must be able to say what it believed, and when, or why it changed its mind;
- you need an audit trail in which nothing is ever deleted, only retracted;
- you need valid time: facts true over an interval, time-respecting paths;
- you need it to work today, in Rust, Python, Node or the browser.
Watch graphlava when:
- the memory is a working state that is overwritten often, and history is noise;
- you have real n-ary relations and want them stored once, not as a node plus k role rows;
- you have many small nested scopes (episodes inside sessions inside agents) and want scoped queries to cost in proportion to the scope;
- you want Datalog rules inside the engine, and one file that also opens on iOS and Android.
The two also fit together. An agent can keep its long-term, auditable memory in tiramemsu and a fast working set in graphlava, with the same statement-with-ID model on both sides. There is no shared format between them, so moving data across is an export and an import, for example through SPARQL.
The short version
Same recipe: statements with IDs, layers of statements about statements, one IR under several languages. Different desserts. tiramemsu keeps every layer it ever baked. graphlava keeps one fresh piece, cut to shape, with a pistachio in the middle for the relations that have more than two ends.
References
- Tiramemsu: README and design notes. github.com/Volland/tiramemsu; tiramemsu.com.
- Tiramemsu. Metagraphs from one row shape, 2026.
- graphlava specifications: overview (goals and non-goals), data model, hyperedges, named and nested graphs, benchmarks; decision records 0002, 0004 and 0006. github.com/Volland/graphlava.