Skip to content
Navigation

Stream an agent run live

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

GET
https://api.cloudraker.com/v1/agent-runs/{id}/stream
Try it
Path parameters
Live API request

Authorization

  • bearerAuth
    HTTP
    required

Path parameters

  • id
    string
    required
    minLength: 1

Returns

200

The event stream (text/event-stream).

400

Validation Error
JSON
  • success
    false
    required
  • error
    array of
    unknown
    required
  • data
    unknown
    required

401

Missing or invalid credentials.
JSON
  • code
    string
    required
  • message
    string
    required
  • retryable
    boolean
    required
  • requestId
    string
    required
  • docUrl
    optional
    string

403

The credential is valid but cannot administer this organization.
JSON
  • code
    string
    required
  • message
    string
    required
  • retryable
    boolean
    required
  • requestId
    string
    required
  • docUrl
    optional
    string

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.
JSON
  • code
    rate_limited
    required
  • message
    string
    required
  • retryable
    true
    required
  • requestId
    string
    required
  • docUrl
    optional
    string

Type to search…

↑↓ navigate↵ selectEsc close