Skip to content

The sandbox's latest agent runs (turns), with their tool calls and cost

GET
/sandboxes/{id}/runs
curl --request GET \
--url 'https://api.global.stillbox.example/v1/sandboxes/ws-7k2m9q4x8w3z5r6t/runs?limit=50' \
--header 'Authorization: Bearer <token>'

Each run is one turn of the sandbox’s agent, as harnessd reported it when it ended: the agent and model, how it ended, tokens and the cost the agent reported, and when each tool ran. No prompts, replies or tool output are kept. Runs are kept 14 days (ADR 0029).

id
required
string
limit
integer
default: 50 >= 1 <= 200

Runs, newest first

Media typeapplication/json
object
runs
required
Array<object>
object
id
required

The agent response’s ID (resp_…).

string
conversation_id
required
string
agent
required
string
model
required
string
status
required
string
Allowed values: completed failed cancelled
error
string
started_at
required
string format: date-time
ended_at
required
string format: date-time
duration_ms
required
integer format: int64
input_tokens
required
integer format: int64
output_tokens
required
integer format: int64
cost_usd
required

As the agent reported it; 0 when it doesn’t say.

number format: double
by

The person who drove the sandbox.

string
tools
required
Array<object>
object
name
required
string
started_at
required
string format: date-time
ended_at
required
string format: date-time
error
required
boolean

Example

{
"runs": [
{
"status": "completed"
}
]
}

The API key is missing or invalid

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}

No such sandbox in your organization (or no such file)

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}