pub struct LoopAgent { /* private fields */ }Expand description
Runs sub-agents repeatedly until max_iterations is reached or escalation.
Each iteration runs all sub-agents sequentially. To break out of the loop
early, a sub-agent can return TransferRequested("__escalate"). Other
transfer requests are propagated as-is, stopping the loop with an error.
Implementations§
Trait Implementations§
Source§impl Agent for LoopAgent
impl Agent for LoopAgent
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 LoopAgent
impl !RefUnwindSafe for LoopAgent
impl Send for LoopAgent
impl Sync for LoopAgent
impl Unpin for LoopAgent
impl UnsafeUnpin for LoopAgent
impl !UnwindSafe for LoopAgent
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