Skip to main content
A workflow is a sequence of stages. Each stage is a single-agent execution with its own compliance policy, budget, and capability ceiling. A stage can require a compliant upstream stage by id - the basis for reviewed-then-release patterns. The route file is app/api/routes/workflows.py.

POST /workflows

Create a workflow.
Request body (WorkflowRequest): Each WorkflowStageRequest: Response (201 Created, WorkflowResponse): the workflow record with each stage’s resolved id, status, and (once started) execution id.

GET /workflows

List the calling user’s workflows.

GET /workflows/{workflow_id}

Fetch a workflow’s current state, including each stage’s status, execution_id, and timing.

DELETE /workflows/{workflow_id}

Cancel a workflow. Returns WorkflowCancelResponse. Idempotent: a finished workflow is left in place; a cancelled one stays cancelled.

GET /workflows/{workflow_id}/export

Export the workflow’s full audit package: each stage’s execution, every verified certificate, and the chain of upstream stage ids proving the review-then-release linkage. Returns WorkflowExportResponse.

The reviewed-release pattern

The strongest production-style workflow runs in two stages:
  1. Stage A with stage_role="reviewer" produces a compliant artifact.
  2. Stage B with stage_role="release" and upstream_stage_ids=["stage_A_id"] is admitted only if stage A succeeded with a compliant verdict.
The example examples/07_multi_agent_reviewed_release.py runs this end to end.

See also

  • Tasks - the single-stage version.
  • Compliance - exporting workflow-level audit packages.
  • Releases - release decision endpoints for the gate stage.