API reference

Runs

10 endpoints under /v1/runs.

List runs

get/v1/runs

Requiresruns:read

Query parameters

  • ownerenumoptional
    meorg
  • statusstringoptional

    'open', 'terminal', or one run status.

  • kindenumoptional
    arthurtask_workoutlineplacesubmissioncompose
  • root_run_idstring (uuid)optional

Headers

  • X-Organization-IDstringoptional
  • X-Workspace-IDstringoptional

Failures return the error envelope; branch on error_code.

Request
Response

Get run

get/v1/runs/{run_id}

Requiresruns:read

Path parameters

  • run_idstring (uuid)required

Headers

  • X-Organization-IDstringoptional
  • X-Workspace-IDstringoptional

Failures return the error envelope; branch on error_code.

Request
Response

Stop the run and every open run under it.

post/v1/runs/{run_id}/cancel

Race-guarded: a run that finished before the write stays finished.

Requiresruns:write

Path parameters

  • run_idstring (uuid)required

Headers

  • X-Organization-IDstringoptional
  • X-Workspace-IDstringoptional

Failures return the error envelope; branch on error_code.

Request
Response

List every model call the run made, in order, with the newest window block by block.

get/v1/runs/{run_id}/context

Follow GET /runs/{run_id}/stream from here: each new call arrives as a stage="context" frame.

Requiresruns:read

Path parameters

  • run_idstring (uuid)required

Headers

  • X-Organization-IDstringoptional
  • X-Workspace-IDstringoptional

Failures return the error envelope; branch on error_code.

Request
Response

Return one model call's window, with its blocks' text when kept.

get/v1/runs/{run_id}/context/{manifest_id}

Requiresruns:read

Path parameters

  • run_idstring (uuid)required
  • manifest_idstring (uuid)required

Headers

  • X-Organization-IDstringoptional
  • X-Workspace-IDstringoptional

Failures return the error envelope; branch on error_code.

Request
Response

Return what an open run has written so far, per subject.

get/v1/runs/{run_id}/live-bodies

Follow the run's stream from each body's cursor (attach contract in :mod:domains.runs.live_body). A closed run has none: its subjects' own records hold the result.

Requiresruns:read

Path parameters

  • run_idstring (uuid)required

Headers

  • X-Organization-IDstringoptional
  • X-Workspace-IDstringoptional

Failures return the error envelope; branch on error_code.

Request
Response

Answer the approval a run paused on (needs_input).

post/v1/runs/{run_id}/resume

approve starts the work it holds; decline cancels it as declined. The owner answers, or an org admin for someone else's run. A run not awaiting approval answers 409 run_not_awaiting_approval.

Requiresruns:write

Path parameters

  • run_idstring (uuid)required

Headers

  • X-Organization-IDstringoptional
  • X-Workspace-IDstringoptional

Request body

  • decisionenumrequired

    Owner's answer to a run paused on approval (POST /runs/{id}/resume).

    approvedecline

Failures return the error envelope; branch on error_code.

Request
Response

Stream the run's own detail (an Arthur turn's content parts and tool steps).

get/v1/runs/{run_id}/stream

The first frame is connected with the run's current card, so a late client can draw it before any detail arrives. A finished run gets that frame plus the replay requested, then the stream closes.

Requiresruns:read

Path parameters

  • run_idstring (uuid)required

Query parameters

  • sincestringoptional

    Resume cursor: the last event id seen. '0-0' replays the retained history; '$' (default) is new frames only.

Headers

  • X-Organization-IDstringoptional
  • X-Workspace-IDstringoptional

Failures return the error envelope; branch on error_code.

Request
Response

Get run tree

get/v1/runs/{run_id}/tree

Requiresruns:read

Path parameters

  • run_idstring (uuid)required

Headers

  • X-Organization-IDstringoptional
  • X-Workspace-IDstringoptional

Failures return the error envelope; branch on error_code.

Request
Response

Stream a stage="run" frame for every lifecycle change of the caller's runs.

get/v1/runs/live

Covers every run the caller owns, whatever started it (a view, Arthur, an API key, a schedule).

Requiresruns:read

Query parameters

  • sincestringoptional

    Resume cursor: the last event id seen. '0-0' replays the retained history; '$' (default) is new frames only.

Headers

  • X-Organization-IDstringoptional
  • X-Workspace-IDstringoptional

Failures return the error envelope; branch on error_code.

Request
Response