---
title: "Stream an agent run live"
---

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

# Stream an agent run live

Path: CloudRaker Paperwork API › Agents

`GET /v1/agent-runs/{id}/stream`

Server-sent events for a run, live: `text/event-stream` with three event kinds.

- `timeline` — a durable event, same shape as `GET /v1/agent-runs/{id}/timeline`, with the SSE `id` set to the event id. Delivery is at-least-once: dedupe by id, and reconnect with `Last-Event-ID` to resume.
- `live` — provisional activity while the agent works: `{kind: "text_delta", stepId, text}` streams the agent's words as it writes them; `{kind: "tool_started"|"tool_finished", toolCallId, toolName, ok?}` announce tool activity. Never durable — a reconnect replays none of it.
- `status` — `{status}` in the run-status vocabulary, sent on connect and on every change. Terminal status ends the stream.

Streams are capped at five minutes — reconnect to continue; `Last-Event-ID` carries the durable cursor. Reading a `queued` run's stream starts it, exactly like reading the run. curl it: `curl -N -H "authorization: Bearer $KEY" …/v1/agent-runs/agr_…/stream`

**Learn more:** [Agents guide](https://docs.cloudraker.com/paperwork/capabilities/agents)

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `id` (`streamAgentRun.path.id`; string, required)
  - minLength 1

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.cloudraker.com/v1/agent-runs/<id>/stream' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/v1/agent-runs/<id>/stream';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/v1/agent-runs/<id>/stream"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

The event stream (`text/event-stream`).

### 400

Validation Error

#### Example

```json
{
  "success": false,
  "error": [
    null
  ],
  "data": null
}
```

- `success` (`streamAgentRun.response.400.success`; boolean, required)
  - one of `false`
- `error` (`streamAgentRun.response.400.error`; array<unknown>, required)
- `data` (`streamAgentRun.response.400.data`; unknown, required)

### 401

Missing or invalid credentials.

#### Example

```json
{
  "code": "string",
  "message": "string",
  "retryable": true,
  "requestId": "string",
  "docUrl": "string"
}
```

- `code` (`streamAgentRun.response.401.code`; string, required)
- `message` (`streamAgentRun.response.401.message`; string, required)
- `retryable` (`streamAgentRun.response.401.retryable`; boolean, required)
- `requestId` (`streamAgentRun.response.401.requestId`; string, required)
- `docUrl` (`streamAgentRun.response.401.docUrl`; string, optional)

### 403

The credential is valid but cannot administer this organization.

#### Example

```json
{
  "code": "string",
  "message": "string",
  "retryable": true,
  "requestId": "string",
  "docUrl": "string"
}
```

- `code` (`streamAgentRun.response.403.code`; string, required)
- `message` (`streamAgentRun.response.403.message`; string, required)
- `retryable` (`streamAgentRun.response.403.retryable`; boolean, required)
- `requestId` (`streamAgentRun.response.403.requestId`; string, required)
- `docUrl` (`streamAgentRun.response.403.docUrl`; string, optional)

### 404

Unknown run id.

### 429

Rate limited. The `/v1` API allows at least **67 requests per minute per organization** (about 1,000 requests per 15 minutes) — a guaranteed floor, enforced per edge location, so a geographically spread caller may get more. Wait for the `Retry-After` interval and retry — the error is `retryable`.

#### Example

```json
{
  "code": "rate_limited",
  "message": "string",
  "retryable": true,
  "requestId": "string",
  "docUrl": "string"
}
```

- `code` (`streamAgentRun.response.429.code`; string, required)
  - one of `"rate_limited"`
- `message` (`streamAgentRun.response.429.message`; string, required)
- `retryable` (`streamAgentRun.response.429.retryable`; boolean, required)
  - one of `true`
- `requestId` (`streamAgentRun.response.429.requestId`; string, required)
- `docUrl` (`streamAgentRun.response.429.docUrl`; string, optional)


Source: https://docs.cloudraker.com/paperwork/api/agents/stream-agent-run/index.md
