Provider stack
ScenaroProvider
Owns the session, creates a sharedScenaroClient and scoped ScenaroEventBus, and injects the current Transport implementation’s RoomContext (LiveKit today) silently — no manual RoomContext.Provider wiring needed.
Hooks:
useScenaro()— full context (client+events)useScenaroClient()— HTTP client onlyuseScenaroEvents()— event bus only
useScenaroSession
The single entry point for a session. It handles the full lifecycle — identify, start session, Transport connect/disconnect — plus the data channel, config handshake, and tool RPC internally.Options
start(overrides?) accepts option overrides for the session being started — everything except scenario.
Frontend tools
Tools are plain async functions — norequestId plumbing:
Session config
After the config handshake:config— curated{ features, collections, avatarEnabled, audioDictationEnabled }rawConfig— full wire payload (restore_state, tool wiring, snake_case fields)
Advanced: engine handle access
The hook also returnsroom — the current Transport implementation’s engine handle (LiveKit
Room | null) — for advanced use cases. Most apps never need it — see
Advanced: Transport extensions.
The hook is powered by the headless
ScenaroSession class from @scenaro/sdk, usable outside React. See the ScenaroSession reference.Next.js
Add the SDK totranspilePackages: