This page is the developer journey map for building a voice experience with @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

LayerYour responsibilityProvided by Scenaro
ScenarioChoose publication UUIDCockpit authoring + agent
SessionCall start() / end()Identify, JWT, Transport credentials
TransportUsually nothingSDK connects the session + data channel — see Transport
ToolsImplement frontend handlersAgent calls tools via RPC
UI featuresRegistry + componentsFeatureProvider or local runtime
BrandCSS, layout, copy

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

Current version: @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’s call_started / Vapi’s call-start / ElevenLabs’ onConnect, Scenaro exposes session state through the hook and typed callbacks:
What you needHow
Connection statestatus, agentState
Transcript / messagesmessages array + onMessage
Session configconfig (curated) or rawConfig (wire format)
Errorserror + onError
Session endedonSessionEnd
Cross-component eventsuseScenaroEvents() event bus
See Events and listeners for the full event catalog.

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:
PatternBest forDoc
Session toolsHeadless logic, no UI paneluseScenaroSession({ tools })
Feature toolsTool opens a UI panel (search, cart…)FeatureProvider registry
Read Tools and features before wiring handlers — the two patterns use different handler signatures.

Step 6 — Build UI features (optional)

For rich experiences (product search, comparison, shopping list), register feature components:
  1. Define handlers + a React component per feature type
  2. Register in a Map<string, ToolRegistryEntry>
  3. Mount FeatureProvider with that registry
See Feature registry and the custom feature recipe.
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, use room from the hook — the current Transport implementation’s engine handle:
See Advanced: Transport extensions and Transport for the portable-vs-engine-extension distinction.

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())
Full checklist: Production checklist.
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

Compare with other platforms

ThemeRetellVapiElevenLabsScenaro
Web SDK installretell-client-js-sdk@vapi-ai/web@elevenlabs/react@scenaro/sdk/react
Start callstartCall({ accessToken })start(assistantId)startSession({ agentId })start() via useScenaroSession
AuthServer mints tokenPublic key + assistant IDSigned URL / tokenTwo-hop identify + session (automatic)
Eventscall_started, updatecall-start, messageonConnect, onMessagestatus, agentState, messages
Client toolstool-calls (one-way)clientToolsSession tools + FeatureProvider (two-way RPC)
TransportWebRTC audioWebRTCWebRTC / WebSocketAbstracted (LiveKit today) — see Transport
Scenaro’s differentiator: scenario-driven features authored in Cockpit, with a typed protocol between agent and frontend carried over Transport.