Skip to main content

hermes-plivo-tools

Plivo tools for Hermes Agent. The agent sends text messages, places phone calls and looks up numbers through Plivo.

Tool Detail
send_sms Sends a text message to a phone number
make_call Places a call answered by Plivo call-control XML, for notifications and alerts
lookup_number Returns carrier, country, line type and formatting details

The plugin registers tools only. It hosts no server and registers no messaging platform, and runs anywhere a Hermes agent runs. Standard library only, with no third-party dependencies.

Requirements

Hermes Agent Python 3.11 or later
Plivo An account, an SMS-capable number for send_sms, a voice-capable number for make_call

Installation

1. Install

pip install hermes-plivo-tools

Installing hermes-plivo-phone-gateway brings the plugin in as a dependency.

2. Enable

hermes plugins enable plivo-tools
hermes tools list

Hermes is opt-in and loads no plugin until enabled. Each tool is its own toolset, listed as plivo_send_sms, plivo_make_call and plivo_lookup_number, and each one can be enabled or disabled separately.

3. Add credentials

In ~/.hermes/.env:

PLIVO_AUTH_ID=MAxxxxxxxxxxxxxxxxxx
PLIVO_AUTH_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PLIVO_PHONE_NUMBER=+14155550100

The tools register whether or not credentials are present and refuse to dispatch without them, leaving the plugin safe to install before the account is configured.

Configuration

Variable Required Purpose
PLIVO_AUTH_ID yes Plivo account auth ID
PLIVO_AUTH_TOKEN yes Plivo account auth token
PLIVO_PHONE_NUMBER yes Default sender and caller ID, E.164
PLIVO_ANSWER_URL no Default document returning call-control XML for make_call. Plivo's demo document answers when absent

Credentials are read through the Hermes profile-scoped secret store, with an environment fallback, matching the bundled plugins.

What an outbound call says

make_call needs a Plivo answer URL, a fetchable document returning call-control XML. The Plivo API accepts no inline text and rejects a data: URI.

With none configured, calls reach Plivo's demo document, which speaks a single fixed sentence. The tool result carries a warning whenever the demo document answers.

To control what is said Result
Install hermes-plivo-phone-gateway The agent answers the call and holds a real-time conversation
Pass answer_url and answer_method Whatever the document returns, for example <Response><Speak>Deploy finished</Speak></Response>
Set PLIVO_ANSWER_URL in ~/.hermes/.env The same, applied to every call

Security

  • Credentials are read from the Hermes secret store or the environment, never from a file the plugin ships
  • Phone numbers in tool results are masked to their last four digits
  • Failures return structured JSON rather than raising, and a failed send leaves the agent turn intact

Troubleshooting

Symptom Cause
Agent has no send_sms, make_call or lookup_number The plugin is not enabled as plivo-tools
Only some of the three appear Each tool is its own toolset and can be disabled separately
A call speaks one fixed sentence No answer URL is configured, and Plivo's demo document answered
A tool reports missing credentials PLIVO_AUTH_ID or PLIVO_AUTH_TOKEN is unset in ~/.hermes/.env

Tests

python -m unittest discover -s tests
ruff check .

The suite covers number normalisation, credential handling, schema shapes and the handler contract with the REST layer stubbed. It needs no Hermes install and touches no network.

Limitations

  • make_call on its own plays a fixed document. A spoken conversation needs hermes-plivo-phone-gateway
  • Inbound SMS is a separate plugin, hermes-plivo-sms

License

MIT

Download files

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

Source Distribution

hermes_plivo_tools-0.1.1.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

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

hermes_plivo_tools-0.1.1-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file hermes_plivo_tools-0.1.1.tar.gz.

File metadata

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

File hashes

Hashes for hermes_plivo_tools-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0a5a2a810e6516c68d9812fdd119ce09d68878c678e94a54056b1469c373dd4b
MD5 9f631de993bf6d532790aa37de13d68b
BLAKE2b-256 d9d86440c964cb59bbed171e2ef4f08a31370f6a6aed635ef475ddfd887d2370

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermes_plivo_tools-0.1.1.tar.gz:

Publisher: publish.yml on plivo-dev/hermes-plivo-tools

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

File details

Details for the file hermes_plivo_tools-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for hermes_plivo_tools-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa58fa70f05a9d32f26099992c4b414cf93582a43495fe47ae85c28d889fb415
MD5 0527feb56173c0aa54d38318fb9e9398
BLAKE2b-256 800fee88c2b0dd68c7e2d7ace1d7b152fcbce9f749f2fe3bad6f57c31b5c0485

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermes_plivo_tools-0.1.1-py3-none-any.whl:

Publisher: publish.yml on plivo-dev/hermes-plivo-tools

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.3

2 files

0.1.2

2 files

This release

0.1.1 This release

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