Give your AI agent
a phone number

The open-source SDK for voice AI. Connect any agent to phone calls with 4 lines of code, loved by developers.

Or use our open source SDKs

Python pip install getpatter
JavaScript npm install getpatter

Voice AI in 4 lines of code

Connect your agent to real phone calls without the telephony headache.

Without Patter 98 lines
 1import asyncio, websockets, json
 2from twilio.rest import Client
 3from twilio.twiml.voice_response import VoiceResponse
 4from fastapi import FastAPI, WebSocket
 5import deepgram, httpx, audioop
 6
 7app = FastAPI()
 8twilio = Client("SID", "TOKEN")
 9
10# Start outbound call with TwiML
11call = twilio.calls.create(
12    to="+1...", from_="+1...",
13    url="https://your-server.com/twiml",
14)
15
16# Serve TwiML to connect media stream
17@app.route("/twiml")
18async def twiml():
19    resp = VoiceResponse()
20    connect = resp.connect()
21    connect.stream(url="wss://your-server.com/ws")
22    return str(resp)
23
24# Handle WebSocket audio stream
25@app.websocket("/ws")
26async def ws_handler(ws: WebSocket):
27    await ws.accept()
28    dg = deepgram.DeepgramClient("DG_KEY")
29    dg_ws = dg.listen.live.v("1")
30    # Transcode mulaw 8kHz → PCM 16kHz
31    # Process STT transcripts
32    # Send text to OpenAI / your LLM
33    # Stream response to ElevenLabs TTS
34    # Resample 24kHz → 8kHz mulaw
35    # Stream audio back over WebSocket
36    # Handle barge-in, call state, errors...
37    # ... 60+ more lines of boilerplate
With Patter SDK 4 lines
1import { Patter } from "getpatter";
2
3// Connect to your telephony provider
4const phone = new Patter({ mode: "local", openaiKey: "...", twilioSid: "...", twilioToken: "..." });
5// Create a voice agent
6const agent = phone.agent({ systemPrompt: "Your prompt", voice: "nova" });
7// Make an outbound call
8await phone.call({ agent, to: "+1...", from: "+1..." });
94 lines saved

What you can build

  • Inbound & Outbound Calls: Handle both directions with one handler in Python or TypeScript.
  • <500ms Latency: Native 16 kHz streaming with sub-500ms time-to-first-byte.
  • Three Voice Modes: OpenAI Realtime all-in-one, Pipeline with any STT/TTS provider, or ElevenLabs ConvAI.

Monitor every call in real time

  • Live Metrics: Track total calls, costs, average duration, and latency in real time from a single view.
  • Call History: Browse every call with full details — direction, caller, duration, mode, and per-call latency.
  • Export & Filtering: Export call data to CSV or JSON with date-range filters for reporting and analysis.
Patter Dashboard
Patter Stack — Agent, Patter, Telephony

Build your Voice Agent on top of Patter

  • You build the agent, we handle the phones: Patter connects your AI to live phone calls — telephony, audio streaming, and carrier routing are taken care of so you can focus on your product.
  • Any LLM, any voice: Bring your own model and pick from three voice modes. Patter is provider-agnostic, so startups and enterprises ship faster without lock-in.
  • Production ready from day one: Call recording, transfer, DTMF, voicemail detection, barge-in, and automatic retries — all built in, zero extra infrastructure.

From code to phone call

Your AI agent connects to real phone calls through the Patter SDK in three steps.

AI Agents
OpenAI
ChatGPT OpenAI
Anthropic
Claude Anthropic
Your AI Agent on_message
Patter SDK
Patter
Patter SDK Connect any AI to any phone
STT TTS WebSocket
Phone Calls
Twilio
Twilio Telephony
Telnyx
Telnyx Beta
Patter
Patter Cloud Coming Soon

Managed or self-hosted

Need to run on your stack? Deploy to your existing infrastructure. Prefer managed? Use Patter Cloud for zero setup.

Open Source

Free

Run on your infrastructure with your own provider keys. Full control, no lock-in.

  • Python & TypeScript SDKs with full feature parity
  • Bring your own Twilio or Telnyx (Beta) carrier
  • Bring your own STT (Deepgram, Whisper) & TTS (ElevenLabs, OpenAI)
  • 3 voice modes: OpenAI Realtime, Pipeline, ElevenLabs ConvAI
  • Call recording, transfer, DTMF & voicemail detection
  • Embedded local server — no backend needed
  • Built-in dashboard with call metrics & export
  • Community support
View on GitHub

Any voice workflow, powered by your agent

Start building with Patter and see what's possible.

Customer Support

AI phone agents that handle support calls 24/7. Route complex issues to humans.

Appointment Reminders

Automated outbound calls to confirm, reschedule, or cancel. Reduce no-shows by 60%+.

Lead Qualification

AI agents that call leads, qualify with natural conversation, sync to your CRM.

Built for production voice AI

<500ms
End-to-end latency with OpenAI Realtime mode
3
Voice modes to choose from based on your needs
2
SDKs — Python and TypeScript, same API surface

Join the Patter community

Get help, share your projects, and get inspired.

Give your agent a voice in the fastest way

Build with Patter SDKs, test locally, deploy with Patter Cloud.