Reference · Help and examples
Examples and source map
Runnable starting points, editable architecture diagrams, and a guided map of the implementation.
Choose an example based on the API behavior you need to implement. The local room example needs no provider. Optional test harnesses exercise media and reasoner integrations; they are not required clients or part of the RMC client contract.
Runnable starting points
| Example | What it demonstrates | Run / open |
|---|---|---|
| First shared room | Scoped participant, two subscriptions, idempotent retry, replay, cleanup | Follow Quickstart |
| Embedded room agent + host | Scoped client publishes an input; a trusted Go agent produces an authorized derived event | go run ./docs/examples/room-agent; walkthrough |
| Reasoner request + response | Synthetic JSON exercised through the existing HTTP adapter | Wire-contract walkthrough; data examples, not a running service |
| HTTP history helper | Scanned cursors across invisible pages | Import into a Node or same-origin client; usage |
| React chat component | Shared handle, component cleanup, event-ID deduplication | Add to an existing React application; integration |
| Northwind architecture walkthrough | Real room APIs, SQLite, restricted views, restart/replay with deterministic work | npm run demo:northwind, then open the local /demo page |
| Optional media and reasoner test harness | multimodal-ui exercises RMC with native media, vision, and an HTTP reasoner; your client can implement its own UI |
Harness setup |
The snippets embedded in the guide are labeled when they depend on application callbacks or a persistence abstraction. The downloaded quickstart is a complete executable program. The React component is a component, not a second application scaffold.
Editable diagram library
Every diagram is a native Excalidraw scene under docs/assets/diagrams/, paired with a static SVG. Download the source and open it in Excalidraw to edit the boxes, connectors, and labels. The documentation site itself makes no request to Excalidraw or a rendering CDN.
| Diagram | View | Edit |
|---|---|---|
| System boundaries | SVG | Excalidraw |
| First client loop | SVG | Excalidraw |
| Room object model | SVG | Excalidraw |
| Publication sequence | SVG | Excalidraw |
| Multiplexed consumer queues | SVG | Excalidraw |
| Versioned shared state | SVG | Excalidraw |
| Filtered replay cursor | SVG | Excalidraw |
| Authorization boundary | SVG | Excalidraw |
| Client ownership | SVG | Excalidraw |
| Native media path | SVG | Excalidraw |
| Requested work | SVG | Excalidraw |
| Interaction and reasoning loops | SVG | Excalidraw |
| LiveKit dependency paths | SVG | Excalidraw |
| Current semantic HTTP boundary | SVG | Excalidraw |
| Embedded extension flow | SVG | Excalidraw |
| Catalog and proposed installation | SVG | Excalidraw |
| Proposed evolution process | SVG | Excalidraw |
Read the code by question
| Question | Implementation | Evidence |
|---|---|---|
| How does publication derive identity and deduplicate? | publication.go | Publication tests |
| Which operations create durable events? | Runtime mutation paths, SQLite append | Store tests |
| Where do filtered replay and live delivery meet? | subscription.go | Subscription tests |
| How are selectors and authorization combined? | session.go, auth.go | Session tests |
| Who owns reconnect and processed cursors? | SDK stream.ts | SDK stream tests |
| How do independent subscriptions share the wire? | multiplex.go | Multiplex tests |
| What does SQLite persist and version? | store.go | Store tests |
| How is native voice cleaned up? | SDK voice.ts | Voice tests |
| How does OpenAI Realtime traffic become room events? | Realtime normalization, server callback | Realtime adapter tests, voice server tests |
| What prevents excessive media-token authority? | Media session handler | Media tests |
| How does an embedded agent consume and publish? | agent_runtime.go | Agent tests |
| Where are the current integrations wired? | Server main, demo main | Reasoner adapter tests |
Contribute an example
Choose one client problem, state its prerequisite grants, and show the full lifecycle through cleanup. Keep payload contracts concrete. If an example depends on provider credentials, label that dependency. Link to implementation and tests when explaining a guarantee, and separate an application-owned helper from SDK API names.
Documentation is authored in Markdown and generated into committed static HTML. The authoring guide explains build, preview, checks, and the Excalidraw editing workflow. Hosting still uses the repository's main branch and /docs directory.