Skip to main content

Warning: this file needs updating

twiml-voice-agents

Why Use twiml-voice-agents

Configuring an agent is fairly simple and easy.

Limitations

The twiml-voice-agents package is limited by the fact that it supports half-duplex communication.

Half-duplex means that both a caller and the agent can speak, but only one at a time. The caller can interrupt the agent (technical name for this is barge-in). However, due to the nature of TwiML apps, there is a time when caller input will be lost. That period begins when Twilio detects an end-of-turn for the caller and awaits a response from your twiml-voice-agents server.

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()

Talking to Agent, Finally

Lastly, call the Twilio phone number you configured.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: twiml_voice_agents-0.1.13.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for twiml_voice_agents-0.1.13.tar.gz
Algorithm Hash digest
SHA256 bc5a08daba733a78ebdcf0831df5b2cbd439428b243981e090444bbffda474c3
MD5 e6b081f974517e469562a4f87dc103ea
BLAKE2b-256 5d82c00e350b4141b7d175f90cae305b17ecbcef28b53fbbd2ec1025d6780679

See more details on using hashes here.

Provenance

The following attestation bundles were made for twiml_voice_agents-0.1.13.tar.gz:

Publisher: publish.yml on Peter-Bergman/twiml-voice-agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for twiml_voice_agents-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 bbda097ec5959dd411a8adb0aa1f12455295f836ddc13a1d097f0ef4a7cec6d0
MD5 042ddc4cf471dfe1fb2e01fc1e6e80c4
BLAKE2b-256 ff71e1f4a82461be0b40eb7e8b7cfd52b4bbab3282b90444f49294bdde73eb8e

See more details on using hashes here.

Provenance

The following attestation bundles were made for twiml_voice_agents-0.1.13-py3-none-any.whl:

Publisher: publish.yml on Peter-Bergman/twiml-voice-agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.22

2 files

0.1.21

2 files

0.1.20

2 files

0.1.19

2 files

0.1.18

2 files

0.1.17

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

This release

0.1.13 This release

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page