Skip to main content

Documentation Index

Fetch the complete documentation index at: https://patter-06b046ce-feat-observability-otel-attrs-0-6-1.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

TypeScript SDK

The Patter TypeScript SDK lets you connect AI voice agents to phone numbers in minutes. Run everything locally with full control over your infrastructure — no external platform required.

Installation

npm install getpatter

Requirements

  • Node.js 18 or higher
  • A telephony account — Twilio or Telnyx (both fully supported)
  • An AI provider key (OpenAI, ElevenLabs, or Deepgram)

Minimal Example

// npx tsx example.ts
import { Patter, Twilio, OpenAIRealtime } from "getpatter";

const phone = new Patter({ carrier: new Twilio(), phoneNumber: "+15550001234" });   // TWILIO_* from env
const agent = phone.agent({ engine: new OpenAIRealtime(), systemPrompt: "You are a friendly receptionist." });
await phone.serve({ agent });                                                       // OPENAI_API_KEY from env
That’s the full file. Every provider class reads its API key from an env var when you omit apiKey, so as long as you have TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, and OPENAI_API_KEY set, the example above is paste-runnable.

How Patter runs

Patter runs entirely in your own process — an embedded Express server and all provider adapters live directly in your application. Bring your own telephony (Twilio or Telnyx) and AI provider credentials; no external platform or hosted backend required.
A hosted Patter Cloud option will return in a future release.

What’s Next

Quickstart

Connect your first agent to a phone call.

Configuration

All constructor parameters and options.

Agents

Configure voice, model, tools, and guardrails.

Engines

OpenAI Realtime, ElevenLabs ConvAI.

LLM

Pipeline mode and custom LLMs.

Tools

Function calling and webhook integrations.