Agentic state (todo + causal graph)
Interactive demo todo list UI with a live DAG of VcsOps chained by previousHash.
The todo list you see in apps is a projection. The system of record is the causal op stream: content-addressed VcsOp records linked by previousHash.
Try it
- Alice / Bob: separate todo lists add and complete tasks; each peer appends ops on their own chain.
- Right: merged causal graph nodes are ops (colored by agent), edges follow
previousHashwhen present in the merged view. - Peers sync through an in-process
MemorySyncRoom(have→want→ops→ack), same relay shape as production sync.
This embed uses real createVcsOp hashing and SyncEngine from the Trellis kernel (browser bundle). Full repos use TrellisClient with the same room transport on PartyKit or WebSocket.
Three layers (don't mix them up)
| Layer | Package | What it is |
|---|---|---|
| Causal stream | VCS / TrellisClient | Immutable ops source of truth |
| Projections | Engine / UI | Todo list, graph view, issues |
| Ephemeral UI | trellis/realtime | Presence, cursors not in the op log |
Realtime covers the third row. This page is row one and two.
Local development
# trellis-node
npm run build:state-demo-bundle
just docs-state-demo-sync
# trellis-docs www
npm run sync:state-demo
npm run dev