Skip to main content

A FastAPI server that acts as a TwiML voice agent

Project description

twiml-voice-agents

Minimal Usage

Installing

Run python3 -m pip install twiml-voice-agents

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

import twiml_voice_agents as tva
srvr = tva.Server(tva.SquareSchedulingAgent)
srvr.run()

Using Agent, Finally

Lastly, call the Twilio phone number you configured.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

twiml_voice_agents-0.1.6.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

twiml_voice_agents-0.1.6-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file twiml_voice_agents-0.1.6.tar.gz.

File metadata

  • Download URL: twiml_voice_agents-0.1.6.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.34.2

File hashes

Hashes for twiml_voice_agents-0.1.6.tar.gz
Algorithm Hash digest
SHA256 4a022afd48e9d9421d818b4d665d8338809d1b6f171cfaafca003b384b936f6e
MD5 b6e26a77e3ea51f0bb2d3645a0b97322
BLAKE2b-256 7f1b18a2e15dfd4eaf47617d60502e61c9eac65254065903802416ee2afb9b5b

See more details on using hashes here.

File details

Details for the file twiml_voice_agents-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for twiml_voice_agents-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f47e6f5ea823e3d83b3fd92895ad3e455685f8c373e6ff83612588e5d93c255d
MD5 a67f5a152341bb8c14b5cee22599cd0d
BLAKE2b-256 a69f7909516831001fb1eff2b797642c5c90b787805b9e8c854667a1e7b1a4a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page