Skip to main content
GET /v1/deployments/:deployment_id/events
Opens a long-lived Server-Sent Events connection that delivers every event from the deployment: tokens as the agent writes, tool calls and results, status changes, and steering requests. Wire it directly to your chat UI — the same stream doubles as an audit trail for logging.

Request

curl -N "https://api.prismagents.com/v1/deployments/dep_7xK9s2/events" \
  -H "Authorization: Bearer $PRISM_API_KEY" \
  -H "Accept: text/event-stream"

Path parameters

ParameterTypeRequiredDescription
deployment_idstringYesDeployment ID

Query parameters

ParameterTypeRequiredDescription
thread_idstringNoOnly deliver events for one thread
run_idstringNoOnly deliver events for one run

Event stream

Each event has an event type, an id, and a JSON data payload:
event: token
id: evt_0193
data: {"run_id":"run_4mPx81","thread_id":"thr_default_8a1","delta":"Here are five directions"}

event: tool_call
id: evt_0194
data: {"run_id":"run_4mPx81","tool":"generate_video","arguments":{"prompt":"..."}}

event: tool_result
id: evt_0195
data: {"run_id":"run_4mPx81","tool":"generate_video","result":{"status":"queued"}}

event: steering_request
id: evt_0196
data: {"run_id":"run_4mPx81","summary":"About to post 5 ads to Meta. Approve?"}

event: run_status
id: evt_0197
data: {"run_id":"run_4mPx81","status":"completed"}

Event types

EventPayload
tokenIncremental text output (delta)
tool_callTool name and arguments the agent is invoking
tool_resultResult returned to the agent
steering_requestThe agent paused for human approval or input
run_statusRun transitions: running, waiting_on_human, completed, error
filesystemWorkspace file changes, when filesystem_webhooks is enabled

Reconnection

The stream supports resumption via the Last-Event-ID header. Reconnect with the ID of the last event you received and the server replays everything you missed:
curl -N "https://api.prismagents.com/v1/deployments/dep_7xK9s2/events" \
  -H "Authorization: Bearer $PRISM_API_KEY" \
  -H "Last-Event-ID: evt_0195"

Errors

StatusErrorWhen
401unauthorizedMissing or invalid API key
403forbiddenAPI key lacks deployments:read scope
404not_foundDeployment does not exist
See Errors for the full error reference.