pub struct TeamRunner { /* private fields */ }Expand description
Binds an AgentTeam to concrete AgentExecutor sessions, enabling
Lead → Worker → Reviewer automated workflows.
Implementations§
Source§impl TeamRunner
impl TeamRunner
Sourcepub fn bind_session(
&mut self,
member_id: &str,
executor: Arc<dyn AgentExecutor>,
) -> Result<()>
pub fn bind_session( &mut self, member_id: &str, executor: Arc<dyn AgentExecutor>, ) -> Result<()>
Bind an executor to a team member.
Returns an error if member_id is not registered in the team.
Sourcepub fn bind_agent(
&mut self,
member_id: &str,
agent: &Agent,
workspace: &str,
agent_name: &str,
registry: &AgentRegistry,
) -> Result<()>
pub fn bind_agent( &mut self, member_id: &str, agent: &Agent, workspace: &str, agent_name: &str, registry: &AgentRegistry, ) -> Result<()>
Bind a team member to a session created from a named agent definition.
Looks up agent_name in registry, applies the definition’s prompt,
permissions, model, and max_steps to a new [AgentSession] via
[Agent::session_for_agent], then binds it to member_id.
This is the primary integration point between the AgentTeam coordination
layer and the markdown/YAML-defined subagent capability layer.
§Errors
Returns an error if member_id is not in the team, agent_name is not
in registry, or session creation fails.
Sourcepub fn task_board(&self) -> Arc<TeamTaskBoard>
pub fn task_board(&self) -> Arc<TeamTaskBoard>
Access the shared task board.
Sourcepub async fn run_until_done(&self, goal: &str) -> Result<TeamRunResult>
pub async fn run_until_done(&self, goal: &str) -> Result<TeamRunResult>
Run the full Lead → Worker → Reviewer workflow until all tasks are done
or max_rounds is exceeded.
Steps:
- Lead decomposes
goalinto tasks via JSON response. - Workers concurrently claim and execute tasks.
- Reviewer approves or rejects completed tasks.
- Rejected tasks re-enter the work queue for retry.