Skip to main content

Module builder

Module builder 

Source
Expand description

AgentBuilder — create an Agent in 3 lines

Provides a fluent Builder API, modeled on rig’s client.agent(model).preamble(...).build().

§Example

let agent = AgentBuilder::new()
    .llm(OpenAIChat::new(OpenAIConfig::new("sk-...")))
    .system("You are a helpful assistant.")
    .tool(Calculator::new())
    .build()?;

Structs§

AgentBuilder
Agent Builder — fluent API to create a FunctionCallingAgent