Skip to content

Events API

The Events API provides a persistent SSE connection for workspace-level events. Use it to react to bundle lifecycle changes, data mutations, and connection health in real time.

Open a persistent SSE connection. The server sends events as they occur and a heartbeat every 30 seconds to keep the connection alive.

Response headers:

Content-Type: text/event-stream
Cache-Control: no-cache
Connection: keep-alive

Example:

Terminal window
curl http://localhost:27247/v1/events \
-H "Authorization: Bearer your-secret-key" \
--no-buffer

A new bundle was installed and started.

event: bundle.installed
data: {"name":"weather","bundleName":"@nimblebraininc/weather","status":"running","ui":null}
FieldTypeDescription
namestringShort server name
bundleNamestringScoped manifest name
statusstringLifecycle state after installation
uiobject | nullUI metadata, or null

A bundle was removed.

event: bundle.uninstalled
data: {"name":"weather"}
FieldTypeDescription
namestringShort server name of the removed bundle

A bundle’s MCP server process crashed. The runtime will attempt to restart it.

event: bundle.crashed
data: {"name":"weather","restartAttempt":1}
FieldTypeDescription
namestringShort server name
restartAttemptnumberWhich restart attempt this is (1-based)

A previously crashed bundle was successfully restarted.

event: bundle.recovered
data: {"name":"weather"}
FieldTypeDescription
namestringShort server name

A bundle exhausted all restart attempts and is permanently stopped. Manual intervention is needed to restart it.

event: bundle.dead
data: {"name":"weather","message":"Exceeded maximum restart attempts (3)"}
FieldTypeDescription
namestringShort server name
messagestringReason the bundle was marked dead

An agent-initiated tool call completed successfully, which may have mutated data in the tool’s backing service. Use this event to refresh UI components that display data from the affected server.

event: data.changed
data: {"server":"tasks","tool":"create_task","timestamp":"2025-10-15T10:31:15.000Z"}
FieldTypeDescription
serverstringMCP server that owns the tool
toolstringTool name that was called
timestampstringISO 8601 timestamp

Sent every 30 seconds to keep the connection alive and allow clients to detect stale connections.

event: heartbeat
data: {"timestamp":"2025-10-15T10:30:30.000Z"}
FieldTypeDescription
timestampstringISO 8601 timestamp
  • The server supports multiple concurrent SSE clients. Each client receives all events.
  • If a client disconnects, the server cleans up the connection automatically on the next broadcast.
  • There is no reconnection protocol built into the stream. If the connection drops, open a new GET /v1/events request.
  • The server sets idleTimeout to 255 seconds (the maximum Bun allows) to prevent premature connection closures.

The server maintains an in-memory buffer of the 500 most recent events. This buffer is used internally by components like the Home dashboard. It is not exposed through the HTTP API.