Skip to main content

What is a Workflow Run?

A workflow run is one execution instance of a directed acyclic graph of work nodes. Each node names an agent profile and a prompt template. The conductor validates the DAG, schedules ready nodes, dispatches runs through the runner pool, and persists state in the workflow store. Workflow runs are useful when a request has clear parallel or ordered subtasks, such as research -> synthesis -> review.

Shape

Plan / PlanNode are the legacy Go names; WorkflowRun / WorkflowNode are aliases. The wire shape and storage layer are unchanged. Status fields are numeric enums in full snapshots.

Example DAG

Execution order:
  1. research-langgraph and research-autogen run in parallel.
  2. compare starts after both research nodes reach ok.
  3. review starts after compare reaches ok.

Prompt Templates

Node prompt templates can reference upstream outputs: Template validation happens before a workflow run is accepted. Bad references return 400 with a bad_template error.

Creating Workflow Runs

Create response:
autoStart defaults to true. Set "autoStart": false to create a workflow run without submitting it to the engine, then call:

Streaming

The stream sends an initial snapshot event followed by plan_status events. Each frame carries the full workflow-run snapshot under the workflowRun key:

Repair

When execution pauses, a coordinator can repair the workflow run:
Supported repair actions: AGENT_ORC_PLAN_MAX_REPAIRS limits how many repairs a workflow run can consume.

Orchestrator-Driven Mode

A coordinator agent can create a workflow run with autoStart: false, delegate node work itself, then mark nodes terminal with POST /api/workflows/runs/{workflowRunId}/nodes/{nodeId}/status.
This mode is useful when the orchestrator needs to inspect, transform, or gate each node result before unlocking downstream work.

Configuration

Env vars retain their AGENT_ORC_PLAN_* prefix because the planner engine is still the underlying substrate.

Validation Errors

The conductor returns 400 with stable prefixes for user-correctable workflow errors: