Durable state
SQLite stores global tasks, DAG nodes, result payloads, and event history under ~/.agentd.
Local-first infrastructure for agent state
An out-of-process state machine daemon for AI agents. It owns durable task state, strict DAG transitions, file locks, heartbeats, and an append-only event journal.
What it does
SQLite stores global tasks, DAG nodes, result payloads, and event history under ~/.agentd.
Nodes move through PENDING, RUNNING, COMPLETED, or FAILED.
Workers acquire leases, heartbeat while running, and stale work rolls back to PENDING.
Agents from different providers can lease resource keys such as file:src/lib.rs before editing.
Overlapping Codex, Antigravity, or custom-agent edits can be compared as patch bundles instead of last writer wins.
Python, Node, Rust, and shell clients can coordinate through Unix Domain Socket JSON Lines IPC.
No network service is required. The daemon runs locally as a small Rust binary.
Agents can call DescribeInterface to learn supported methods and payload shapes.
Conflict resolution
agentd gives coordinators a provider-neutral handoff for Codex, Antigravity, DeepSeek scripts, and custom agents: resource locks, journaled intent, and patch bundles that can be compared before integration.
Prevent high-risk overlap with narrow locks for files, modules, generated artifacts, or logical work units.
Require each provider to emit intent, progress, result, and conflict events.
Compare patch bundles by base revision, touched paths, diff summary, assumptions, confidence, and verification output.
Merge compatible edits, reject stale or unverifiable changes, and record the accepted decision.
Runtime interface
The IPC contract is discoverable at runtime. Send one JSON object per line to the Unix socket and read one JSON response per line.
printf '%s\n' '{"id":1,"method":"DescribeInterface","params":{}}' \
| nc -U ~/.agentd/agentd.sock \
| python3 -m json.tool