Skip to main content

agent_loop

Function agent_loop 

Source
pub async fn agent_loop(
    prompts: Vec<AgentMessage>,
    context: AgentContext,
    config: &AgentLoopConfig,
    sink: &dyn EventSink,
    cancel: CancellationToken,
) -> Result<Vec<AgentMessage>, AgentLoopError>
Expand description

Starts a run with prompts. Returns the messages the run added.

ยงErrors

AgentLoopError::Hook when a loop hook fails (events emitted so far stand).