---
title: "Stream persisted agent run events"
method: GET
path: "/agent/runs/{run_id}/events/stream"
tags: ["agent"]
---

# Stream persisted agent run events

`GET /agent/runs/{run_id}/events/stream`

## Request

- Base URL: `https://developer.qaip.com/api/v1`
- URL: `https://developer.qaip.com/api/v1/agent/runs/{run_id}/events/stream`
- Auth: API key in header `x-api-key`

Replays events whose index is greater than the cursor, then follows committed events until the run reaches a terminal state. Reconnecting with the last received index is lossless and duplicate-safe.

## Path parameters

- `run_id` string, required

## Query parameters

- `after` integer
- `principal_id` string

## Headers

- `Last-Event-ID` string

## Response `200`

Indexed AG-UI Server-Sent Events. Keepalive comments do not advance the cursor.

## Other responses

- `400`: Invalid cursor
- `401`: Unauthorized
- `404`: Not Found
- `502`: The application proxy could not obtain an upstream response before forwarding response headers. The error code is unavailable and retryable is false: upstream side effects may have completed, so a 502 alone does not make retrying safe. Check the operation's idempotency and recovery contract before retrying. A failure after streaming has started instead aborts the stream without appending this JSON body. CDN or load-balancer generated errors may have a different body and are not described by this response.

## Changes

- **2026-09-17** `2489c6f1a9d8`: 13 info
  - added the non-success response with the status `502`
  - added the optional property `error/code` to the response with the `400` status
  - added the optional property `error/code` to the response with the `401` status
  - added the optional property `error/code` to the response with the `404` status
  - …9 more
- **2026-08-17** `c874961c9519`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/qlonolink/apis/qaip-apis/changes/agent/runs/:run_id/events/stream/get.md)

---

[API](https://skmtc.dev/qlonolink/apis/qaip-apis.md) - [All operations](https://skmtc.dev/qlonolink/apis/qaip-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/qlonolink/apis/qaip-apis/revisions/2489c6f1a9d8?raw)
