Sandboxes
Read the containers that agents run in, and their live metrics.
Query Parameters
1 <= lengthResponse Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/sandboxes/capacity"{ "orgId": "string", "running": 0, "limit": 1, "waiting": [ { "issueId": "string", "projectId": "string", "role": "string", "reason": "org", "waitedMs": 0 } ], "platformSaturated": true, "capturedAt": 0}Query Parameters
How the agent's run in this sandbox stands. running: the agent works now. completed: the agent finished its work. stopped: something ended the run on purpose before it finished, for example a newer run, a stop of the mission or a person. failed: the agent reported a failure, or exited without a report. stale: the platform closed the run without a report, after its time limit or after a later attempt replaced it.
Value in
- "running"
- "stale"
- "completed"
- "stopped"
- "failed"
Only the runs of this mission, by its issue id (for example ENG-42).
1 <= lengthOnly the runs of this agent role.
Value in
- "planner"
- "builder"
- "reviewer"
- "qa"
1 <= value <= 500200nextCursor from the previous page, with the same filters. Leave it out for the newest runs.
1 <= lengthResponse Body
application/json
application/json
application/json
curl -X GET "https://example.com/sandboxes"{ "data": [ { "sandboxId": "string", "issueId": "string", "projectId": "string", "role": "string", "harness": "string", "harnessVersion": "string", "runId": "string", "status": "running", "terminationReason": "string", "instanceType": "string", "createdAt": 0, "timeoutAt": 0, "lastHeartbeatAt": 0, "endedAt": 0, "lastCpuPct": 0, "lastMemUsedMb": 0, "lastMemTotalMb": 0, "lastDiskUsedPct": 0, "lastMetricAt": 0 } ], "nextCursor": "string"}curl -X GET "https://example.com/sandboxes/string"{ "sandbox": { "sandboxId": "string", "issueId": "string", "projectId": "string", "role": "string", "harness": "string", "harnessVersion": "string", "runId": "string", "status": "running", "terminationReason": "string", "instanceType": "string", "createdAt": 0, "timeoutAt": 0, "lastHeartbeatAt": 0, "endedAt": 0, "lastCpuPct": 0, "lastMemUsedMb": 0, "lastMemTotalMb": 0, "lastDiskUsedPct": 0, "lastMetricAt": 0 }, "runSessionId": "string", "metrics": [ { "t": 0, "cpuPct": 0, "memUsedMb": 0, "memTotalMb": 0, "diskUsedPct": 0 } ], "sessions": [ { "role": "string", "sessionId": "string", "ts": "string", "outcome": "string", "logKey": "string", "systemKey": "string", "totalCostUsd": 0 } ], "liveFragments": [ { "kind": "thought", "t": 0, "body": "string", "action": "string", "parameter": "string", "result": "string", "toolUseId": "string", "items": [ { "content": "string", "status": "string" } ] } ]}Path Parameters
1 <= lengthQuery Parameters
"session"Value in
- "session"
- "system"
- "prompt"
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/sandboxes/string/logs?role=string&sessionId=string"{ "sandboxId": "string", "role": "string", "sessionId": "string", "part": "session", "content": "string", "bytes": 0, "promptScope": "repo-contributed", "promptSpans": [ { "id": "string", "content": "string", "kind": "repo-conventions" } ]}Path Parameters
1 <= lengthResponse Body
application/json
application/json
application/json
curl -X POST "https://example.com/sandboxes/string/stop"{ "ok": true, "sandboxId": "string"}Path Parameters
1 <= lengthQuery Parameters
The id of the last event that you have. The stream sends the events after it, at most the newest 800. Ids count up by one, so a jump shows that older events were left out. Without a cursor, the stream starts with the last 20 events of the run. A Last-Event-ID header has the same effect.
0 <= valueThe longest time that the stream stays open, in seconds (default 300, at most 600). At that time the stream sends end with the reason time_cap.
1 <= value <= 600300Response Body
text/event-stream
application/json
application/json
curl -X GET "https://example.com/sandboxes/string/events"{ "event": "state", "data": { "sandboxId": "string", "issueId": "string", "role": "string", "status": "running", "stage": "pending" }}How is this page?