pub struct AgentExecutor<'a> { /* private fields */ }Expand description
Executor for agent (AI) steps.
Runs an AI agent with the given prompt and configuration, capturing the response value, cost, and token counts.
Implementations§
Source§impl<'a> AgentExecutor<'a>
impl<'a> AgentExecutor<'a>
Sourcepub fn new(config: &'a AgentStepConfig) -> Self
pub fn new(config: &'a AgentStepConfig) -> Self
Create a new agent executor from a config reference.
Trait Implementations§
Source§impl StepExecutor for AgentExecutor<'_>
impl StepExecutor for AgentExecutor<'_>
Source§async fn execute(
&self,
provider: &Arc<dyn AgentProvider>,
) -> Result<StepOutput, EngineError>
async fn execute( &self, provider: &Arc<dyn AgentProvider>, ) -> Result<StepOutput, EngineError>
Execute the step and return structured output. Read more
Auto Trait Implementations§
impl<'a> Freeze for AgentExecutor<'a>
impl<'a> RefUnwindSafe for AgentExecutor<'a>
impl<'a> Send for AgentExecutor<'a>
impl<'a> Sync for AgentExecutor<'a>
impl<'a> Unpin for AgentExecutor<'a>
impl<'a> UnsafeUnpin for AgentExecutor<'a>
impl<'a> UnwindSafe for AgentExecutor<'a>
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