Subscribe
The monitor stream is a WebSocket channel (/v1/monitor/ws). The Python SDK and
CLI manage the connection; raw HTTP clients perform the upgrade and send a
monitor_subscribe message as described in the
WebSocket protocol. The TypeScript SDK does
not expose a monitor stream.
monitor_subscribe message with an optional
interval_ms and include_processes flag. Server-side intervals are clamped
to the supported range: 500 ms to 10,000 ms.
Metrics endpoint
Event classes
Monitor streams can emit snapshot, update, metrics, processes, and error events. Use callback parameters for only the event types your application needs.| Callback | Message type |
|---|---|
on_snapshot | Initial snapshot of observed machine state. |
on_update | State update after the snapshot. |
on_metrics | CPU, memory, and runtime metrics. |
on_processes | Process list updates when include_processes=True. |
on_error | Subscription or stream errors. |