pub struct AgentBuilder { /* private fields */ }Expand description
Builder for constructing AgentCore instances
Implementations§
Source§impl AgentBuilder
impl AgentBuilder
Sourcepub fn new_with_registry(
registry: &AgentRegistry,
config: &AppConfig,
session_id: Option<String>,
) -> Result<AgentCore>
pub fn new_with_registry( registry: &AgentRegistry, config: &AppConfig, session_id: Option<String>, ) -> Result<AgentCore>
Create an agent from the registry with the active profile This is a convenience method for CLI use
Sourcepub fn with_profile(self, profile: AgentProfile) -> Self
pub fn with_profile(self, profile: AgentProfile) -> Self
Set the agent profile
Sourcepub fn with_provider(self, provider: Arc<dyn ModelProvider>) -> Self
pub fn with_provider(self, provider: Arc<dyn ModelProvider>) -> Self
Set the model provider
Sourcepub fn with_embeddings_client(self, embeddings_client: EmbeddingsClient) -> Self
pub fn with_embeddings_client(self, embeddings_client: EmbeddingsClient) -> Self
Set a custom embeddings client
Sourcepub fn with_persistence(self, persistence: Persistence) -> Self
pub fn with_persistence(self, persistence: Persistence) -> Self
Set the persistence layer
Sourcepub fn with_session_id(self, session_id: impl Into<String>) -> Self
pub fn with_session_id(self, session_id: impl Into<String>) -> Self
Set the session ID
Sourcepub fn with_config(self, config: AppConfig) -> Self
pub fn with_config(self, config: AppConfig) -> Self
Set the application configuration (used to derive defaults)
Sourcepub fn with_tool_registry(self, tool_registry: Arc<ToolRegistry>) -> Self
pub fn with_tool_registry(self, tool_registry: Arc<ToolRegistry>) -> Self
Set the tool registry
Sourcepub fn with_policy_engine(self, policy_engine: Arc<PolicyEngine>) -> Self
pub fn with_policy_engine(self, policy_engine: Arc<PolicyEngine>) -> Self
Set the policy engine
Sourcepub fn with_agent_name(self, agent_name: impl Into<String>) -> Self
pub fn with_agent_name(self, agent_name: impl Into<String>) -> Self
Set the logical agent name (used for telemetry/logging)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AgentBuilder
impl !RefUnwindSafe for AgentBuilder
impl Send for AgentBuilder
impl Sync for AgentBuilder
impl Unpin 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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().