pub struct AgentBuilder { /* private fields */ }Expand description
Builds an Agent with runtime-friendly defaults.
Implementations§
Source§impl AgentBuilder
impl AgentBuilder
Sourcepub fn new(name: impl Into<String>, system_prompt: impl Into<String>) -> Self
pub fn new(name: impl Into<String>, system_prompt: impl Into<String>) -> Self
Create an agent builder from the required embedder-facing fields.
pub fn name(self, name: impl Into<String>) -> Self
pub fn display_name(self, display_name: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
pub fn system_prompt(self, system_prompt: impl Into<String>) -> Self
pub fn default_model_id(self, default_model_id: ModelId) -> Self
pub fn tag(self, tag: impl Into<String>) -> Self
pub fn capability(self, capability: impl Into<AgentCapabilityConfig>) -> Self
pub fn with_capability( self, capability: impl Into<AgentCapabilityConfig>, ) -> Self
pub fn capabilities<I, C>(self, capabilities: I) -> Self
pub fn initial_file(self, file: InitialFile) -> Self
pub fn network_access(self, network_access: NetworkAccessList) -> Self
pub fn max_iterations(self, max_iterations: usize) -> Self
pub fn tool(self, tool: ToolDefinition) -> Self
pub fn tools<I>(self, tools: I) -> Selfwhere
I: IntoIterator<Item = ToolDefinition>,
pub fn mcp_servers(self, mcp_servers: ScopedMcpServers) -> Self
pub fn status(self, status: AgentStatus) -> Self
pub fn created_at(self, created_at: DateTime<Utc>) -> Self
pub fn updated_at(self, updated_at: DateTime<Utc>) -> Self
Trait Implementations§
Source§impl Clone for AgentBuilder
impl Clone for AgentBuilder
Source§fn clone(&self) -> AgentBuilder
fn clone(&self) -> AgentBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AgentBuilder
impl RefUnwindSafe for AgentBuilder
impl Send for AgentBuilder
impl Sync for AgentBuilder
impl Unpin for AgentBuilder
impl UnsafeUnpin for AgentBuilder
impl UnwindSafe 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request