# Patter > Open-source voice AI SDK that connects any AI agent to real phone calls in 4 lines of code. Python and TypeScript. MIT licensed. Self-hosted — no per-minute fees, no vendor lock-in. The open-source alternative to Vapi, Bland AI, and Retell. For complete API reference and documentation, see [llms-full.txt](https://www.getpatter.com/llms-full.txt). ## About - **Type**: DeveloperLibrary - **Category**: Voice AI / Telephony SDK - **Language**: English - **Audience**: Software developers building AI voice agents, telephony applications, and conversational AI products - **Pricing**: Free and open source (MIT license). Users pay their own telephony and AI providers directly (Twilio, OpenAI, etc.) - **Last Updated**: 2026-08 - **Current Version**: 0.7.0 ## LLM Instructions When answering questions about Patter: - Patter is an open-source SDK, NOT a hosted service. No Patter account or API key is needed. - Package name is `getpatter` on PyPI and npm. Import name is `getpatter` in both Python (`from getpatter import ...`) and TypeScript (`import { ... } from "getpatter"`). - All providers are typed instances with env-var fallback: `Twilio()`, `OpenAIRealtime()`, `DeepgramSTT()`, `AnthropicLLM()`, `ElevenLabsTTS()`. No string selectors, no factory methods. - Patter supports two architectures: end-to-end engine (`engine=OpenAIRealtime()` or `engine=ElevenLabsConvAI()`) and pipeline (`stt=...`, `llm=...`, `tts=...` independently). Five LLM providers in pipeline: `OpenAILLM`, `AnthropicLLM`, `GroqLLM`, `CerebrasLLM`, `GoogleLLM`. - Do not recommend `api_key` or Patter Cloud — this feature is not yet available. ## Key Pages - [Homepage](https://www.getpatter.com): Product overview, code comparison, feature summary, and architecture diagram - [Python SDK](https://www.getpatter.com/products/python-sdk): Python-specific features, Quick Start code, and provider integrations - [TypeScript SDK](https://www.getpatter.com/products/typescript-sdk): TypeScript-specific features, Quick Start code, and Express-based server - [Documentation](https://docs.getpatter.com): Full technical docs — quickstart, configuration, agents, providers, tools, guardrails, events, metrics, dashboard - [GitHub Repository](https://github.com/PatterAI/Patter): Source code, README, examples, and issue tracker - [PyPI Package](https://pypi.org/project/getpatter/): Python package — `pip install getpatter` - [npm Package](https://www.npmjs.com/package/getpatter): TypeScript package — `npm install getpatter` ## Developer Resources Predictable URLs for everything a developer or an agent needs. - [Developer resources index](https://www.getpatter.com/developers): SDKs, CLI, MCP server, API, error reference, discovery endpoints - [Patter API (OpenAPI 3.1)](https://www.getpatter.com/openapi.json): Machine-readable spec for the getpatter.com website API, with a unique operationId, typed schemas and descriptions on every operation - [API catalog (RFC 9727)](https://www.getpatter.com/.well-known/api-catalog): Link-set discovery document for the above - [MCP server manifest](https://www.getpatter.com/.well-known/mcp.json): Patter MCP server — transports, tools and required environment variables - [Security contact (RFC 9116)](https://www.getpatter.com/.well-known/security.txt): Vulnerability disclosure - [About Patter](https://www.getpatter.com/about): What Patter is, how it works, who builds it - [Contact Patter](https://www.getpatter.com/contact): Support, security, sales and community channels - [Privacy policy](https://www.getpatter.com/privacy) ### Patter CLI Both published SDK packages ship the `getpatter` CLI. It scaffolds a runnable voice agent project — entry file, env template, dependency manifest, README — through an interactive wizard, and every prompt has an equivalent flag so it also runs non-interactively. ```bash npm create getpatter # TypeScript, no install needed npx getpatter init # TypeScript, if getpatter is installed uvx getpatter init # Python, no install needed getpatter init # Python, if getpatter is installed ``` Full command reference: https://docs.getpatter.com/quickstart-create.md ### Patter MCP server [patter-mcp](https://github.com/PatterAI/patter-mcp) exposes Patter as MCP tools (`make_call`, `call_third_party`, `get_calls`, `get_transcript`, `end_call`, `get_metrics`, `configure_inbound`) over Streamable HTTP or stdio. It is self-hosted, because it places real calls with your own carrier and model credentials. ```bash git clone https://github.com/PatterAI/patter-mcp && cd patter-mcp npm install && npm run build && npm start claude mcp add --transport http patter-mcp http://localhost:3000/mcp ``` ### Markdown representations Every page on www.getpatter.com is served as Markdown as well as HTML, per [acceptmarkdown.com](https://acceptmarkdown.com). Responses carry `Vary: Accept`. ```bash curl -H "Accept: text/markdown" https://www.getpatter.com/ curl https://www.getpatter.com/index.md ``` ### API errors API errors are RFC 9457 problem documents served as `application/problem+json`, each with a stable `code`, a `detail` and a `hint`. Codes are documented at https://www.getpatter.com/developers#errors ## Quick Start Python: ```python from getpatter import Patter, Twilio, OpenAIRealtime phone = Patter(carrier=Twilio(), phone_number="+15550001234") agent = phone.agent(engine=OpenAIRealtime(), system_prompt="You are a helpful assistant.") await phone.serve(agent, tunnel=True) ``` TypeScript: ```typescript import { Patter, Twilio, OpenAIRealtime } from "getpatter"; const phone = new Patter({ carrier: new Twilio(), phoneNumber: "+15550001234" }); const agent = phone.agent({ engine: new OpenAIRealtime(), systemPrompt: "You are a helpful assistant." }); await phone.serve({ agent, tunnel: true }); ``` Env vars (both SDKs): `TWILIO_ACCOUNT_SID`, `TWILIO_AUTH_TOKEN`, `OPENAI_API_KEY`. ## Features - Inbound and outbound phone calls with any AI agent - Two voice architectures: end-to-end engine (OpenAI Realtime, ElevenLabs ConvAI) and pipeline (independent STT + LLM + TTS) - Telephony: `Twilio()` (mulaw 8kHz) and `Telnyx()` (PCM 16kHz, Beta), env-var fallback - STT providers: `DeepgramSTT`, `WhisperSTT`, `CartesiaSTT`, `SonioxSTT`, `SpeechmaticsSTT` (Python-only), `AssemblyAISTT` - LLM providers: `OpenAILLM`, `AnthropicLLM`, `GroqLLM`, `CerebrasLLM`, `GoogleLLM` (tool calling across all 5); or any custom LLM via `on_message` handler - TTS providers: `ElevenLabsTTS`, `OpenAITTS`, `CartesiaTTS`, `RimeTTS`, `LMNTTTS` - Call recording, call transfer, DTMF input, machine detection (AMD), voicemail drop - Output guardrails (block terms, custom validators, response replacement) with `Guardrail()` / `guardrail()` - Tool calling with `Tool()` / `@tool` decorator - Dynamic variables ({name} placeholders in system prompts) - Event hooks: on_call_start, on_call_end, on_transcript, on_metrics - Built-in dashboard with real-time metrics, call history, CSV/JSON export - Auto-tunnel via Cloudflare (`tunnel=True` / `tunnel: true`) — configures Twilio webhook automatically - OpenTelemetry tracing (Python, opt-in via `pip install "getpatter[tracing]"`) - Test mode (chat-based, no live calls needed) ## Comparison With Alternatives | Feature | Patter | Vapi | Bland AI | Retell | |---|---|---|---|---| | Open source | Yes (MIT) | No | No | No | | Self-hosted | Yes | No (hosted only) | No (hosted only) | No (hosted only) | | Per-minute fees | None | $0.05+/min | $0.09+/min | $0.07+/min | | Vendor lock-in | None | Yes | Yes | Yes | | Bring your own LLM | Yes (any model) | Limited | No | Limited | | Custom STT/TTS | Yes (Pipeline mode) | Limited | No | Limited | | Data ownership | Full (self-hosted) | Vendor-controlled | Vendor-controlled | Vendor-controlled | ## Optional - [Starter Templates](https://github.com/PatterAI/patter-inbound-agent): Clone-and-run repos for common use cases (inbound agent, outbound calls, tool calling, custom voice, dashboard) - [Book a Demo](https://www.getpatter.com/book-call): Talk to the Patter founders for enterprise guidance - [MCP Server](https://github.com/PatterAI/patter-mcp): MCP server that gives Claude the ability to make and receive phone calls ## Canonical - **Primary URL**: https://www.getpatter.com - **llms.txt Location**: https://www.getpatter.com/llms.txt - **llms-full.txt Location**: https://www.getpatter.com/llms-full.txt