Skip to main content

Module kernel

Module kernel 

Source
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).
  • SideEffect — side effects that outlive the turn (background jobs, scheduled wakeups).
  • AgentKernel — the stateless single-turn executor (struct + builder only; run() is not yet implemented).

§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.

As of Goal 219 Commit 1, the kernel passes the caller’s AgentEvent channel directly to RunCore — no internal bridge.

Structs§

AgentKernel
The stateless Agent Kernel — a single-turn ReAct executor.
AgentKernelBuilder
Builder for AgentKernel.
TurnContext
Everything the Kernel needs to execute one turn.
TurnOutcome
The result of executing one turn.

Enums§

SideEffect
A side effect produced during a turn that outlives the turn itself. The Wrapper is responsible for managing these.