pub struct DebateAgent<P: LlmProvider + 'static> { /* private fields */ }Expand description
Orchestrates a multi-round debate between N debater agents, then asks a judge agent to synthesize the final answer from the complete transcript.
Each round, all debaters run in parallel and receive the full debate history as input. After all rounds (or early stop), the judge produces the final output.
Note on transcript growth: The full transcript is passed to every
debater each round, so input tokens grow quadratically with round count
and debater count. Keep max_rounds small (2–4) or use should_stop
for early termination.
Implementations§
Source§impl<P: LlmProvider + 'static> DebateAgent<P>
impl<P: LlmProvider + 'static> DebateAgent<P>
Sourcepub fn builder() -> DebateAgentBuilder<P>
pub fn builder() -> DebateAgentBuilder<P>
Create a new DebateAgentBuilder for constructing a debate agent.
Trait Implementations§
Source§impl<P: LlmProvider + 'static> Debug for DebateAgent<P>
impl<P: LlmProvider + 'static> Debug for DebateAgent<P>
Source§impl<P: LlmProvider + 'static> From<DebateAgent<P>> for WorkflowRouter<P>
impl<P: LlmProvider + 'static> From<DebateAgent<P>> for WorkflowRouter<P>
Source§fn from(agent: DebateAgent<P>) -> Self
fn from(agent: DebateAgent<P>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<P> Freeze for DebateAgent<P>
impl<P> !RefUnwindSafe for DebateAgent<P>
impl<P> Send for DebateAgent<P>
impl<P> Sync for DebateAgent<P>
impl<P> Unpin for DebateAgent<P>
impl<P> UnsafeUnpin for DebateAgent<P>
impl<P> !UnwindSafe for DebateAgent<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