pub struct AgentBuilder { /* private fields */ }Implementations§
Source§impl AgentBuilder
impl AgentBuilder
pub fn new() -> AgentBuilder
pub fn model_provider( self, model_provider: Box<dyn ModelProvider>, ) -> AgentBuilder
pub fn tools(self, tools: Vec<Box<dyn Tool>>) -> AgentBuilder
pub fn memory(self, memory: Arc<dyn Memory>) -> AgentBuilder
pub fn observer(self, observer: Arc<dyn Observer>) -> AgentBuilder
pub fn prompt_builder(self, prompt_builder: SystemPromptBuilder) -> AgentBuilder
pub fn tool_dispatcher( self, tool_dispatcher: Box<dyn ToolDispatcher>, ) -> AgentBuilder
pub fn memory_strategy( self, memory_strategy: Arc<dyn MemoryStrategy>, ) -> AgentBuilder
pub fn config(self, config: AliasedAgentConfig) -> AgentBuilder
pub fn multimodal_config( self, multimodal_config: MultimodalConfig, ) -> AgentBuilder
pub fn model_name(self, model_name: String) -> AgentBuilder
pub fn model_provider_name(self, name: String) -> AgentBuilder
pub fn temperature(self, temperature: Option<f64>) -> AgentBuilder
pub fn workspace_dir(self, workspace_dir: PathBuf) -> AgentBuilder
pub fn agent_workspace_dir(self, agent_workspace_dir: PathBuf) -> AgentBuilder
pub fn identity_config(self, identity_config: IdentityConfig) -> AgentBuilder
pub fn skills(self, skills: Vec<Skill>) -> AgentBuilder
pub fn skills_prompt_mode( self, skills_prompt_mode: SkillsPromptInjectionMode, ) -> AgentBuilder
pub fn auto_save(self, auto_save: bool) -> AgentBuilder
pub fn memory_session_id( self, memory_session_id: Option<String>, ) -> AgentBuilder
pub fn classification_config( self, classification_config: QueryClassificationConfig, ) -> AgentBuilder
pub fn available_hints(self, available_hints: Vec<String>) -> AgentBuilder
pub fn route_model_by_hint( self, route_model_by_hint: HashMap<String, String>, ) -> AgentBuilder
pub fn allowed_tools(self, allowed_tools: Option<Vec<String>>) -> AgentBuilder
pub fn response_cache(self, cache: Option<Arc<ResponseCache>>) -> AgentBuilder
pub fn security_summary(self, summary: Option<String>) -> AgentBuilder
pub fn autonomy_level(self, level: AutonomyLevel) -> AgentBuilder
pub fn activated_tools( self, activated: Option<Arc<Mutex<ActivatedToolSet>>>, ) -> AgentBuilder
pub fn hook_runner(self, runner: Option<Arc<HookRunner>>) -> AgentBuilder
pub fn approval_manager( self, manager: Option<Arc<ApprovalManager>>, ) -> AgentBuilder
Sourcepub fn agent_alias(self, alias: String) -> AgentBuilder
pub fn agent_alias(self, alias: String) -> AgentBuilder
Set the agent alias used for turn-span attribution.
Sourcepub fn exclude_memory(self, exclude: bool) -> AgentBuilder
pub fn exclude_memory(self, exclude: bool) -> AgentBuilder
Exclude persistent memory from this agent. When set, the memory
backend is replaced with NoneMemory, auto-save is forced off, and
all memory_* tools are stripped from the tool set. Used by ACP
sessions, which rely on session history for context rather than the
agent’s long-term memory.
pub fn build(self) -> Result<Agent, Error>
Trait Implementations§
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 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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more