Skip to main content

run

Function run 

Source
pub fn run<H>(
    http: H,
    api_key: String,
    tools: Arc<Vec<Box<dyn Tool>>>,
    user_prompt: String,
    opts: RunOptions,
) -> impl Stream<Item = SdkMessage>
where H: HttpClient + Send + Sync + 'static,
Expand description

Run the agent loop and stream SdkMessages in turn order.

tools is wrapped in an Arc so callers can reuse the same registry across multiple runs.