A turn, end to end

For a call:
The runtime runs this sequence.

1. Append the goal

The goal links to the previous frontier. On the first turn, the runtime also adds the system contract.

2. Compile the working view

The compiler starts with required state:
  • latest system and goal;
  • every frontier head;
  • current resource heads;
  • ten recent non-superseded nodes;
  • up to two levels of operational parents.
It ranks older candidates by relevance and recency, adds their bounded closure, and stops at a node budget. Repeated reads, calls, results, and errors collapse inside this view only. The view includes a deterministic whole-graph digest, so omitted history still contributes stable counts and recent notes.
Defaults: 16,000 estimated target tokens, 64,000 hard ceiling.

3. Call the model

The provider gets:
  • input.prompt: the compiled view;
  • input.system: the action protocol and tool list;
  • an abort signal;
  • adapter parameters.
The model returns one action:
or:
The model does not return graph edges.

4. Record the action

Before the runtime acts, it appends an inference node. Its parents are exactly the IDs the compiler chose.
This is the defining causal link.

5. Execute or retry

For a tool:
  1. validate the tool name and schema;
  2. record tool_call;
  3. run the tool;
  4. record tool_result;
  5. extract resource evidence and recognized verification evidence from the result;
  6. compile the next view.
A successful post-mutation read, node --check, or explicit app_control check, restart, or smoke action also appends a dedicated verification node linked to its tool_result. Domain-specific tools remain your policy boundary. Invalid output becomes protocol_error and the loop continues. Failures stay as evidence for the next call.

6. Commit

A successful final appends answer, produces AgentRunResult, and replaces the agent’s committed state. A failed or aborted run throws AgentRunError. Its diagnostic state, graph, trace, and metrics stay on the error, but the agent keeps its last good state.
Commit rule

Successful runs advance state. Failed and aborted runs do not.

The knobs

Next: Projection.