AIOps Bot Platform
Console

Agent WebSocket Events

Real-time event streaming — connection, reconnection/replay, heartbeats, and the full event type reference.

Connect to receive real-time updates from the runtime:

ws://localhost:4484/ws                           Global events (all conversations)
ws://localhost:4484/conversations/:id/ws         Per-conversation events

Authenticate WebSocket connections with ?api_key=<key>.

Reconnection & replay

Pass lastEventSeq=<n> as a query param when (re)connecting to receive any missed events:

ws://localhost:4484/conversations/:id/ws?lastEventSeq=42&api_key=secret

The runtime keeps a ring buffer of the last 2000 events. On connect, any buffered events with seq > lastEventSeq are replayed before live streaming resumes. For an HTTP-only catch-up (e.g. after a long disconnect), use GET /events/recent?since=42.

Heartbeat

Every 15 seconds the server sends { "type": "heartbeat" } to all connected clients. Use it to detect stale connections — close and reconnect if you miss them.

Event shape

{
  "type": "run.started",
  "conversationId": "conv_abc123",
  "timestamp": 1775845291793,
  "seq": 42, // monotonic sequence number (on most events)
  "data": {/* ... */},
}

Event types

EventWhen it fires
run.startedAgent begins processing a message
run.progressMid-run progress (e.g. iteration/tool milestones)
message.createdNew message persisted (user, assistant, or tool)
message.deltaStreaming text delta (assistant response in progress)
run.completedAgent finished processing successfully
run.failedAgent run failed
run.cancelledRun was cancelled via cancel/interrupt
queue.updatedQueue changed (item added/removed/completed)
conversation.updatedConversation metadata/status/title/model changed
conversation.deletedConversation was deleted
subagent.startedA delegated subagent run started
subagent.message.createdA message was created inside a subagent run
subagent.completedA subagent run completed
subagent.failedA subagent run failed
heartbeatKeepalive (no seq; every 15s)

For a basic chat UI you only need: run.started, message.delta, message.created, run.completed, and run.failed. The rest power richer dashboards and observability.

// Examples
{ "type": "run.started", "conversationId": "conv_abc123", "timestamp": 1775845291793, "data": { /* ... */ } }
{ "type": "message.delta", /* ... */ "data": { "delta": "partial text" } }
{ "type": "run.completed", /* ... */ }
{ "type": "run.failed", /* ... */ }
{ "type": "queue.updated", /* ... */ }