pub struct AgentStep { /* private fields */ }Expand description
A step that executes an agent
Implementations§
Source§impl AgentStep
impl AgentStep
Sourcepub fn new(config: AgentConfig) -> Self
pub fn new(config: AgentConfig) -> Self
Create a new agent step from an agent configuration
Sourcepub fn from_agent(agent: Agent, name: String) -> Self
pub fn from_agent(agent: Agent, name: String) -> Self
Create from an existing Agent
Trait Implementations§
Source§impl Step for AgentStep
impl Step for AgentStep
Source§fn execute_with_context<'life0, 'life1, 'async_trait>(
&'life0 self,
input: StepInput,
ctx: ExecutionContext<'life1>,
) -> Pin<Box<dyn Future<Output = StepResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute_with_context<'life0, 'life1, 'async_trait>(
&'life0 self,
input: StepInput,
ctx: ExecutionContext<'life1>,
) -> Pin<Box<dyn Future<Output = StepResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute with execution context (for event streaming, etc.)
Source§fn description(&self) -> Option<&str>
fn description(&self) -> Option<&str>
Optional: Get a description of what this step does
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
input: StepInput,
) -> Pin<Box<dyn Future<Output = StepResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
input: StepInput,
) -> Pin<Box<dyn Future<Output = StepResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the step with the given input
Source§fn get_branches(&self) -> Option<(&dyn Step, &dyn Step)>
fn get_branches(&self) -> Option<(&dyn Step, &dyn Step)>
For conditional steps: get the branches (then, else)
Source§fn get_sub_workflow(&self) -> Option<Workflow>
fn get_sub_workflow(&self) -> Option<Workflow>
For sub-workflow steps: get the workflow
Auto Trait Implementations§
impl Freeze for AgentStep
impl !RefUnwindSafe for AgentStep
impl Send for AgentStep
impl Sync for AgentStep
impl Unpin for AgentStep
impl !UnwindSafe for AgentStep
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