Skip to main content

Module agent_loop

Module agent_loop 

Source
Expand description

Shared agent loop for tool-calling models.

Both TUI and non-interactive modes delegate to this loop. The AgentObserver trait allows each mode to provide its own I/O behavior (rendering, interruption, logging).

Structs§

AgentLoopResult
Result of running the agent loop
ToolExecutionResult
Result of a single tool execution

Enums§

LoopControl
Control flow for the agent loop

Constants§

MAX_AGENT_ITERATIONS
Default maximum iterations for the agent loop

Traits§

AgentObserver
How the agent loop communicates with its environment

Functions§

run_agent_loop
Run the agent loop: execute tool calls, feed results back, repeat.