pub enum CollaborationPattern {
Pipeline {
stages: Vec<PipelineStage>,
},
MapReduce {
mapper_role: AgentRole,
reducer_role: AgentRole,
chunk_count: usize,
},
Debate {
proponent: AgentRole,
opponent: AgentRole,
judge: AgentRole,
max_rounds: u32,
},
Ensemble {
agents: Vec<AgentRole>,
aggregation: AggregationStrategy,
},
Supervisor {
supervisor: AgentRole,
workers: Vec<AgentRole>,
review_policy: ReviewPolicy,
},
Swarm {
roles: Vec<AgentRole>,
max_iterations: u32,
convergence_threshold: f64,
},
}Expand description
A collaboration pattern describing how multiple agents interact to solve a task.
Variants§
Pipeline
Sequential processing chain – each stage’s output feeds the next stage’s input, like Unix pipes: Agent A output -> Agent B input -> Agent C input.
Fields
stages: Vec<PipelineStage>Ordered list of processing stages.
MapReduce
Split work across N mapper agents, then reduce (aggregate) the partial results with a dedicated reducer agent.
Fields
Debate
Two agents argue opposing positions while a judge evaluates and decides, improving decision quality through adversarial deliberation.
Fields
Ensemble
Multiple agents tackle the same task independently and results are aggregated via a configurable strategy (voting, best-of-N, concatenation, LLM synthesis).
Fields
aggregation: AggregationStrategyHow the individual results are combined.
Supervisor
A supervisor agent reviews worker outputs and can accept or reject them according to a configurable review policy.
Fields
review_policy: ReviewPolicyWhen and how outputs are reviewed.
Swarm
Agents iterate collaboratively until consensus or a convergence threshold is met.
Trait Implementations§
Source§impl Clone for CollaborationPattern
impl Clone for CollaborationPattern
Source§fn clone(&self) -> CollaborationPattern
fn clone(&self) -> CollaborationPattern
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CollaborationPattern
impl Debug for CollaborationPattern
Source§impl<'de> Deserialize<'de> for CollaborationPattern
impl<'de> Deserialize<'de> for CollaborationPattern
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for CollaborationPattern
impl RefUnwindSafe for CollaborationPattern
impl Send for CollaborationPattern
impl Sync for CollaborationPattern
impl Unpin for CollaborationPattern
impl UnsafeUnpin for CollaborationPattern
impl UnwindSafe for CollaborationPattern
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
self file descriptor. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more