Skip to Content
Levain LabsLevain Labs
API ReferenceRuns

List Runs

List recent customer-agent runs for the workspace, newest first.

List recent customer-agent runs for the workspace, newest first.

Optional agent_id filters to one agent and status to one run status; both can be combined. before pages back: pass the last run id of the previous page to get the runs older than it; a page shorter than limit is the last. Platform-initiated runs have their own surface (/api/v1/platform-runs) and never appear here. Capped at 200 entries per request.

GET
/api/v1/runs/

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Query Parameters

limit?Limit
Default50
agent_id?|null
before?|null
status?|null

Header Parameters

X-API-Key?string|null

Response Body

application/json

application/json

curl -X GET "https://api.levainlabs.com/api/v1/runs/"
[
  {
    "id": "string",
    "status": "string",
    "paused": false,
    "cost_usd": 0,
    "billed_usd": 0,
    "sandbox_billed_usd": 0,
    "sandbox_seconds": 0,
    "tokens_in": 0,
    "tokens_out": 0,
    "started_at": "string",
    "finished_at": "string",
    "error": "string",
    "agent_id": "string",
    "agent_version_id": "string",
    "agent_version": 0,
    "parent_run_id": "string",
    "session_id": "string",
    "user_prompt": "string",
    "created_at": "string",
    "kind": "agent",
    "artifact_count": 0,
    "artifact_count_truncated": false,
    "latency": {
      "queue_wait_ms": 0,
      "sandbox": "warm",
      "sandbox_ms": 0,
      "code_fetch_ms": 0,
      "code_deliver_ms": 0,
      "first_node_ms": 0,
      "total_ms": 0
    },
    "runtime": {
      "id": "string",
      "name": "string",
      "mode": "string",
      "model_auth": "string"
    },
    "origin": {
      "kind": "slack",
      "provider": "string",
      "provider_display": "string",
      "sent_by": "string",
      "event_type": "string",
      "subject": "string"
    },
    "queue": {
      "waiting_for": "turn",
      "position": 0,
      "blocking_run_id": "string",
      "blocking_run": {
        "id": "string",
        "agent_id": "string",
        "agent_slug": "string",
        "status": "string",
        "finished_at": "string",
        "origin": {
          "kind": "slack",
          "provider": "string",
          "provider_display": "string",
          "sent_by": "string",
          "event_type": "string",
          "subject": "string"
        }
      },
      "runtime": {
        "id": "string",
        "name": "string",
        "status": "online",
        "runner_version": "string"
      },
      "required_runner_version": "string",
      "resumes_at": "string"
    },
    "replaced_by_run_id": "string",
    "handled_by_run_id": "string"
  }
]