Open SourceMIT Licensed

TypeScript SDK

Give your Node.js AI agent a phone number. Express-based embedded server, full type safety, same API surface as the Python SDK.

JavaScript npm install getpatter
index.ts 4 lines
1import { Patter } from "getpatter";
2
3// Connect to your telephony provider
4const phone = new Patter({ mode: "local", openaiKey: "...", twilioSid: "...", twilioToken: "..." });
5// Connect your agent to phone calls
6const agent = phone.agent({ systemPrompt: "Your prompt", voice: "nova" });
7// Make an outbound call
8await phone.call({ agent, to: "+1...", from: "+1..." });

4 lines to a phone call

  • Connect your telephony provider and start handling phone calls
  • Full TypeScript types for messages, events, and config
  • Express-based embedded server — no Patter backend needed
  • Works with any LLM — OpenAI, Anthropic, or your own
  • Built-in webhook validation for Twilio and Telnyx (Beta)

Everything you need to connect your agent to phone calls

Type-Safe Config

Every option is typed. LocalConfig, AgentConfig, IncomingMessage — autocomplete everywhere.

Three Voice Modes

OpenAI Realtime, ElevenLabs ConvAI, or Pipeline mode with custom STT + TTS providers.

Webhook Security

Built-in Twilio signature verification and Telnyx (Beta) Ed25519 validation. No Patter backend required.

System Tools

Auto-injected transfer_call and end_call tools. Define custom tools with webhook URLs.

Machine Detection

AMD on outbound calls. Auto-play voicemail messages when an answering machine is detected.

Event Lifecycle

onCallStart, onCallEnd, onTranscript — hook into every stage of the call.

Recording

One flag to enable call recording. Recordings managed by your telephony provider.

Output Guardrails

Block terms, run custom validators, or replace responses before they reach TTS.

DTMF & Variables

Keypad input as transcript events. Dynamic {variable} substitution in system prompts.

Start building in minutes

Install the SDK, write a handler, connect a phone number.