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==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

import twiml_voice_agents as tva
srvr = tva.Server(tva.Conversation)
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.2.tar.gz (7.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.2-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: twiml_voice_agents-0.1.2.tar.gz
  • Upload date:
  • Size: 7.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.2.tar.gz
Algorithm Hash digest
SHA256 365d2c6a08a34f795964d510ed20d5384e8788651bc410a2180836e30115bb3b
MD5 b43bc5a80f5cd794dcfed6161acc83c9
BLAKE2b-256 b40fbf4a06f0f816e866d1b17acf43e99aecfc0d1f947b01eb841ca7be1cc987

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for twiml_voice_agents-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0ff25b4627cb27e0d3c5514136ea93b8185c96158c64cbb8e954f61feeb81b38
MD5 da587a7435bb627f5412ce22e17818e3
BLAKE2b-256 c780c13c2cac0c15732fc5d4ca479215278c5aa47d2bb5363c9fdbf2ea3d3d75

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