Expand description
The single default cloud Agent loop. It emits every model-visible fact and lifecycle transition before exposing it to projections or UI consumers.
Structs§
- Agent
Runtime - The single Turn/Step loop. Build it with
AgentRuntime::newand thewith_*methods, then callrunper Turn. - Approximate
Token Meter - Character-based estimate (about four characters per token).
- Cancellation
Token - Hierarchical cancellation flag. Cancelling a parent cancels every child;
cancelledresolves without polling. - Compaction
Result - Summary text and its token usage.
- Model
Compactor - Default
Compactorthat asks the same model for a structured summary through a durable provider attempt. - Runtime
Limits - Hard limits for one Run.
- Runtime
Outcome - Terminal result of a Turn.
- Turn
Request - Everything the loop needs to run one Turn.
Enums§
- Runtime
Error - Failure while running a Turn.
Traits§
- Compactor
- Produces the summary that replaces old transcript when the context overflows.
- Event
Writer - Fenced append/read access to the Session log for one Run.
- Token
Meter - Token estimator used for limits and compaction decisions.
Functions§
- cancel_
events - Events that close an interrupted Run as cancelled.
- failure_
events - Events that close an interrupted Run as failed with
error_code. - recovery_
events - Events that close an interrupted Run as failed with
worker_restarted, so recovery starts from a clean lifecycle.