Realtime

SSE: agent run changes

Server-Sent Events stream for run changes for a specific agent. Supports cookie auth and API key auth via ?token=ask_... query parameter.

GET/api/realtime/agents/{packageId}/runs

Authorization

better-auth.session_token<token>

Cookie session from Better Auth. Requires X-Org-Id header for org-scoped routes.

In: cookie

Path Parameters

packageId*string

Agent package ID

Query Parameters

orgId*string

Organization ID. Required for SSE auth (cookies cannot carry X-Org-Id header on EventSource).

Formatuuid
token?string

API key (ask_ prefix) for SSE authentication. EventSource cannot send Authorization headers, so API key auth uses this query parameter instead.

verbose?boolean

When true, include full payload with result and data fields. Default (false) strips large user-content fields for safer consumption by external agents.

Defaultfalse
curl -X GET "https://loading/api/realtime/agents/string/runs?orgId=497f6eca-6276-4993-bfeb-53cbbbba6f08"
"string"
{
  "type": "https://docs.appstrate.dev/errors/unauthorized",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Invalid or missing session",
  "code": "unauthorized",
  "requestId": "req_abc123"
}