Skip to main content

Developer SDK for Unpod voice infrastructure — management + connectivity + adapters.

Project description

Unpod Python SDK

Developer SDK for Unpod voice infrastructure — management, connectivity, and adapters for building voice agents that talk over real phone calls, browsers, and WebRTC.

Single architectural commitment: the wire between Unpod infrastructure and your code carries text, not audio. You bring the brain; Unpod brings the voice.

Installation

pip install unpod

# With superdialog integration (recommended)
pip install "unpod[dialog]"

# With LangChain adapter
pip install "unpod[langchain]"

# With MCP adapter
pip install "unpod[mcp]"

Or with uv: uv add unpod (extras: uv add "unpod[dialog]").

To install the latest unreleased code from source:

pip install "unpod @ git+https://github.com/unpod-ai/unpod-python-sdk"

What's Inside

unpod
├── Management SDK (REST)   numbers, voice profiles, speech pipes, calls,
│                           sessions, trunks, recordings, transcripts, api keys
├── Connectivity SDK (WSS)  AgentRunner, Session, CallContext, hooks
└── Adapters                superdialog, LangChain, OpenAI, Anthropic, HTTP, MCP
  • Management SDK — CRUD against the Unpod Control Plane: manage numbers (sync/attach/release), browse voice profiles, bind Speech Pipes, trigger and inspect calls.
  • Connectivity SDK — runtime for live calls: a long-lived AgentRunner receives plain-text turns over WSS and dispatches them to your agent, regardless of transport (phone, browser, WebRTC).
  • Adapters — plug any brain into a call: superdialog dialog machines, LangChain runnables, your own HTTP endpoint, or an MCP server.

Quick Example

from unpod import AsyncClient, AgentRunner, CallContext

client = AsyncClient()  # direct → supervoice; reads UNPOD_API_KEY from env

# Or go through the unpod backend-core proxy (platform JWT + org), same calls:
#   from unpod import JWTAuth
#   client = AsyncClient(base_url="https://app.unpod.ai/api/v2/platform/speech",
#                        auth=JWTAuth(token="<jwt>", org_handle="acme"))

# Management: pick a voice, bind a Speech Pipe to your agent
profiles = await client.voice_profiles.list(language="en")
pipe = await client.pipes.create(
    name="support-line",
    voice_profile=profiles[0].id,
    agent_id="my-voice-agent",
)


# Connectivity: handle every live call with your own logic
async def entrypoint(ctx: CallContext) -> None:
    await ctx.session.say("Hi! How can I help you today?")
    await ctx.session.run()


AgentRunner(entrypoint=entrypoint, agent_id="my-voice-agent").start()

Documentation

Guide What it covers
Overview What Unpod owns vs what you own, the three layers
Architecture Package structure, data flow, protocol details
Management SDK REST client API reference
Connectivity SDK AgentRunner, Session, hooks, controls
Adapters DialogAdapter protocol and bundled adapters
Quickstart 10 steps to your first phone call
Browser Quickstart Test in Chrome, no phone number needed

Full platform documentation: docs.unpod.ai

Development

git clone https://github.com/unpod-ai/unpod-python-sdk
cd unpod-python-sdk
uv sync --extra dev
uv run pytest

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unpod-0.1.6.tar.gz (115.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

unpod-0.1.6-py3-none-any.whl (61.7 kB view details)

Uploaded Python 3

File details

Details for the file unpod-0.1.6.tar.gz.

File metadata

  • Download URL: unpod-0.1.6.tar.gz
  • Upload date:
  • Size: 115.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for unpod-0.1.6.tar.gz
Algorithm Hash digest
SHA256 9a879ce8c60e6300086e957ca31ce4c3fa8c2da247c073ef699ee9b39de4c210
MD5 8fc961affda555a58614b476f018f87d
BLAKE2b-256 d2bbde1f4a8f43f8f80890450fc2a4b2838ceb95f4ce50eac24967dc0b61ac4d

See more details on using hashes here.

File details

Details for the file unpod-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: unpod-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 61.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for unpod-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e2e8b640c299d38300ac5babce3a6055eab2e587ac40a70a36fc0f1967f4cadc
MD5 93342450f2f23f1e716634b80a177ee1
BLAKE2b-256 b288d7478861637c4e5eed4a9281eebc1142e597753357cbb8c8d4672f503753

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page