pub struct AgentBuilder { /* private fields */ }Expand description
Builder for constructing an Agent with optional components.
Implementations§
Source§impl AgentBuilder
impl AgentBuilder
Sourcepub fn new(runtime: Arc<dyn AgentRuntime>, tools: Arc<dyn ToolPort>) -> Self
pub fn new(runtime: Arc<dyn AgentRuntime>, tools: Arc<dyn ToolPort>) -> Self
Create a new builder with required components.
Sourcepub fn with_store(self, store: Arc<dyn SessionStore>) -> Self
pub fn with_store(self, store: Arc<dyn SessionStore>) -> Self
Attach a session store for persistence.
Sourcepub fn with_tape(self, tape: Arc<dyn TapeStorePort>) -> Self
pub fn with_tape(self, tape: Arc<dyn TapeStorePort>) -> Self
Attach a tape store for conversation recording.
Sourcepub fn with_events(self, events: Arc<dyn EventSink>) -> Self
pub fn with_events(self, events: Arc<dyn EventSink>) -> Self
Attach an event sink for observability.
Sourcepub fn with_system_prompt(self, prompt: impl Into<String>) -> Self
pub fn with_system_prompt(self, prompt: impl Into<String>) -> Self
Set a system prompt override.
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 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