The sandbox's latest agent runs (turns), with their tool calls and cost
GET
/sandboxes/{id}/runs
const url = 'https://api.global.stillbox.example/v1/sandboxes/ws-7k2m9q4x8w3z5r6t/runs?limit=50';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Query Parameters
Section titled “Query Parameters”limit
integer
Responses
Section titled “Responses”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
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"}