app/api/routes/workflows.py.
POST /workflows
Create a workflow.
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:- Stage A with
stage_role="reviewer"produces a compliant artifact. - Stage B with
stage_role="release"andupstream_stage_ids=["stage_A_id"]is admitted only if stage A succeeded with a compliant verdict.
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.