Why can't i easily see what the agent did to produce the PR? why can't i restart a different agent from a state?
I got tired of this. agd is a content-addressed object store and causal DAG for recording agent behavior. It works like git (blobs, trees, refs, immutable objects identified by hash), but the object types are specific to LLM interactions: messages with typed content parts, tool definitions, and workspace snapshots that form a causal graph.
The core idea is stolen from git: the data model is the API. You interact with objects directly. Everything is immutable, everything has a hash.
An "action" in the DAG records: what messages the agent saw (observed state), what it produced (produced state), which tools were available, which model was used, and what caused it (parent actions).
Two states per action, both full snapshots, not deltas. You diff them to see what changed. What you get: - agd log --session s1 shows one conversation's full causal chain - agd show <action> --produced --expand shows the exact prompt and tool calls - agd diff between two actions compares messages and workspace files - agd rewind moves a session back to a previous point (old actions stay in the store) - agd replay reconstructs the exact input state and reruns an action
It integrates as middleware/plugin. Wraps your existing LLM calls, records before/after state, doesn't require rewriting your agent code. The session ref (like a git branch pointer) auto-advances on each action, so parent tracking is a single ref read.
Written in Zig. Most of the code was written with heavy AI assistance. The store is append-only loose files, like git's object directory. Write path targets low single-digit ms per action with batched fsync. Sessions can be bundled and published to a remote for sharing and viewing(working on a POC of this, have some core questions)
This is pre-alpha. The object model and write path work. Workspace capture, session sharing, and a Phoenix LiveView web viewer are functional.
Plenty is still missing: resume-from-any-point, proper diffing, the replay command. The on-disk format will probably change. I wouldn't depend on it for anything you care about yet.
What it does not do: orchestrate agents, make agents smarter, stream in real time, or replace your framework.
Looking for feedback, thoughts, contributors