Live events
Use the full event stream when you need canonical updates rather than refetching an entire conversation after each notification.
Load and follow
Section titled “Load and follow”- Establish a stream and its cursor before loading the initial snapshot; buffer events while the snapshot loads.
- Load the current authorized history once.
- Apply buffered and subsequent events, merging messages by their canonical IDs.
- Persist an event’s sequence after applying it successfully.
This avoids a gap between reading history and starting to listen. For invalidation-only consumers, the summary stream is an explicit alternative; it does not contain the full message body.
Choose your SDK
Section titled “Choose your SDK”| Language | API |
|---|---|
| Python | client.events(after=saved_cursor) iterator |
| TypeScript | client.events({ after: savedCursor, signal }) async iterator |
| Go | client.StreamEvents(ctx, EventOptions{After: cursor}, handler) |
These are call shapes inside an initialized application, not standalone programs. The SDK reference and maintained client types describe the complete inputs.
Resume safely
Section titled “Resume safely”Consumers resume from the last fully handled frame and skip replay. Normal server stream rotation reconnects automatically. Authentication denial terminates the stream instead of retrying forever.
A sequence is a resume cursor, not a count of messages you are entitled to see. Server visibility checks still apply. Clear cached private data when identity or access changes, and obey the current history window rather than assuming every message is retained in the initial snapshot.