graphlava

Article

graphlava and tiramemsu: two stores from one idea

graphlava articles · 24 November 2026

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

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.

tiramemsugraphlava
State keptEvery version, transaction time and valid timeCurrent state only
Correct a factsupersede: new statement, layers replayedupdate in place, same ID
Remove a factRetract; the row stays, with a retraction timeDelete; annotations cascade and are gone
Cascade followssubject and object referencessubject references (annotations)
Past viewsas_of, history, valid_atNone, 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:

Watch graphlava when:

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

  1. Tiramemsu: README and design notes. github.com/Volland/tiramemsu; tiramemsu.com.
  2. Tiramemsu. Metagraphs from one row shape, 2026.
  3. 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.
← Statement graphs