π Patter is the open-source way to connect any AI agent to real phone calls. Build voice-powered agents with a few lines of code β without managing telephony, speech pipelines, or audio infrastructure.
Visit the Patter docs to get started. SDK: Python / TypeScript
Patter is a dual SDK (Python + TypeScript) that gives developers a unified API for the entire voice AI pipeline β speech-to-text, AI reasoning, text-to-speech, and telephony β wired together with sub-second latency so your agent sounds natural on a real phone call.
import asyncio
from patter import Patter
async def main():
phone = Patter(
openai_key="sk-...",
phone_number="+15550001234",
webhook_url="your.server.com",
)
agent = phone.agent(
system_prompt="You are a friendly booking assistant for a dental clinic.",
voice="nova",
first_message="Hi! I'm calling from Smile Dental. How can I help?",
)
await phone.serve(agent, port=8000)
asyncio.run(main())π Key Features
- π Inbound & Outbound Calls β answer calls or dial out programmatically with Twilio or Telnyx
- β‘ 3 Voice Modes β OpenAI Realtime (lowest latency), Pipeline (custom STT+TTS), ElevenLabs ConvAI
- π§ Tool Calling β let your agent check databases, book appointments, or transfer calls
- π Built-in Dashboard β real-time call monitoring, cost tracking, and analytics
- π§ͺ Test Mode β develop agents in your terminal, no phone needed
- π° Per-Call Metrics β cost breakdown by provider (STT, TTS, LLM, telephony) with latency percentiles
- π‘οΈ Guardrails β content filtering and blocked terms before speech output
- π Local Mode β runs entirely on your machine, no cloud dependency
- π€ Any LLM β pluggable LLM loop, bring your own Anthropic, Gemini, or any provider
π Getting Started
- π₯ Installation β install the SDK and set up your environment
- π Documentation β full guides for Python and TypeScript
- π¬ Discussions β ask questions and share what you've built
- π Issues β report bugs or suggest features