react, react-dom,
livekit-client, @livekit/components-react — the latter two back the current
Transport implementation and are only required at runtime if you use
Transport extensions.
ScenaroProvider
Owns the sharedScenaroSession and the API client. Also injects
LiveKit’s RoomContext (the current Transport implementation) so
@livekit/components-react hooks work without extra wiring — see
Advanced: Transport extensions.
Throws if neither
client nor apiUrl is provided. The session’s transport listeners are
released automatically when the provider unmounts.
useScenaroSession
Single entry point for the session contract. Must be called under aScenaroProvider.
Options
UseScenaroSessionOptions — everything from StartSessionOptions
plus React callbacks:
Return value
Tool handlers
Plain functions. Return value is serialized back to the agent; throwing produces anERROR
response; exceeding the RPC timeout produces TIMEOUT and aborts context.signal.
FeatureProvider
Wires tool calls to UI components via an injectable registry. See Feature registry.useFeatures
ReturnsFeatureRuntimeContextValue: