Skip to content

Get Agent Run

GET
/agent/runs/{run_id}

Fetch one run.

THE ONE ROUTE HERE THAT IS NOT PURE DELEGATION, because there is no GET /v1/agent/work-items/{id} on the JWT surface to call. Without it a builder can create a run, receive its id, and then have no way to poll it except by listing everything and filtering client-side.

Its visibility rule is copied from list_work_items, NOT from cancel_work_item: a read may see the caller’s own runs plus org-wide visibility='shared' ones, whereas cancel is owner-only because stopping someone else’s work is destructive. Pinning the read to the stricter rule would hide a shared run that the list route shows, and the two disagreeing about the same row is worse than either answer alone.

404, never 403, on a run the caller may not see: a non-owner must not be able to use this route to probe which runs exist in the org. Same reason cancel_work_item returns 404 for a non-owner.

Authorizations

Parameters

Path Parameters

run_id
required

Run ID

string format: uuid

Run ID

Header Parameters

X-Target-Org-Id
Any of:
string

Responses

200

Successful Response

object
data
required

One run. Identical shape whether read from the list or on its own.

object
agent_id
required
string
completed_at
Any of:
string
created_at
required
string
credit_budget
Any of:
integer
credits_spent
integer
current_step
Any of:
string
entry_point
Any of:
string
next_action
Any of:
string
session_id
Any of:
string
status
required
string
title
required
string
updated_at
required
string
visibility
required
string
work_item_id
required
string
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string