Skip to main content
In every execution mode, the leader agent receives auto-injected tools that let it delegate work to members. You do not need to create these tools manually.

Auto-Injected Tools

Coordinate Mode

The leader receives member descriptions and decides which ones to involve:
  1. Leader sees each member’s name and instructions.
  2. Leader calls delegate_to_member for each selected member.
  3. Each member runs with the delegated task.
  4. Leader synthesizes all responses into a final output.

Route Mode

The leader classifies the request and routes to exactly one member:
  1. Leader sees member descriptions.
  2. Leader calls route_to_member with the best match.
  3. The selected member’s response is returned directly (no synthesis).

Tasks Mode

The leader decomposes work into a task list and delegates autonomously:
  1. Leader calls create_task for each subtask.
  2. Leader assigns tasks to members via delegation.
  3. Tasks complete and the leader creates follow-up tasks as needed.
  4. Loop continues until all tasks are done or max_iterations is reached.

Sharing Context

Enable share_member_interactions to pass member responses to subsequent delegations:
Without this, each member only sees the leader’s delegation message.