Skip to content

Server-Sent Events stream of RunEvent frames

GET
/v1/runs/{runId}/stream
curl --request GET \
--url https://example.com/v1/runs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/stream \
--header 'Authorization: Bearer <token>'

Each SSE frame is one RunEvent per @kindgi/specs/run-event.schema.json. Reconnect via Last-Event-Id: <runId>:<sequence>. The server ends the stream after the run’s terminal event, or after 5 minutes: reconnect with Last-Event-Id to continue.

runId
required
string format: uuid

RunId — opaque branded string (a UUID).

Last-Event-Id
string

Resume marker (<runId>:<sequence>). Server replays events with sequence > lastSeen before entering live-poll.

Text/event-stream. Each frame is one RunEvent.

Media typetext/event-stream
object
eventId
required

Monotonic event id within the run. Sent as the SSE id: line and echoed back via Last-Event-Id on reconnect.

string
>= 1 characters
runId
required
string
>= 1 characters
tenantId
required
string
>= 1 characters
timestamp
required
string format: date-time
kind
required
string
Allowed values: run.queued run.started run.step-started run.step-completed run.step-failed run.step-retry-scheduled run.iteration-started run.iteration-completed run.tool-invoked run.tool-result run.model-token run.artifact-produced run.guardrail-violated run.wait-suspended run.wait-resumed run.approval-requested run.approval-completed run.completed run.failed run.cancelled
sequence
integer
nodeId
string
payload

Missing / malformed / expired / revoked bearer token.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

No run with that id under this tenant.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}