Metadata-Version: 2.4
Name: twiml-voice-agents
Version: 0.1.4
Summary: A FastAPI server that acts as a TwiML voice agent
Author-email: Peter Bergman <peterbergman8253@gmail.com>
Requires-Python: >=3.14
Description-Content-Type: text/markdown
Requires-Dist: claudette
Requires-Dist: fastapi[standard]
Requires-Dist: squareup
Requires-Dist: twilio
Requires-Dist: pyngrok

# twiml-voice-agents

# Minimal Usage

## Installing

Run `python3 -m pip install twiml-voice-agents==0.1.1`

## Setup

### Anthropic

Get an Anthropic API key.

Set the `ANTHROPIC_API_KEY` environment variable to your API key.

### Square

Get a Square OAuth Token with the following permissions:
...

Set the `SQUARE_ACCESS_TOKEN` environment variable to your OAuth token

### Ngrok

Get an ngrok token

Set the `NGROK_AUTHTOKEN` environment variable to your auth token

### Twilio Telephony

Set up a Twilio phone number to handle incoming calls with a TwiML webhook of your choice.
Set the webhook URL to the ngrok domain along with path `/call`.
Set the HTTP method to POST.

## Running Server

```python
import twiml_voice_agents as tva
srvr = tva.Server(tva.Conversation)
srvr.run()
```

## Using Agent, Finally

Lastly, call the Twilio phone number you configured.

