v2.5.15
April 9, 2026
Compose complex pipelines with nested workflows as workflow steps
A Workflow can now be used directly as a step inside another workflow, enabling modular composition of reusable sub-pipelines. The inner workflow runs as a single step in the outer workflow, with its output chained to the next step via the standard StepInput/StepOutput interface. Complex orchestrations can be broken into smaller, independently testable units and assembled without duplicating logic — the same sub-workflow can be reused across multiple parent workflows.
Details:
- Pass a
Workflowinstance to aStepviaStep(name="...", workflow=inner_workflow), or use the shorthand auto-wrap by placing the workflow directly in thestepslist (uses the workflow'snameas the step name) - Inner workflows support the full set of primitives —
Condition,Loop,Router,Parallel, agents, and custom executors — mixed in any combination - Session state is deep-copied into the inner workflow before execution and merged back into the outer workflow after, keeping state consistent across levels
- Workflows can be nested multiple levels deep; streaming events bubble up with a
nested_depthfield so outer and inner events can be distinguished by depth,workflow_id, andworkflow_name - Enables modular workflow design: build reusable research, processing, or review sub-pipelines once and compose them into larger orchestrations
See the Nested Workflow docs to learn more.
