Workflows

Manage workflow definitions and view run history

List Workflows Endpoint

GET
/workflows

Query Parameters

workflow_type?|

Filter by workflow type

include_archived?boolean

Include archived workflows

Defaultfalse
page?integer
Default1
Range1 <= value
page_size?integer
Default20
Range1 <= value <= 100
order_by?|

Sort field (- prefix = descending)

search?|

Case-insensitive substring match on name or id, applied before paging

Response Body

application/json

application/json

curl -X GET "https://loading/workflows"
{
  "workflows": [
    {
      "id": "string",
      "name": "string",
      "workflow_type": "string",
      "classification": "string",
      "description": "string",
      "phase_count": 0,
      "created_at": "string",
      "runs_count": 0,
      "is_archived": false,
      "requires_repos": true,
      "tags": [
        "string"
      ],
      "skills": [
        {
          "source_url": "string",
          "name": "string",
          "version": "string",
          "name_overridden": false,
          "raw": "string",
          "phase_ids": [
            "string"
          ],
          "workflow_scope": false
        }
      ]
    }
  ],
  "total": 0,
  "page": 1,
  "page_size": 20
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Create Workflow Endpoint

POST
/workflows

Request Body

application/json

id?|
name*string
workflow_type?string

Workflow type, case-insensitive: research, planning, implementation, review, deployment, custom. An unknown value is refused with 422 (#2290).

Default"custom"
classification?string

Workflow classification, case-insensitive: simple, standard, complex, epic. An unknown value is refused with 422 (#2286).

Default"standard"
repository_url?string
Default""
repository_ref?string
Default"main"
description?|
project_name?|
phases?array<>|
input_declarations?array<>|
repos?array<>

Default GitHub URLs for this workflow template (ADR-058). Can be overridden at execution time via the repos field on the execute request.

requires_repos?boolean

Whether this workflow requires repository access at execution time (ADR-058 #666). Set to false for research or analysis workflows that don't need repos.

Defaulttrue
version?|

Package version being installed (issue #822). Recorded on the template so an execution can be traced to the version that produced it. Reinstalling a matching version is refused unless force is set.

source_digest?|

Resolved source commit SHA for the package content (issue #822). A matching version resolving to a different digest is refused: that is the signature of a republished version.

force?boolean

Overwrite an already-installed matching version.

Defaultfalse
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://loading/workflows" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{
  "id": "string",
  "name": "string",
  "workflow_type": "string",
  "classification": "string",
  "repository_url": "string",
  "requires_repos": true,
  "status": "string",
  "warnings": [
    "string"
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
GET
/workflows/trends

Query Parameters

ids*string

Comma-separated exact workflow ids, at most 200

page_size?integer

Latest runs per workflow

Default50
Range1 <= value <= 200

Response Body

application/json

application/json

curl -X GET "https://loading/workflows/trends?ids=string"
{
  "trends": [
    {
      "definition_version": "string",
      "definition_changed_at": "string",
      "definition_changes": [
        {
          "definition_version": "string",
          "changed_at": "string",
          "kind": "created"
        }
      ],
      "workflow_id": "string",
      "items": [
        {
          "execution_id": "string",
          "date": "string",
          "status": "string",
          "workflow_version": "string",
          "cost_usd": "string",
          "cost_is_lower_bound": true,
          "cost_display": "string",
          "duration_seconds": 0,
          "duration_is_lower_bound": true,
          "duration_display": "string",
          "tokens": 0,
          "phase_durations": [
            {
              "phase_id": "string",
              "phase_name": "string",
              "duration_seconds": 0
            }
          ]
        }
      ],
      "total": 0,
      "page": 0,
      "page_size": 0,
      "duration_trend": {
        "kind": "none",
        "pct": 0,
        "runs": 0,
        "word_display": "string",
        "sub_display": "string",
        "label_display": "string"
      }
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get Workflow Endpoint

GET
/workflows/{workflow_id}

Path Parameters

workflow_id*string

Response Body

application/json

application/json

curl -X GET "https://loading/workflows/string"
{
  "id": "string",
  "name": "string",
  "description": "string",
  "workflow_type": "string",
  "classification": "string",
  "phases": [
    {
      "phase_id": "string",
      "name": "string",
      "order": 0,
      "description": "string",
      "agent_type": "",
      "prompt_template": "string",
      "timeout_seconds": 300,
      "max_cost_usd": 0,
      "allowed_tools": [
        "string"
      ],
      "argument_hint": "string",
      "model": "string",
      "resolved_model": "string",
      "resolution_basis": "translated",
      "model_display": "string",
      "provider": "string",
      "allow_delegation": false,
      "require_delegation": false,
      "fallback_agent": {
        "provider": "string",
        "model": "string"
      },
      "clone_repos": true,
      "delivers_repo_changes": true,
      "platform_access": "read",
      "requires_verdict": false,
      "kind": "agent",
      "commands": [
        {
          "name": "string",
          "run": "string",
          "timeout_seconds": 0,
          "allow_failure": false
        }
      ],
      "resources": {
        "memory_mb": 0,
        "pids_limit": 0
      },
      "sandbox": "full-access",
      "claude_plugins": [
        {
          "source_url": "string",
          "name": "string",
          "version": "string",
          "name_overridden": false,
          "raw": "string"
        }
      ],
      "skills": [
        {
          "source_url": "string",
          "name": "string",
          "version": "string",
          "name_overridden": false,
          "raw": "string"
        }
      ],
      "execution_type": "sequential",
      "max_tokens": 0,
      "input_artifact_types": [
        "string"
      ],
      "output_artifact_types": [
        "string"
      ]
    }
  ],
  "input_declarations": [
    {
      "name": "string",
      "description": "string",
      "required": true,
      "default": "string"
    }
  ],
  "created_at": "string",
  "runs_count": 0,
  "runs_link": "string",
  "repository_url": "string",
  "repos": [
    "string"
  ],
  "requires_repos": true,
  "tags": [
    "string"
  ],
  "default_eval_id": "string",
  "package_name": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Archive (soft-delete) a workflow template

DELETE
/workflows/{workflow_id}

Path Parameters

workflow_id*string

Query Parameters

expected_package_name?|

Response Body

application/json

application/json

curl -X DELETE "https://loading/workflows/string"
{
  "workflow_id": "string",
  "status": "string"
}
Empty
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Export Workflow Endpoint

GET
/workflows/{workflow_id}/export

Path Parameters

workflow_id*string

Query Parameters

format?string

Export format: 'package' (workflow.yaml + phases) or 'plugin' (full CC plugin)

Default"package"
Value in"package" | "plugin"

Response Body

application/json

application/json

curl -X GET "https://loading/workflows/string/export"
{
  "format": "package",
  "workflow_id": "string",
  "workflow_name": "string",
  "files": {
    "property1": "string",
    "property2": "string"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

List Workflow Runs Endpoint

GET
/workflows/{workflow_id}/runs

Path Parameters

workflow_id*string

Response Body

application/json

application/json

curl -X GET "https://loading/workflows/string/runs"
{
  "runs": [
    {
      "workflow_execution_id": "string",
      "workflow_id": "string",
      "workflow_name": "string",
      "status": "string",
      "started_at": "string",
      "completed_at": "string",
      "completed_phases": 0,
      "total_phases": 0,
      "phase_progress": {
        "completed": 0,
        "skipped": 0,
        "possible": 0,
        "remaining_possible": 0,
        "percent": 0,
        "display": "string"
      },
      "total_tokens": 0,
      "total_cost_usd": "0",
      "total_cost_display": "$0.00",
      "unpriced_observation_count": 0,
      "error_message": "string",
      "failure_classification": "platform",
      "reported_failure_reason": "task"
    }
  ],
  "total": 0,
  "workflow_id": "string",
  "workflow_name": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get Workflow Trend Endpoint

GET
/workflows/{workflow_id}/trend

Path Parameters

workflow_id*string

Query Parameters

page?integer
Default1
Range1 <= value
page_size?integer
Default50
Range1 <= value <= 200

Response Body

application/json

application/json

curl -X GET "https://loading/workflows/string/trend"
{
  "definition_version": "string",
  "definition_changed_at": "string",
  "definition_changes": [
    {
      "definition_version": "string",
      "changed_at": "string",
      "kind": "created"
    }
  ],
  "workflow_id": "string",
  "items": [
    {
      "execution_id": "string",
      "date": "string",
      "status": "string",
      "workflow_version": "string",
      "cost_usd": "string",
      "cost_is_lower_bound": true,
      "cost_display": "string",
      "duration_seconds": 0,
      "duration_is_lower_bound": true,
      "duration_display": "string",
      "tokens": 0,
      "phase_durations": [
        {
          "phase_id": "string",
          "phase_name": "string",
          "duration_seconds": 0
        }
      ]
    }
  ],
  "total": 0,
  "page": 0,
  "page_size": 0
}
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get Workflow History Endpoint

GET
/workflows/{workflow_id}/history

Path Parameters

workflow_id*string

Response Body

application/json

application/json

curl -X GET "https://loading/workflows/string/history"
{
  "workflow_id": "string",
  "workflow_name": "string",
  "executions": [
    {}
  ],
  "total_executions": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get Workflow Latest Outputs Endpoint

GET
/workflows/{workflow_id}/latest-outputs

Path Parameters

workflow_id*string

Response Body

application/json

application/json

curl -X GET "https://loading/workflows/string/latest-outputs"
{
  "workflow_id": "string",
  "phases": [
    {
      "phase_id": "string",
      "phase_name": "string",
      "artifact": {
        "id": "string",
        "workflow_id": "string",
        "execution_id": "string",
        "session_id": "string",
        "phase_id": "string",
        "artifact_type": "string",
        "title": "string",
        "size_bytes": 0,
        "created_at": "string",
        "agent_provider": "string",
        "agent_model": "string"
      }
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Validate Yaml Endpoint

POST
/workflows/validate

Request Body

application/json

content?|

Raw YAML content to validate

filename?string

Original filename (informational)

Default"workflow.yaml"
file?|

Deprecated; file paths are no longer supported. Use 'content' instead.

[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://loading/workflows/validate" \  -H "Content-Type: application/json" \  -d '{}'
{
  "valid": true,
  "name": "",
  "workflow_type": "",
  "phase_count": 0,
  "errors": [
    "string"
  ],
  "warnings": [
    "string"
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Update Phase Prompt Endpoint

PUT
/workflows/{workflow_id}/phases/{phase_id}

Path Parameters

workflow_id*string
phase_id*string

Request Body

application/json

prompt_template*string
Length1 <= length
model?|
provider?|
timeout_seconds?|
allowed_tools?array<>|
[key: string]?never

Response Body

application/json

application/json

curl -X PUT "https://loading/workflows/string/phases/string" \  -H "Content-Type: application/json" \  -d '{    "prompt_template": "string"  }'
{
  "workflow_id": "string",
  "phase_id": "string",
  "status": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Create Workflow From Yaml Endpoint

POST
/workflows/from-yaml

Query Parameters

name?|
workflow_id?|
version?|
source_digest?|
package_name?|
force?boolean
Defaultfalse

Response Body

application/json

application/json

curl -X POST "https://loading/workflows/from-yaml"
{
  "id": "string",
  "name": "string",
  "workflow_type": "string",
  "classification": "string",
  "repository_url": "string",
  "requires_repos": true,
  "status": "string",
  "warnings": [
    "string"
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

On this page