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.

RequirementUse
Fixed sequence of steps with dependenciesWorkflow
Code-defined parallel branchesWorkflow
Rule-based conditions or routingWorkflow
Code-defined loops with end conditionsWorkflow
Mixed components (agents, teams, functions) in one pipelineWorkflow
Defined, repeatable execution pathWorkflow
Open-ended research and planningTeam
Model routes each request to a specialistTeam with mode=TeamMode.route
Model sends the same task to every memberTeam with mode=TeamMode.broadcast
Model decomposes a goal and loops through a task listTeam with mode=TeamMode.tasks
Members divide responsibilities dynamicallyTeam

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