Skip to main content

run_loop

Function run_loop 

Source
pub async fn run_loop(
    config: &AgentConfig,
    tools: HashMap<String, Arc<dyn Tool>>,
    run_ctx: RunContext,
    cancellation_token: Option<RunCancellationToken>,
    state_committer: Option<Arc<dyn StateCommitter>>,
) -> LoopOutcome
Expand description

Run the full agent loop until completion or a stop condition is met.

This is the primary non-streaming entry point. Tools are passed directly and used as the default tool set unless config.step_tool_provider is set (for dynamic per-step tool resolution).