Expand description
Turn-level types for the Agent Run Kernel architecture.
This module defines the input/output contract for a single turn of agent execution:
TurnContext— everything the kernel needs to execute one turn (messages, tools, config, event sink).TurnOutcome— the result of executing one turn (new messages, usage, finish reason, side effects).AgentKernel— the stateless single-turn executor. Itsrun()method delegates to [crate::run_core::RunCore] which owns the ReAct step loop.
§Design
The Kernel is stateless and knows nothing about transcripts, sessions,
or cross-turn state. The Wrapper (AgentRuntime) prepares a
TurnContext from its transcript, calls the kernel, and then
incorporates the TurnOutcome back into its state.
The kernel passes the caller’s AgentEvent channel directly to
RunCore — no internal bridge (introduced in Goal 219).
Structs§
- Agent
Kernel - The stateless Agent Kernel — a single-turn ReAct executor.
- Agent
Kernel Builder - Builder for
AgentKernel. - Turn
Context - Everything the Kernel needs to execute one turn.
- Turn
Outcome - The result of executing one turn.