Skip to main content

Module agent

Module agent 

Source
Expand description

Agent runtime - the core orchestration loop.

The agent coordinates between:

  • Provider: Makes LLM API calls
  • Tools: Executes tool calls from the assistant
  • Session: Persists conversation history

The main loop:

  1. Receive user input
  2. Build context (system prompt + history + tools)
  3. Stream completion from provider
  4. If tool calls: execute tools, append results, goto 3
  5. If done: return final message

Structs§

AbortHandle
Handle to request an abort of an in-flight agent run.
AbortSignal
Signal for observing abort requests.
Agent
The agent runtime that orchestrates LLM calls and tool execution.
AgentConfig
Configuration for the agent.
AgentSession
PreWarmedExtensionRuntime
Pre-created extension runtime state for overlapping startup I/O.

Enums§

AgentEvent
Events emitted by the agent during execution.
QueueMode

Type Aliases§

MessageFetcher
Async fetcher for queued messages (steering or follow-up).