pub struct ParallelAgent { /* private fields */ }Expand description
Runs sub-agents concurrently.
All sub-agents run in parallel via tokio::spawn. Each gets a fresh
InvocationContext wrapping the same underlying AgentSession (shared state
and session). All must complete before ParallelAgent returns.
If any sub-agent fails, its error is returned (first error wins when iterating over join handles in order).
Implementations§
Trait Implementations§
Source§impl Agent for ParallelAgent
impl Agent for ParallelAgent
Source§fn run_live<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 mut InvocationContext,
) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn run_live<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 mut InvocationContext,
) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Run this agent on a live session. Returns when the agent is done
(turn complete, transfer, or disconnect).
Auto Trait Implementations§
impl Freeze for ParallelAgent
impl !RefUnwindSafe for ParallelAgent
impl Send for ParallelAgent
impl Sync for ParallelAgent
impl Unpin for ParallelAgent
impl UnsafeUnpin for ParallelAgent
impl !UnwindSafe for ParallelAgent
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