For AI agents: the complete documentation index is available at https://a3s-lab.github.io/Flow/v1.0.0/en/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/Flow/v1.0.0/en/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/Flow/v1.0.0/en/nodes/child-workflows.md.

Start child workflow batch flow.child-workflows

Use this node to declare several independent child runs and wait for the whole declared set to resolve. It fits bounded parallel work such as processing one document per region or running a fixed group of checks. A single node accepts at most 64 members. Split larger collections into deterministic windows so the parent does not create an unmanageable number of children or retain an oversized result in one history segment.

Member contract

Every item in children contains child_id, spec, input, and cancellation_policy. Child IDs must be unique within the parent run and remain stable across replay. The member list is stored in declaration order, and outcomes use that same order even when children finish at different times. Do not reorder the list by completion time, remove an existing identity, or point a reused child ID at a new definition.

Each spec fixes the workflow name, version, runtime entry point, and supported route. Each input supplies member-specific start data. Cancellation policy applies per member. Use request_cancellation when the parent owns cleanup and must wait for it. Use abandon only for work with independent ownership and observability. If a batch mixes policies, document exactly which children can continue after the parent reaches a terminal state.

Aggregation and capacity

When every member resolves, control leaves through completed and outcomes contains each terminal result in stable declaration order. Check success, failure, cancellation, and timeout per member rather than treating the presence of an array as success. Tests should cover an empty list, duplicate IDs, partial start failure, partial terminal failure, the 64-member boundary, parent cancellation, and process recovery. Configure host concurrency, queue backpressure, and tenant quotas for expected batch sizes. For high-volume input, combine deterministic windowing with a continuation boundary and persist the cursor required to resume safely.

Use it to declare multiple independent child workflows at once. It fits a parent that must wait for all members and collect outcomes in stable order.

Runtime behavior

The node ID and each child_id form member identity. The engine validates and records the complete request set before coordinating children, with a maximum of 64 members.

Node contract

Type
flow.child-workflows
Role
Durable runtime command
Runtime binding
start_child_workflows
Durable identity
Graph node ID plus member key

Configuration properties

PropertyType and controlDefaultRules
childrenChild workflowslistA3SFlowChildrenInput[{"child_id":"child-1","spec":{"name":"workflow.child","version":"0.1.0","runtime":{"kind":"native_ts","entrypoint":"workflows/child.ts","export_name":"main"}},"input":{},"cancellation_policy":"request_cancellation"}]Ordered child definitions. A3S Flow accepts at most 64 children per durable batch.Required

children member properties

PropertyType and controlRules
child_idstringStable unique child identity in the parentRequired
specWorkflowSpecName, version, and runtime entryRequired
inputJsonValueInitial input for the child runRequired
cancellation_policyrequest_cancellation | abandonChild policy when the parent stopsRequired

Ports

DirectionPort IDKindValue types
InputinIncontrolFlowControl
OutputcompletedCompletedcontrolFlowControl
OutputoutcomesOutcomesdataWorkflowTerminalOutcome[]

Node JSON example

The CLI creates the same structure from manifest defaults. Canvas position, title, and selection are presentation data.

workflow.json
{
  "position": {
    "x": 320,
    "y": 160
  },
  "id": "example-flow-child-workflows",
  "data": {
    "children": [
      {
        "child_id": "child-1",
        "spec": {
          "name": "workflow.child",
          "version": "0.1.0",
          "runtime": {
            "kind": "native_ts",
            "entrypoint": "workflows/child.ts",
            "export_name": "main"
          }
        },
        "input": {},
        "cancellation_policy": "request_cancellation"
      }
    ],
    "type": "flow.child-workflows"
  }
}

CLI usage

Inspect the installed manifest first, then create the node and validate the complete workflow. Every command emits JSON.

Terminal
a3s-flow node flow.child-workflows --pretty
a3s-flow new flow.child-workflows --id example-flow-child-workflows --pretty
a3s-flow validate workflow.json --pretty
a3s-flow compile workflow.json --pretty
a3s-flow digest workflow.json --pretty

Skill usage

The package includes the a3s-flow Skill. It queries the CLI catalog before creating, validating, compiling, and digesting a workflow.

Prompt
Use $a3s-flow to add the "flow.child-workflows" node to workflow.json, connect valid ports, and validate the result.

CLI usage · Skill usage

Operational notes

  • The list cannot be empty and child_id values must be unique.
  • Aggregate by declaration order, not completion order.
  • Split larger collections into batches with a stable cursor.