pub struct AgentExecutorChain { /* private fields */ }Expand description
Wraps an AgentExecutor behind the BaseChain trait.
Inputs follow the agent convention: a single input string (or any string
key the agent’s planner reads). Output is produced under output.
Implementations§
Source§impl AgentExecutorChain
impl AgentExecutorChain
Sourcepub fn new(executor: Arc<AgentExecutor>) -> Self
pub fn new(executor: Arc<AgentExecutor>) -> Self
Create an adapter around a ready-built executor.
Attach memory before wrapping (e.g. .with_memory(...)) if multi-turn
state across A2A tasks is desired.
Sourcepub fn inner(&self) -> &AgentExecutor
pub fn inner(&self) -> &AgentExecutor
The inner executor, for inspection or configuration.
Trait Implementations§
Source§impl BaseChain for AgentExecutorChain
impl BaseChain for AgentExecutorChain
Source§fn input_keys(&self) -> Vec<&str>
fn input_keys(&self) -> Vec<&str>
Get input keys.
Source§fn output_keys(&self) -> Vec<&str>
fn output_keys(&self) -> Vec<&str>
Get output keys.
Source§fn invoke<'life0, 'async_trait>(
&'life0 self,
inputs: HashMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<ChainResult, ChainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn invoke<'life0, 'async_trait>(
&'life0 self,
inputs: HashMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<ChainResult, ChainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the Chain. Read more
Source§fn invoke_with_config<'life0, 'async_trait>(
&'life0 self,
inputs: HashMap<String, Value>,
config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, Value>, ChainError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn invoke_with_config<'life0, 'async_trait>(
&'life0 self,
inputs: HashMap<String, Value>,
config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, Value>, ChainError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Execute the Chain with a RunnableConfig. Read more
Source§fn stream<'life0, 'async_trait>(
&'life0 self,
inputs: HashMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<StreamToken, ChainError>> + Send>>, ChainError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn stream<'life0, 'async_trait>(
&'life0 self,
inputs: HashMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<StreamToken, ChainError>> + Send>>, ChainError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Stream execute the Chain – token by token output. Read more
Source§fn stream_with_config<'life0, 'async_trait>(
&'life0 self,
inputs: HashMap<String, Value>,
config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<StreamToken, ChainError>> + Send>>, ChainError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn stream_with_config<'life0, 'async_trait>(
&'life0 self,
inputs: HashMap<String, Value>,
config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<StreamToken, ChainError>> + Send>>, ChainError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Stream execute the Chain with a RunnableConfig. Read more
Source§fn validate_inputs(
&self,
inputs: &HashMap<String, Value>,
) -> Result<(), ChainError>
fn validate_inputs( &self, inputs: &HashMap<String, Value>, ) -> Result<(), ChainError>
Validate inputs.
Auto Trait Implementations§
impl !RefUnwindSafe for AgentExecutorChain
impl !UnwindSafe for AgentExecutorChain
impl Freeze for AgentExecutorChain
impl Send for AgentExecutorChain
impl Sync for AgentExecutorChain
impl Unpin for AgentExecutorChain
impl UnsafeUnpin for AgentExecutorChain
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