useAgentRuntimeWebSocket
Agent Runtimes / hooks/useAgentRuntimes / useAgentRuntimeWebSocket
Function: useAgentRuntimeWebSocket()
useAgentRuntimeWebSocket(
options):void
Defined in: hooks/useAgentRuntimes.ts:874
Connect to the agent-runtime monitoring WebSocket.
The hook writes all incoming data into the useAgentRuntimeStore Zustand
store. Components that need approvals, MCP status, context snapshots, or
full-context data simply read from the store.
Mount this hook once near the top of your component tree (e.g. in
the example root or in ChatBase). All other components read from the
store — no extra WebSocket connections needed.
Parameters
options
UseAgentRuntimeWebSocketOptions
Returns
void