Skip to content

feat: add Plivo integration (SMS, voice, verify, lookup tools)#3608

Open
sarveshpatil-plivo wants to merge 4 commits into
deepset-ai:mainfrom
sarveshpatil-plivo:plivo-integration
Open

feat: add Plivo integration (SMS, voice, verify, lookup tools)#3608
sarveshpatil-plivo wants to merge 4 commits into
deepset-ai:mainfrom
sarveshpatil-plivo:plivo-integration

Conversation

@sarveshpatil-plivo

Copy link
Copy Markdown

Related Issues

Proposed Changes:

Adds a new plivo-haystack integration package so an agent can reach the phone
network through Plivo. It follows the existing
tools-integration pattern (e2b, github), namespace-packaged under
haystack_integrations.tools.plivo.

A shared PlivoClient, five tools, and a PlivoToolset that bundles them:

  • SendSMSTool — send an SMS via the Messages API
  • MakeCallTool — place a call via the Call API using a caller-hosted Answer URL and no audio streaming.
  • SendVerificationTool — start a phone-number verification and send a code
  • ValidateVerificationTool — validate a code, reporting verified only when Plivo confirms it
  • LookupNumberTool — look up carrier and line-type information

Credentials are read through Haystack secrets so they are not serialized in
to_dict. Also included: a per-integration CI workflow, the labeler.yml entry,
the README Inventory line, an agent example, and pydoc config.

How did you test it?

  • 40 unit tests with the Plivo SDK mocked (hatch run test:unit), covering each
    tool's request building, response parsing, error handling, the verify
    success-message gate, and answer_method handling.
  • Verified live against a real Plivo account: SMS delivered, number lookup returned
    real carrier/line-type data, and a voice call was placed
    successfully (request_uuid returned).

Notes for the reviewer

  • Inbound messaging/calls and audio streaming are intentionally out of scope since those
    need a webhook receiver / streaming runtime, not a Haystack tool.
  • The MakeCallTool Answer URL is caller-supplied. The tool does not host call XML.

Checklist

  • I have read the contributors guidelines and the code of conduct
  • I have updated the related issue with new insights and changes
  • I added unit tests and updated the docstrings
  • I've used one of the conventional commit types for my PR title (feat:)

sarveshpatil-plivo and others added 3 commits July 13, 2026 17:02
Adds a Plivo tools integration under integrations/plivo/ — Haystack Tool
objects for Send SMS, Verify (send + validate OTP), Number Lookup, and
Make Call, plus a PlivoToolset. Mirrors the e2b tools integration.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Plivo Lookup response returns country and carrier as nested dicts, so
attribute access returned None for country, carrier, type, and ported. Read
the fields with a dict-aware helper and update the test to the real shape.
Add an answer_method parameter (default POST) so a call can use GET for a
static answer URL such as the Plivo demo XML, instead of always POST.
@sarveshpatil-plivo
sarveshpatil-plivo requested a review from a team as a code owner July 18, 2026 12:53
@sarveshpatil-plivo
sarveshpatil-plivo requested review from davidsbatista and removed request for a team July 18, 2026 12:53
@CLAassistant

CLAassistant commented Jul 18, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added topic:CI type:documentation Improvements or additions to documentation labels Jul 18, 2026
@socket-security

socket-security Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedpypi/​plivo@​4.61.099100100100100

View full report

The Plivo integration ships only mocked unit tests, so the integration
test step selected zero tests and pytest exited 5, failing the matrix.
Remove it to match integrations without integration tests (datadog, github).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic:CI type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants