Expand description
Agent loop. The whole kernel.
Tiny on purpose: receive a goal, ask the model what to do, run any tool calls, feed results back, repeat until the model stops requesting tools or we hit the step budget. Everything interesting (which model, which tools, what system prompt) is injected by the caller.
The loop emits StepEvents through a channel so a UI/CLI/log layer can
observe progress without coupling to the agent’s internals.