Unpod
Phone numbers, STT, TTS, routing, call control
Your App
Agent brain, tools, prompts, business logic
Production
Public runner, secrets, scaling, shutdown, observability
Step 1 - Install the SDK
- pip
- uv
Source on GitHub: unpod-ai/unpod-python-sdk.
Step 2 - Set your environment
Create a.env file in your project root and add the API keys:
- Local Dev
- Production
UNPOD_BASE_URL is the shared default for production. The SDK derives:- REST:
https://<host>/platform - Runner/orchestrator:
wss://<host>
UNPOD_SERVICE_BASE_URL and UNPOD_ORCHESTRATOR_URL separately - UNPOD_BASE_URL does not work for local services.If you use a different dialog provider, set its key here instead of
ANTHROPIC_API_KEY.Step 3 - Pick a Voice Profile
agent_profile_id you want and use
it as voice_profile in Step 4:
Step 4 - Create a Speech Pipe
A Speech Pipe ties a voice profile to your agent. Theagent_id is a string
you choose - it links the pipe to the AgentRunner you run in Step 7T.
Save the
pipe.pipe_id - you will use it in the steps below. A pipe without
agent_id will show as degraded and calls will not be dispatched to your
runner.Step 5 - Build a Dialog Flow (optional)
create_dialog_flow generates a structured conversation graph (nodes + edges)
from a plain-English description. Run it once and save the result.
support.json. Use it in your entrypoint with
DialogMachine(flow=Flow.load("support.json"), llm="...") for structured,
node-based conversations. For a simpler prompt-only agent, skip this step and
use AnthropicAdapter or LLMAgent directly in Step 7T.
Telephony Path
Step 6T - Attach a Phone Number
Step 7T - Write Your Entrypoint
agent_id is a string you define (e.g. "my-support-agent"). It must be
identical in both pipes.create() (Step 4) and AgentRunner below - this is
how Unpod routes inbound calls to your runner.agent.py:
Using the flow from Step 5 instead
Using the flow from Step 5 instead
If you ran Step 5, swap
AnthropicAdapter for DialogMachine to drive a
structured node-based conversation:Step 8T - Run and Call
Web / App Path
Step 6W - Create a Session Token
Your backend generates a short-lived session token for each user. The browser uses this token to connect.token.expires_at for the actual expiry time.
Step 7W - Open the Local Browser Demo
No npm package needed for local dev. Open the Supervoice web dashboard:AgentRunner from Step 7T handles both phone
and browser sessions with no changes.
@unpod/web-sdk is not yet published on npm. localhost:3100 is the local
Supervoice UI - start it before opening the browser demo.Step 8W - Run Your Agent
agent_id.
What Unpod Owns vs. What You Own
Next Steps
Structured flows
Nodes, edges, router nodes, and HTTP actions inside your flow graph.
Bring your own agent
Plug in LangChain, an HTTP webhook, or any brain you already have.
Production checklist
Trunks, numbers, recording, deploy - the full production path.