Repository
Source: github.com/scenaro/voice-agent Local development is bootstrapped from the projects workspace via./bootstrap-scenaro-local.sh.
Session lifecycle
Responsibilities
| Layer | Responsibility |
|---|---|
| Platform API | Session creation, agent dispatch, scenario config loading |
| Voice Agent | Voice pipeline, LLM reasoning, tool selection, protocol messages |
| @scenaro/sdk | Data channel listen, tool RPC handlers, feature UI |
| Transport (LiveKit today) | WebRTC realtime engine, session/room management |
Config handshake
On join, the agent sends aconfig payload:
config_ack. Until ack is received, the agent may wait or retry with config_request.
Tool execution model
Tools fall into two categories:| Type | Executed by | Path |
|---|---|---|
| Backend tools | Voice agent | Internal Python functions |
| Frontend tools | Your React app | Transport RPC (LiveKit today) → SDK session → your tool handler |
frontend_method in Cockpit. The agent calls it via Transport RPC; the SDK session routes it to your handler — a tools entry on useScenaroSession or a FeatureProvider registry handler.
State sync
The frontend can send experience checkpoints onstate:update. The agent uses this for context restoration across page navigations or session resumes.