Expand description
The agent loop.
One AgentSession holds a conversation with one agent. Each
run is a task: the model is called, its tool calls are
checked against the shared Policy, asked of the
Approver when needed, charged to the task Budget, executed with a
timeout and the task’s CancelToken, and recorded in the Trace. Tool
results go back to the model wrapped as untrusted data, with the trace step
ids it may cite. Events stream to the UI as they happen.
Structs§
- Agent
Config - Static settings for a session.
- Agent
Session - A conversation with one agent.
- Outcome
- The result of one task.
- Pages
Prompt - The task’s page budget ran out: may it read
extensionmore pages (the “+5 pages” card)?
Enums§
- Agent
Event - Streamed to the UI while a task runs.
- Approval
Answer - The user’s answer to an approval card.
- Stop
Reason - Why a task ended.
Traits§
- Approver
- Shows approval cards and waits for the user. The session races it against cancellation.