pub struct MultiAgentCoordinator { /* private fields */ }Expand description
Coordinates multi-agent workflows over a shared SubagentManager.
Implementations§
Source§impl MultiAgentCoordinator
impl MultiAgentCoordinator
Sourcepub fn with_event_bus(capacity: usize) -> Self
pub fn with_event_bus(capacity: usize) -> Self
Create a coordinator with an event bus of the given capacity.
Sourcepub fn subscribe(&self) -> Option<Receiver<CoordinatorEvent>>
pub fn subscribe(&self) -> Option<Receiver<CoordinatorEvent>>
Subscribe to the event bus, if one is configured.
Sourcepub fn register_profile(&mut self, profile: AgentProfile)
pub fn register_profile(&mut self, profile: AgentProfile)
Register a reusable agent profile.
Sourcepub fn profile(&self, name: &str) -> Option<&AgentProfile>
pub fn profile(&self, name: &str) -> Option<&AgentProfile>
Look up a registered profile by name.
Sourcepub fn spawn_named(
&mut self,
profile_name: &str,
prompt: &str,
workspace: &Path,
) -> Result<SubagentHandle, MultiAgentError>
pub fn spawn_named( &mut self, profile_name: &str, prompt: &str, workspace: &Path, ) -> Result<SubagentHandle, MultiAgentError>
Spawn an agent using a registered profile.
Sourcepub fn spawn_team(
&mut self,
tasks: Vec<TeamTask>,
workspace: &Path,
) -> Result<Vec<SubagentHandle>, MultiAgentError>
pub fn spawn_team( &mut self, tasks: Vec<TeamTask>, workspace: &Path, ) -> Result<Vec<SubagentHandle>, MultiAgentError>
Spawn a team of agents in parallel. Each task is spawned immediately; because the underlying manager mocks synchronous execution, all handles are already completed by the time this returns.
Sourcepub fn broadcast(&self, _message: &str)
pub fn broadcast(&self, _message: &str)
Broadcast a message to all running agents. In the mock execution model this is a no-op aside from emitting an event; a real implementation would push the message into each agent’s inbox.
Sourcepub fn collect_results(&self) -> Vec<TeamResult>
pub fn collect_results(&self) -> Vec<TeamResult>
Gather results from all spawned agents, recording wall-clock duration.
Sourcepub fn manager(&self) -> &SubagentManager
pub fn manager(&self) -> &SubagentManager
Access the underlying subagent manager.
Trait Implementations§
Source§impl Debug for MultiAgentCoordinator
impl Debug for MultiAgentCoordinator
Auto Trait Implementations§
impl !RefUnwindSafe for MultiAgentCoordinator
impl !UnwindSafe for MultiAgentCoordinator
impl Freeze for MultiAgentCoordinator
impl Send for MultiAgentCoordinator
impl Sync for MultiAgentCoordinator
impl Unpin for MultiAgentCoordinator
impl UnsafeUnpin for MultiAgentCoordinator
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