Skip to content

PatterAI/patter-inbound-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Patter

Patter: Inbound Agent

Minimal inbound voice agent — answer phone calls with AI in 4 lines of code.

Part of the Patter Voice AI SDK.

Prerequisites

  • Twilio account with a phone number
  • OpenAI API key with Realtime access

Quick Start

Python

cd python
cp ../.env.example .env   # fill in your keys
pip install -r requirements.txt
python main.py

TypeScript

cd typescript
cp ../.env.example .env   # fill in your keys
npm install
npx tsx main.ts

Environment Variables

Variable Required Description
OPENAI_API_KEY Yes OpenAI API key with Realtime access
TWILIO_ACCOUNT_SID Yes Twilio account SID
TWILIO_AUTH_TOKEN Yes Twilio auth token
TWILIO_PHONE_NUMBER Yes Your Twilio phone number (E.164)
WEBHOOK_URL No Public URL for webhooks (auto-tunneled if omitted)

What This Demonstrates

  • Creating a Patter client with Twilio + OpenAI credentials
  • Defining a voice agent with a system prompt, voice, and first message
  • Starting the embedded server to accept incoming calls
  • OpenAI Realtime mode (all-in-one STT + LLM + TTS)

Next Steps

License

MIT

About

Patter template: Minimal inbound voice agent — answer phone calls with AI in 4 lines of code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors