> ## Documentation Index
> Fetch the complete documentation index at: https://docs.snorbe.deskrex.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Run Status

> Check the status of an agent run

# Get Run Status

Get the current status of an agent run. Use this to poll progress for long-running agent executions.

## Request

```
GET /api/v1/agent/run/{runId}/status
```

### Path Parameters

| Parameter | Type     | Description  |
| --------- | -------- | ------------ |
| `runId`   | `string` | Agent run ID |

### Headers

| Header          | Required | Description                           |
| --------------- | -------- | ------------------------------------- |
| `Authorization` | Yes      | API key in `Bearer snorbe_...` format |

## Response

```json theme={null}
{
  "id": "clxyz...",
  "status": "completed",
  "createdAt": "2026-04-16T09:36:01.351Z",
  "updatedAt": "2026-04-16T09:36:08.352Z",
  "pendingPlanDraft": false,
  "pendingReportDraft": false,
  "pendingMatrixDraft": false,
  "browseState": {
    "isBrowsing": true,
    "askHumanQuestion": "Which menu should I open after logging in?"
  },
  "skillState": {
    "isRunningSkill": true,
    "skillName": "patent-search",
    "pendingSecretKeys": ["PATENT_API_KEY"]
  }
}
```

### Response Fields

| Field                          | Type       | Description                                                              |
| ------------------------------ | ---------- | ------------------------------------------------------------------------ |
| `id`                           | `string`   | Agent run ID                                                             |
| `status`                       | `string`   | Status (`"completed"`, `"running"`, `"error"`, etc.)                     |
| `createdAt`                    | `string`   | Creation timestamp (ISO 8601)                                            |
| `updatedAt`                    | `string`   | Last update timestamp (ISO 8601)                                         |
| `pendingPlanDraft`             | `boolean`  | Whether a plan draft is pending review                                   |
| `pendingReportDraft`           | `boolean`  | Whether a report draft is pending review                                 |
| `pendingMatrixDraft`           | `boolean`  | Whether a matrix draft is pending review                                 |
| `browseState`                  | `object`   | Returned only while the browse tool is active                            |
| `browseState.isBrowsing`       | `boolean`  | Whether browser automation is still active                               |
| `browseState.askHumanQuestion` | `string`   | Question waiting for a human answer during browsing. Omitted when absent |
| `skillState`                   | `object`   | Returned while a skill is running or waiting for secrets                 |
| `skillState.isRunningSkill`    | `boolean`  | Whether the skill session is active                                      |
| `skillState.skillName`         | `string`   | Skill name that is running or requesting secrets                         |
| `skillState.pendingSecretKeys` | `string[]` | Secret key names waiting to be registered                                |

<Note>
  When `pendingPlanDraft`, `pendingReportDraft`, or `pendingMatrixDraft` is `true`, you need to complete the review using the corresponding HITL endpoint. After that, resume execution via the [streaming resume endpoint](/en/api-reference/stream-agent-run).
</Note>

<Note>
  If `browseState.askHumanQuestion` is present, this is not a plan review. It is a browser automation question. Send the answer to `/browser/answer-question`, not to `/agent/run/{runId}/...`. The request needs the `browse-start.payload.websocketInfo.session_id` value captured from the active SSE stream.
</Note>

<Note>
  If `skillState.pendingSecretKeys` has values, the skill is waiting for secrets. Register each key through `/secret` so the waiting skill execution can continue.
</Note>

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://app.snorbe.deskrex.ai/api/v1/agent/run/clxyz123/status" \
    -H "Authorization: Bearer snorbe_your_api_key_here"
  ```

  ```python Python theme={null}
  import requests
  import time

  run_id = "clxyz123"

  while True:
      resp = requests.get(
          f"https://app.snorbe.deskrex.ai/api/v1/agent/run/{run_id}/status",
          headers={"Authorization": "Bearer snorbe_your_api_key_here"},
      )
      data = resp.json()
      print(f"Status: {data['status']}")

      if data["status"] == "completed":
          print("Done!")
          break
      if data["status"] == "error":
          print(f"Error occurred")
          break

      time.sleep(5)
  ```
</CodeGroup>

## Error Responses

| HTTP Status | Description            |
| ----------- | ---------------------- |
| 401         | Invalid API key        |
| 400         | Invalid `runId` format |
