← All components
Sub-workflow
Flow controlRuns a child workflow as a step of this one, passing data in and getting results back. Useful for breaking a large process into pieces, each with its own stages.
Several people working independently at the same time (e.g. one approval sub-workflow per approver), a complex sub-task that deserves its own stages, or repeating the same steps once per item in a list. Each sub-workflow belongs to the workflow that invokes it.
What the architect sets up
- Which workflow to run, and the data passed in and expected back
- Whether the parent waits for it or continues alongside it
- A time limit, and what a failure should mean for the run
How it behaves in a run
- Runs when the agent decides it's needed, or automatically when a stage begins or completes.
Related
- Stages & components: how components fit into a workflow
- Showcase: see components like this at work in real workflows
For developers: the API and MCP server identify this component as invoke_sub_workflow.