@scenaro/sdk.
It follows the same structure as Retell, Vapi, and ElevenLabs docs: install → connect → listen →
handle tools → ship.
Already have a working quickstart? Use this page as a checklist and jump to the sections you need.
What you are building
Prerequisites
- A published scenario UUID from Cockpit
- Node.js 18+ and React 18+ (for the React path)
- Microphone access in the browser (for voice mode)
Step 1 — Install
@scenaro/sdk@0.3.0
This is all you need for the embed path below. Only install
livekit-client and
@livekit/components-react if you reach Step 7.Step 2 — Choose your integration path
React embed (recommended)
ScenaroProvider + useScenaroSession. Used by all Scenaro experience apps and platform-spa.
Start here unless you have a strong reason not to.Headless / non-React
ScenaroSession from @scenaro/sdk. Same lifecycle and events, no React bindings.
See ScenaroSession reference.Provider stack (React)
FeatureProvider is optional — skip it if you only need session tools (see Tools and features).
Step 3 — Start a session
The SDK handles the full connect flow: identify visitor → start session → connect Transport → config handshake.Auth is two-hop:
identifyUser then startSession. You never call these directly in a
typical embed — start() runs both. See Authentication.Step 4 — Listen to events
Like Retell’scall_started / Vapi’s call-start / ElevenLabs’ onConnect, Scenaro exposes
session state through the hook and typed callbacks:
Step 5 — Handle frontend tools
When the voice agent calls a tool configured for frontend execution, the SDK routes the RPC to your handler and returns the result to the agent. You have two integration patterns — pick one per tool:Step 6 — Build UI features (optional)
For rich experiences (product search, comparison, shopping list), register feature components:- Define handlers + a React component per feature type
- Register in a
Map<string, ToolRegistryEntry> - Mount
FeatureProviderwith that registry
Most Scenaro experience apps keep a local
FeatureManager instead of SDK FeatureProvider.
Both patterns work on top of useScenaroSession. See Tools and features.Step 7 — Advanced: Transport extensions (optional)
Most embeds never touch the underlying engine directly. When you need custom audio visualizers, avatars, or participant UI, useroom from the hook — the current Transport implementation’s
engine handle:
Step 8 — Ship to production
Before going live:- Env vars:
NEXT_PUBLIC_API_URL(or equivalent) points to production API - Scenario published in Cockpit production environment
- HTTPS + microphone permission UX
- Error handling for
IDENTIFY_FAILED,SESSION_START_FAILED,MIC_PERMISSION_DENIED - Session cleanup on page unload (
end())
Recommended reading order
1
Quickstart
15-minute embed — minimal working example
2
Concepts
Key concepts — scenario, auth, protocol
3
React integration
Provider stack — props, hooks, Next.js
4
Tools
Tools and features — choose the right pattern
5
Recipes
Pick a track: embed · e-commerce · multi-language
6
Reference
Compare with other platforms
Scenaro’s differentiator: scenario-driven features authored in Cockpit, with a typed
protocol between agent and frontend carried over Transport.