Expand description
Sans-IO run state machine for the agent prompt loop.
The run loop is modeled as a pure state machine that receives input events, transitions between states, and produces output actions. This design is:
- Runtime-agnostic: no dependency on tokio or any async runtime.
- Serializable: the entire machine state can be serialized for checkpoint/resume across process boundaries.
- Testable: transitions can be verified without network, model API, or actual tool execution.
The transition function is the core: (state, input, config) -> (new_state, actions).
Structs§
- RunConfig
- Configuration for the run state machine.
Enums§
- RunAction
- Actions produced by the state machine that must be executed by the runtime.
- RunInput
- Input events that drive the state machine forward.
- RunState
- The state of a single agent run.
Functions§
- transition
- The core transition function.