Connecting
1
Fetch config
GET /v1/loom/realtime/config returns { enabled, key, cluster }. If enabled is false, realtime is not configured for this workspace — fall back to polling.2
Subscribe
The channel is
private-thread- plus the thread UUID.3
Authorize
Your client’s subscription request goes to
POST /v1/loom/realtime/auth with channel_name and socket_id. We check the caller owns that thread and return the Pusher auth payload.403.
The React SDK does this for you
@usepatchwork/react fetches config, subscribes, authorizes, and falls back to polling when realtime is disabled. If your agent lives in a React app, start there rather than wiring Pusher by hand.
Falling back
Realtime is an optimisation, not a requirement. Everything it tells you is also discoverable:
The one thing polling cannot reproduce is
message.delta — streaming fragments only exist on the wire.
Choosing a transport
- A chat UI — realtime. Streaming is most of the experience.
- A backend integration — webhooks for terminal events, polling for pauses.
- A batch job — polling. There is no session to stream to.