Skip to main content

run_loop

Function run_loop 

Source
pub async fn run_loop<A, F>(
    agent: &A,
    session: &mut Session<A::Msg>,
    config: &LoopConfig,
    on_event: F,
) -> Result<usize, A::Error>
where A: SgrAgent, F: FnMut(LoopEvent<'_, A::Action>) + Send,
Expand description

Run the SGR agent loop (non-streaming).

trim → decide → check loop → execute → push results → repeat

Returns the number of steps executed.