Skip to main content
When you call run() on a team, the leader decides how to handle the request: respond directly, use tools, or delegate to members. Team delegation flow The default flow:
  1. Team receives user input
  2. Leader analyzes the input and decides which members to delegate to
  3. Leader formulates a task for each selected member
  4. Members execute and return results (concurrently in async mode)
  5. Leader synthesizes results into a final response
Modes define whether the leader delegates, routes to one member, broadcasts to all members, or runs a task loop. Modes are explicit orchestration patterns you can swap without changing member logic. Members can also be provided by callable factories and resolved at run time. See Callable Factories. You can customize this flow with team modes: Use TeamMode from agno.team.mode to set the mode explicitly. The legacy flags still work, but mode is the recommended approach. Member selection and run tracking use member IDs. Set explicit id values on members for stable delegation identity.

Coordinate Mode (Default)

The leader controls everything: which members to use, what task to give them, and how to combine their outputs.
Use this when:
  • Tasks need decomposition into subtasks
  • You want quality control over the final output
  • The leader should add context or reasoning to member outputs

Route Mode

The leader selects which member handles the request and returns the member’s response directly. By default the leader can still craft the task; set determine_input_for_members=False to pass the user input through unchanged. Route mode flow
Use this when:
  • You have specialized agents and want automatic routing
  • The leader shouldn’t modify the request or response
  • You want lower latency (no synthesis step)

Legacy Configuration Flags

These flags still work, but are overridden by mode when set. respond_directly=True: Return member responses without leader synthesis (maps to TeamMode.route). Direct response flow determine_input_for_members=False: Send user input directly to members instead of having the leader formulate a task (works with any mode). Raw input flow Combine both for a full passthrough:

Broadcast Mode

The leader delegates to all members at once. Useful for gathering multiple perspectives or parallel research. Broadcast mode flow
Use this when:
  • You want multiple perspectives on the same topic
  • Members can work independently
  • Parallel execution improves latency
If both delegate_to_all_members=True and respond_directly=True are set, broadcast wins and respond_directly is disabled.

Tasks Mode

Tasks mode is an autonomous loop where the leader decomposes the goal into tasks, executes them, and marks the goal complete.

Structured Input

When using determine_input_for_members=False, you can pass structured Pydantic models directly to members:

Production Considerations

Token Costs

Each mode has different token overhead:

Latency

  • Coordinate: Sequential (leader thinks → members execute → leader synthesizes)
  • Route: Fast (leader selects → member executes)
  • Broadcast with async: Parallel member execution, but synthesis adds latency
  • Tasks: Iterative; multiple cycles until tasks are complete or max_iterations is reached

Error Handling

What happens when a member fails?
  • Coordinate: Leader can work with partial results from other members
  • Route: Failure is returned directly to caller
  • Broadcast: Leader synthesizes available results, may note missing data
  • Tasks: Task list tracks failed/blocked tasks; the leader can retry or reassign until completion

Developer Resources