pub struct AgentBuilder { /* private fields */ }Expand description
Builds a validated Agent.
Implementations§
Source§impl AgentBuilder
impl AgentBuilder
Sourcepub fn from_definition(definition: AgentDefinition) -> Self
pub fn from_definition(definition: AgentDefinition) -> Self
Start from a definition.
Sourcepub fn instructions(self, instructions: impl Into<Instructions>) -> Self
pub fn instructions(self, instructions: impl Into<Instructions>) -> Self
Set instructions.
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Set description.
Sourcepub fn tools(self, tools: Vec<SharedTool>) -> Self
pub fn tools(self, tools: Vec<SharedTool>) -> Self
Attach tools available to the agent (filtered by definition policy).
Sourcepub fn completion(self, requirement: CompletionRequirement) -> Self
pub fn completion(self, requirement: CompletionRequirement) -> Self
Require a named tool call before the turn may complete.
Sourcepub fn output_schema(self, schema: Value) -> Self
pub fn output_schema(self, schema: Value) -> Self
Require structured JSON output matching a JSON Schema object.
Trait Implementations§
Source§impl Debug for AgentBuilder
impl Debug for AgentBuilder
Source§impl Default for AgentBuilder
impl Default for AgentBuilder
Source§fn default() -> AgentBuilder
fn default() -> AgentBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for AgentBuilder
impl !UnwindSafe for AgentBuilder
impl Freeze for AgentBuilder
impl Send for AgentBuilder
impl Sync for AgentBuilder
impl Unpin for AgentBuilder
impl UnsafeUnpin for AgentBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more