> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-codex-docs-audit-20260719-0149.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# When to use a Workflow vs a Team

> Use a Workflow for code-defined execution and a Team for model-directed coordination.

Workflows execute decisions defined in code. Teams use a model to coordinate member agents. Both support routing, parallel work, and loops. Choose based on who should control those decisions.

| Requirement                                                 | Use                                                    |
| ----------------------------------------------------------- | ------------------------------------------------------ |
| Fixed sequence of steps with dependencies                   | [Workflow](/workflows/overview)                        |
| Code-defined parallel branches                              | [Workflow](/workflows/overview)                        |
| Rule-based conditions or routing                            | [Workflow](/workflows/overview)                        |
| Code-defined loops with end conditions                      | [Workflow](/workflows/overview)                        |
| Mixed components (agents, teams, functions) in one pipeline | [Workflow](/workflows/overview)                        |
| Defined, repeatable execution path                          | [Workflow](/workflows/overview)                        |
| Open-ended research and planning                            | [Team](/teams/overview)                                |
| Model routes each request to a specialist                   | [Team](/teams/overview) with `mode=TeamMode.route`     |
| Model sends the same task to every member                   | [Team](/teams/overview) with `mode=TeamMode.broadcast` |
| Model decomposes a goal and loops through a task list       | [Team](/teams/overview) with `mode=TeamMode.tasks`     |
| Members divide responsibilities dynamically                 | [Team](/teams/overview)                                |

Workflows can include teams as steps. Use a workflow for the code-defined pipeline and a team where a step needs model-directed coordination.

## Next Steps

* [Workflows overview](/workflows/overview)
* [Teams overview](/teams/overview)
