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.4.tar.gz (8.0 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.4-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for twiml_voice_agents-0.1.4.tar.gz
Algorithm Hash digest
SHA256 be59f42eae04c6ec1b0a47d0edb4216202eeae1aa4cd43ecb7513f9f1e4d529a
MD5 603002c648e86fd9e07656420bb877ba
BLAKE2b-256 dbb1c27d90ef6a0d963b558a84ce254144b656b5795aec2ca5ce2a6fa7eb623d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for twiml_voice_agents-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3e6ff2bf3f29dfd3c5f1500eb41fbd931d45f6564327a3e5f5cf3f84d850946c
MD5 a907132e054f8a74e78665bc4b37e59d
BLAKE2b-256 cdb88c688966c408acf9d1093af4ecb0d99872543de9eb48e8d32d37edfc397a

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