pub struct Formation {
pub label: String,
pub budget: Budget,
/* private fields */
}Expand description
A team of agents assembled by Organism to run in a Converge Engine.
Formations are hypotheses: “this team, with these seeds, will converge on a good answer.” Organism may run multiple formations concurrently and pick the winner.
Fields§
§label: StringHuman-readable label for logging and learning.
budget: BudgetExecution budget for this formation’s run.
Implementations§
Source§impl Formation
impl Formation
Sourcepub fn new(label: impl Into<String>) -> Self
pub fn new(label: impl Into<String>) -> Self
Create an empty formation with a human-readable label.
Sourcepub fn agent(self, suggestor: impl Suggestor + 'static) -> Self
pub fn agent(self, suggestor: impl Suggestor + 'static) -> Self
Add a heterogeneous agent to the team.
Sourcepub fn agent_boxed(self, suggestor: Box<dyn Suggestor>) -> Self
pub fn agent_boxed(self, suggestor: Box<dyn Suggestor>) -> Self
Add a boxed agent to the team.
Sourcepub fn seed(
self,
key: ContextKey,
id: impl Into<ProposalId>,
content: impl Into<String>,
provenance: impl Into<Provenance>,
) -> Self
pub fn seed( self, key: ContextKey, id: impl Into<ProposalId>, content: impl Into<String>, provenance: impl Into<Provenance>, ) -> Self
Stage an initial input with explicit provenance.
Sourcepub fn with_budget(self, budget: Budget) -> Self
pub fn with_budget(self, budget: Budget) -> Self
Set the execution budget.
Sourcepub async fn run(self) -> Result<FormationResult, FormationError>
pub async fn run(self) -> Result<FormationResult, FormationError>
Run this formation in a fresh Converge Engine.
This is the honest execution boundary: Organism assembles the team, Converge runs it. Agents propose, the engine promotes, and the returned result is governed by Converge.
Sourcepub async fn run_with_event_observer(
self,
observer: Arc<dyn ExperienceEventObserver>,
) -> Result<FormationResult, FormationError>
pub async fn run_with_event_observer( self, observer: Arc<dyn ExperienceEventObserver>, ) -> Result<FormationResult, FormationError>
Run this formation with a run-scoped experience observer.
Organism should use this with FormationExperienceObserver when it needs
tenant/correlation metadata on Converge experience envelopes.
Source§impl Formation
Builder helpers for standard organism agent teams.
impl Formation
Builder helpers for standard organism agent teams.
Sourcepub fn with_simulation_swarm(self) -> Self
pub fn with_simulation_swarm(self) -> Self
Add the standard simulation swarm (all 5 dimensions) with default configs.
Sourcepub fn with_adversarial_team(self) -> Self
pub fn with_adversarial_team(self) -> Self
Add the standard adversarial team with default configs.
Sourcepub fn with_learning_priors(self) -> Self
pub fn with_learning_priors(self) -> Self
Add the planning prior agent for learning feedback.
Sourcepub fn with_stress_test_pipeline(self) -> Self
pub fn with_stress_test_pipeline(self) -> Self
Full Stage 2 pipeline: priors → adversarial → simulation.
Sourcepub fn with_consensus_evaluator(
self,
rule: ConsensusRule,
total_voters: usize,
) -> Self
pub fn with_consensus_evaluator( self, rule: ConsensusRule, total_voters: usize, ) -> Self
Add the platform consensus evaluator: tallies Vote facts under
ContextKey::Votes against rule and emits ConsensusOutcome
facts under ContextKey::ConsensusOutcomes.
Use this for any team that needs collective sign-off — research huddles, vendor-selection panels, multi-agent reviews. Vote facts are authored by domain pack agents; this evaluator stays domain-agnostic.
Sourcepub fn with_round_starter(self, max_rounds: u8) -> Self
pub fn with_round_starter(self, max_rounds: u8) -> Self
Add the platform round starter: emits round:start:N signals to drive
round-by-round deliberation. Round 1 fires immediately; later rounds
fire when a round:continue:N marker has landed under the configured
continue key. Stops at max_rounds.
Sourcepub fn with_round_synthesizer<P>(
self,
expected_note_count: usize,
producer: P,
) -> Selfwhere
P: SynthesisProducer + 'static,
pub fn with_round_synthesizer<P>(
self,
expected_note_count: usize,
producer: P,
) -> Selfwhere
P: SynthesisProducer + 'static,
Add the platform round synthesizer: once a started round has
expected_note_count notes under ContextKey::Hypotheses, invokes
the supplied [SynthesisProducer] and emits a synthesis fact under
ContextKey::Strategies. Producer errors route to
ContextKey::Diagnostic.
Sourcepub fn with_disagreement_mapper(self) -> Self
pub fn with_disagreement_mapper(self) -> Self
Add the platform disagreement mapper: aggregates Disagreement facts
into per-topic crate::huddle::DisagreementMap payloads, emitted
once per topic under ContextKey::Diagnostic.
Auto Trait Implementations§
impl Freeze for Formation
impl !RefUnwindSafe for Formation
impl Send for Formation
impl Sync for Formation
impl Unpin for Formation
impl UnsafeUnpin for Formation
impl !UnwindSafe for Formation
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> 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