RoomClient.
This is the primitive that turns a room URL and participant token into an active room connection your UI can render on top of.
What you need
- A room URL
- A participant token
- A way to fetch both from your backend
React
UseuseRoomConnection from @meshagent/meshagent-react:
useRoomConnection creates the RoomClient, starts it, and optionally enables messaging.
If your React app also needs OAuth login, pair this with @meshagent/meshagent-react-auth for hook-based auth flows or @meshagent/meshagent-ts-auth for framework-agnostic auth helpers.
Flutter
UseRoomConnectionScope from meshagent_flutter:
RoomConnectionScope manages authorization, connection state, reconnect behavior, and disposal for you.
When to use which helper
- Use React
useRoomConnectionin web apps built around React hooks. - Use Flutter
RoomConnectionScopein Flutter apps where you want connection state to drive the widget tree.
What to do next
Once the room is connected, you can:- render messages and participants
- call agents or tools
- open documents with Document Connections
- use the runtime APIs documented in Room API