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.3.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.3-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: twiml_voice_agents-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 552465b1f97d951b983229b0652edde3329da3901ecd86c9390a28953a66b305
MD5 40c8d948cc5dff7ecfa52d79739994f7
BLAKE2b-256 17c4e71bceecb99162b0688737943814ad35fb7f15b0001571fde5b6f93ac86e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for twiml_voice_agents-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 799583e505e799a71e78f44d215793dcfa319e9bfe20683d68c32f27d8ccc933
MD5 ecd21688dcfcd160326d7b77cd9e5395
BLAKE2b-256 51b53b727a28bc088a67895a7c4b4277b2ce0409a67afba892485c34478bfca9

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