Sub-Agent Orchestrator
Design and execute multi-agent pipelines where each step is a different agent that depends on the previous one. Define roles, dependencies, and handoffs in YAML, then run sequential, parallel, conditional, loop, and map-reduce workflows with retry, timeout, and validation.
Unlike Agent Army (homogeneous parallel code changes) and Agent Swarm (homogeneous parallel data processing), this orchestrator coordinates heterogeneous pipelines where the output of A feeds the input of B.
Contents
references/patterns.md -- The six workflow patterns and the comparison to Agent Army/Swarm.
references/workflow-schema.md -- Full YAML workflow definition language.
references/examples.md -- Complete worked workflows (research-to-proposal, lead scoring).
references/execution-engine.md -- Per-step execution model, retry, timeout, validation, edge cases.
references/templates.md -- Reusable workflow scaffolds.
references/visual-and-reporting.md -- Text diagrams and the execution report template.
Workflow
Determine the mode from the request:
- Run a workflow file: read the YAML at the given path.
- Define and run inline: convert the natural-language description into a workflow YAML (see
references/workflow-schema.md), then show it for approval.
- Dry run: parse, validate, resolve inputs, and show the execution plan without deploying agents.
- Inspect: parse the YAML and produce a human-readable description plus a text diagram (see
references/visual-and-reporting.md).
Parse and validate the workflow: confirm required fields, that agent IDs resolve, and that there are no circular dependencies. Report syntax or reference errors with the offending line. See references/execution-engine.md.
Resolve inputs: collect every required input from the user before starting; apply defaults for optional inputs.
Build the execution DAG and run each step in topological order using the matching execution model (sequential, parallel, conditional, loop, map). See references/execution-engine.md.
After each agent completes, validate its output against the agent's schema and rules. On failure, apply the retry/timeout/failure policy (skip, abort, or fallback).
On completion, present results using the execution report template in references/visual-and-reporting.md. For partial or failed runs, report what completed, what failed, and any collected partial output.
Choosing a pattern
Match the task shape to a pattern, then scaffold from references/templates.md:
- Strict ordering of distinct steps: sequential chain.
- One input scored or analyzed from multiple angles: parallel fan-out/fan-in.
- Input routed by classification: conditional routing.
- Output must meet a quality bar: loop with a validator.
- Large input chunked and recombined: map-reduce.
- A step needs a backup approach on failure: pipeline with fallback.
See references/patterns.md for diagrams and examples of each.
1---2name: sub-agent-orchestrator3description: Manages parent/child agent relationships with task delegation and result aggregation. Supports sequential chains, parallel fans, conditional routing, retry logic, timeout handling, and YAML-based visual workflow definition.4---56# Sub-Agent Orchestrator78Design and execute multi-agent pipelines where each step is a different agent that depends on the previous one. Define roles, dependencies, and handoffs in YAML, then run sequential, parallel, conditional, loop, and map-reduce workflows with retry, timeout, and validation.910Unlike Agent Army (homogeneous parallel code changes) and Agent Swarm (homogeneous parallel data processing), this orchestrator coordinates heterogeneous pipelines where the output of A feeds the input of B.1112## Contents1314- `references/patterns.md` -- The six workflow patterns and the comparison to Agent Army/Swarm.15- `references/workflow-schema.md` -- Full YAML workflow definition language.16- `references/examples.md` -- Complete worked workflows (research-to-proposal, lead scoring).17- `references/execution-engine.md` -- Per-step execution model, retry, timeout, validation, edge cases.18- `references/templates.md` -- Reusable workflow scaffolds.19- `references/visual-and-reporting.md` -- Text diagrams and the execution report template.2021## Workflow22231. Determine the mode from the request:24 - Run a workflow file: read the YAML at the given path.25 - Define and run inline: convert the natural-language description into a workflow YAML (see `references/workflow-schema.md`), then show it for approval.26 - Dry run: parse, validate, resolve inputs, and show the execution plan without deploying agents.27 - Inspect: parse the YAML and produce a human-readable description plus a text diagram (see `references/visual-and-reporting.md`).28292. Parse and validate the workflow: confirm required fields, that agent IDs resolve, and that there are no circular dependencies. Report syntax or reference errors with the offending line. See `references/execution-engine.md`.30313. Resolve inputs: collect every required input from the user before starting; apply defaults for optional inputs.32334. Build the execution DAG and run each step in topological order using the matching execution model (sequential, parallel, conditional, loop, map). See `references/execution-engine.md`.34355. After each agent completes, validate its output against the agent's schema and rules. On failure, apply the retry/timeout/failure policy (skip, abort, or fallback).36376. On completion, present results using the execution report template in `references/visual-and-reporting.md`. For partial or failed runs, report what completed, what failed, and any collected partial output.3839## Choosing a pattern4041Match the task shape to a pattern, then scaffold from `references/templates.md`:4243- Strict ordering of distinct steps: sequential chain.44- One input scored or analyzed from multiple angles: parallel fan-out/fan-in.45- Input routed by classification: conditional routing.46- Output must meet a quality bar: loop with a validator.47- Large input chunked and recombined: map-reduce.48- A step needs a backup approach on failure: pipeline with fallback.4950See `references/patterns.md` for diagrams and examples of each.