pub struct AgentExecutor { /* private fields */ }Expand description
Agent executor.
Responsible for executing the agent’s decision loop: Plan -> Act -> Observe.
Implementations§
Source§impl AgentExecutor
impl AgentExecutor
Sourcepub fn new(agent: Arc<dyn BaseAgent>, tools: Vec<Arc<dyn BaseTool>>) -> Self
pub fn new(agent: Arc<dyn BaseAgent>, tools: Vec<Arc<dyn BaseTool>>) -> Self
Creates a new AgentExecutor.
Sourcepub fn with_max_iterations(self, max_iterations: usize) -> Self
pub fn with_max_iterations(self, max_iterations: usize) -> Self
Sets max iterations.
Sourcepub fn with_verbose(self, verbose: bool) -> Self
pub fn with_verbose(self, verbose: bool) -> Self
Sets verbose output.
Sourcepub fn with_memory(self, memory: Arc<Mutex<dyn BaseMemory>>) -> Self
pub fn with_memory(self, memory: Arc<Mutex<dyn BaseMemory>>) -> Self
Sets memory.
Sourcepub fn with_callbacks(self, callbacks: Arc<CallbackManager>) -> Self
pub fn with_callbacks(self, callbacks: Arc<CallbackManager>) -> Self
Sets callback manager.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AgentExecutor
impl !UnwindSafe for AgentExecutor
impl Freeze for AgentExecutor
impl Send for AgentExecutor
impl Sync for AgentExecutor
impl Unpin for AgentExecutor
impl UnsafeUnpin for AgentExecutor
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