Real-time updates
Cortex pushes changes to you over Server-Sent Events. The SDK wraps this in a
Firestore-style watch() API: you get the current state immediately (over REST) and then a
live stream of changes — with reconnection handled for you. No polling, no manual
EventSource, no merge logic.
Watch a live transcript
The most common real-time use case: render a transcript as people speak.
Each snapshot gives you the full current array plus the changes that triggered it, so you can either re-render everything or apply incremental updates.
Watch a collection
Watch every session in a project and react as they’re created, started or stopped:
The same pattern works for project.participants.watch(),
project.sanctions.watch() and project.gatherings.watch().
Watch nested collections
Some collections live on a live object you fetch first:
Resilience
- All watchers in a project share a single SSE connection (closed when the last one unsubscribes).
- The connection auto-reconnects with backoff, and on every reconnect each subscription re-fetches its snapshot — so a dropped connection never leaves you with stale data.
- An idle-timeout guards against dead sockets; you can tune it via
realtime.idleTimeoutMson the client (default 45s,0to disable).
watch() works with both API-key and JWT auth. Streaming requires a WHATWG fetch
(the global fetch on Node 18+ or any modern browser).
Don’t need the SDK?
You can consume the raw SSE stream directly — see Events & Real-time. For durable, replayable delivery, use webhooks instead.