How it works
Theunpod 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.
Step 1 - Build your dialog machine
Step 2 - Plug the machine into your session
Assigndialog_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 onctx.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.