Skip to main content

agent_loop

Function agent_loop 

Source
pub fn agent_loop(
    prompt_messages: Vec<AgentMessage>,
    system_prompt: String,
    config: AgentLoopConfig,
    cancellation_token: CancellationToken,
) -> Pin<Box<dyn Stream<Item = AgentEvent> + Send>>
Expand description

Start a new agent loop with prompt messages.

Creates an initial context with the prompt messages, then runs the loop. Returns a stream of AgentEvent values.