---
title: "Stream chat events"
method: GET
path: "/agent/v2/chat/{id}/stream"
tags: ["Agents"]
---

# Stream chat events

`GET /agent/v2/chat/{id}/stream`

Relays OpenCode SSE events for this Daytona-backed chat runtime. Supports replay from buffered events using Last-Event-ID and transparently reconnects stopped or archived runtimes. Accepts either Bearer token auth or a short-lived stream token via query parameter. When both are provided, Bearer auth takes precedence.

## Path parameters

- `id` string, required

## Query parameters

- `token` string
- `lastEventId` integer

## Response `200`

SSE stream

## Other responses

- `401` — Invalid API key
- `403` — No agent access or non-API-key auth
- `404` — Chat not found

## Changes

- **2026-04-13** `73fdc101e073` — 1 info
  - added the new optional `query` request parameter `token`
- **2026-03-27** `220d723a75ba` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/casemark/apis/case-dev-api/changes/agent/v2/chat/:id/stream/get.md)

---

[API](https://skmtc.dev/casemark/apis/case-dev-api.md) · [All operations](https://skmtc.dev/casemark/apis/case-dev-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/casemark/case-dev-api/revisions/19bd0be9c80b/schema)
