Two records hold what an agent knows and what it was asked to do: TaskIR, the compiled form of the request, and AgentState, the canonical semantic truth of the run.
Where each kind of state lives
Information flows down. The Intent Graph Kernel informs a run; it does not drive it.
Architecture contract
TaskIR
TaskIR is the first decoupling boundary. Whatever the caller wrote, the compiler turns it into one typed task:
Ambiguity is represented explicitly. Unresolved ambiguity escalates instead of being guessed.
AgentState
AgentState is the run’s truth. It holds identity andstate_version, the user intent, acceptance criteria, constraints, environment and repository state, the plan and current position in the graph, hypotheses kept apart from facts, selected context, generated artifacts, mutation and tool receipts, diagnostics, verification results, unresolved failures, permissions, budgets, subgoals, locks and completion state.
The rules:
- Canonical state outranks everything. Transcripts, caches, summaries and model memory are all subordinate to it.
- Every durable write is versioned. A write increments
state_versionor records an explicit no-op. - Writes are compare-and-swap. A node reads a snapshot at version N. Its commit succeeds only if state is still at N, and then yields N+1. A stale writer fails with
STATE_CONFLICT. Last writer wins is not allowed. - Hypotheses are not facts. A guess stays a hypothesis until evidence confirms it.
- Completion is recorded, never inferred from the absence of errors.
- Model changes never change state. Loading, evicting or losing a model has no effect on AgentState.
- Model output needs provenance. Output without a provenance record never becomes durable state.
Current implementation
The AgentState and TaskIR schemas are frozen in Kernel ABI 1.0.0 with schema tests. The work runtime today keeps its own durable ledger of graph, node and receipt events, which is the durable record for work. A runtime store that holds AgentState with compare-and-swap commits is not built yet.Availability
Developer relevance
Components read a projection of AgentState and write typed results. They do not keep their own hidden state between steps. If you build against the contracts now, validate against the schemas inspec/Contracts/kernel/v1/schemas/.