Skip to main content

How it works

The unpod SDK connects your AgentRunner to Unpod’s voice platform over WebSocket. Unpod handles STT, TTS, telephony, numbers, and recording - your code handles dialog logic using a SuperDialog DialogMachine or LLMAgent.
Animated SuperDialog and Unpod voice integration diagram showing caller speech through STT, user-turn hooks, DialogMachine.turn, agent-turn hooks, TTS, and caller playback.
Your dialog machine runs inside your process, in the same call as the rest of your agent logic. No separate WebSocket server needed.

Step 1 - Build your dialog machine

See SuperDialog Quickstart to generate and save a playbook.

Step 2 - Plug the machine into your session

Assign dialog_machine to ctx.session.dialog_machine inside your AgentRunner entrypoint. The SDK auto-wraps it - no adapter import needed.

Step 3 - Create and register your Speech Pipe


Complete example


Using pre-call data in the flow

Data passed when triggering an outbound call (or injected by the platform) is available on ctx.data:

Mid-call context injection

Inject system instructions at any point during an active call from your own business logic:

Switching flows mid-call (graph engine)

switch_flow is a graph-engine feature - construct the machine with a FlowSet and engine="flow":
On the Playbook engine (the default), model the same behaviour with multiple journeys and interrupts inside a single playbook instead of swapping flows. See Playbooks.

vs. LiveKit / PipeCat adapters


Next Steps

SDK Setup

AgentRunner constructor, credentials, and lifecycle.

Session Controls

say(), transfer(), recording controls during live calls.

Playbooks

Author the simple and full playbook formats.

SuperDialog Tools

Add HTTP, Python, and MCP tools to your agent.