State Graph
Versioned state graph model and snapshot policy.
State Graph
The state graph records explicit, versioned state. Runtime behavior must not rely on hidden mutable state that cannot be inspected, replayed, or linked to trace events.
State node fields
A state commit records:
state_node_id;- tenant, agent, and run identity;
- parent state node IDs;
- snapshot or patch reference;
- state hash;
- trace event linkage;
- schema/version metadata;
- timestamp.
Commit behavior
Each successful tick commits a new state node when state changes are part of the policy outcome. The state head advances only after storage accepts the commit.
If a state commit fails, the runtime must not silently advance to the next tick. The failure is traceable where trace durability is available.
Snapshots and references
Snapshots let replay and migration tools reconstruct state efficiently. Read-only state references allow collaboration without transferring write authority.
Distributed boundary
Only one runtime context should own write authority for a state head at a time. Distributed collaboration uses explicit handoff, snapshot import, state fork, or read-only references rather than hidden shared mutable state.
Replay behavior
Replay reconstructs state lineage from committed nodes and trace events. It does not mutate live state heads by default.