pub struct LoopAgent<P: LlmProvider> { /* private fields */ }Expand description
Runs a single agent in a loop. Stops when should_stop returns true
on the output text, or when max_iterations is reached. Returns the
final iteration’s output with accumulated TokenUsage.
Implementations§
Source§impl<P: LlmProvider> LoopAgent<P>
impl<P: LlmProvider> LoopAgent<P>
Sourcepub fn builder() -> LoopAgentBuilder<P>
pub fn builder() -> LoopAgentBuilder<P>
Create a new LoopAgentBuilder.
Trait Implementations§
Source§impl<P: LlmProvider> Debug for LoopAgent<P>
impl<P: LlmProvider> Debug for LoopAgent<P>
Source§impl<P: LlmProvider + 'static> From<LoopAgent<P>> for WorkflowRouter<P>
impl<P: LlmProvider + 'static> From<LoopAgent<P>> for WorkflowRouter<P>
Auto Trait Implementations§
impl<P> !Freeze for LoopAgent<P>
impl<P> !RefUnwindSafe for LoopAgent<P>
impl<P> Send for LoopAgent<P>
impl<P> Sync for LoopAgent<P>
impl<P> Unpin for LoopAgent<P>
impl<P> UnsafeUnpin for LoopAgent<P>
impl<P> !UnwindSafe for LoopAgent<P>
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