> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.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](https://agno-v2.mintlify.site/workflows/overview.md) |
| Code-defined parallel branches | [Workflow](https://agno-v2.mintlify.site/workflows/overview.md) |
| Rule-based conditions or routing | [Workflow](https://agno-v2.mintlify.site/workflows/overview.md) |
| Code-defined loops with end conditions | [Workflow](https://agno-v2.mintlify.site/workflows/overview.md) |
| Mixed components (agents, teams, functions) in one pipeline | [Workflow](https://agno-v2.mintlify.site/workflows/overview.md) |
| Defined, repeatable execution path | [Workflow](https://agno-v2.mintlify.site/workflows/overview.md) |
| Open-ended research and planning | [Team](https://agno-v2.mintlify.site/teams/overview.md) |
| Model routes each request to a specialist | [Team](https://agno-v2.mintlify.site/teams/overview.md) with `mode=TeamMode.route` |
| Model sends the same task to every member | [Team](https://agno-v2.mintlify.site/teams/overview.md) with `mode=TeamMode.broadcast` |
| Model decomposes a goal and loops through a task list | [Team](https://agno-v2.mintlify.site/teams/overview.md) with `mode=TeamMode.tasks` |
| Members divide responsibilities dynamically | [Team](https://agno-v2.mintlify.site/teams/overview.md) |

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](https://agno-v2.mintlify.site/workflows/overview.md)
* [Teams overview](https://agno-v2.mintlify.site/teams/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.