> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Plivo

> Send SMS messages, place calls, and look up numbers with PlivoTools.

`PlivoTools` gives an agent functions for sending SMS messages, placing calls, looking up carrier information, and reviewing call and message history.

```python plivo_tools.py theme={null}
from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from agno.tools.plivo import PlivoTools

agent = Agent(
    name="Plivo Agent",
    model=OpenAIResponses(id="gpt-5.5"),
    tools=[PlivoTools()],  # all functions are enabled by default
    markdown=True,
)

sender_phone_number = "+1234567890"
receiver_phone_number = "+1234567890"

if __name__ == "__main__":
    # Look up carrier and line-type info for a number
    agent.print_response(f"Look up carrier info for {receiver_phone_number}")

    # Send an SMS
    agent.print_response(
        f"Send an SMS saying 'Your package has arrived' to {receiver_phone_number} from {sender_phone_number}"
    )

    # Place a phone call (answer_url must return Plivo XML)
    agent.print_response(
        f"Call {receiver_phone_number} from {sender_phone_number} using answer_url "
        "https://s3.amazonaws.com/static.plivo.com/answer.xml with answer_method GET"
    )

    # Review recent call history
    agent.print_response("Show my 5 most recent calls with their status and duration")

    # Check recent message history
    agent.print_response("List my 10 most recent messages")
```

## Run the Example

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U agno openai plivo
    ```
  </Step>

  <Step title="Export your credentials">
    <CodeGroup>
      ```bash Mac/Linux theme={null}
      export OPENAI_API_KEY="your_openai_api_key_here"
      export PLIVO_AUTH_ID="your_auth_id_here"
      export PLIVO_AUTH_TOKEN="your_auth_token_here"
      ```

      ```bash Windows theme={null}
      $Env:OPENAI_API_KEY="your_openai_api_key_here"
      $Env:PLIVO_AUTH_ID="your_auth_id_here"
      $Env:PLIVO_AUTH_TOKEN="your_auth_token_here"
      ```
    </CodeGroup>
  </Step>

  <Step title="Set the phone numbers">
    Replace `sender_phone_number` with your Plivo phone number and `receiver_phone_number` with the recipient's E.164 phone number.
  </Step>

  <Step title="Run the example">
    ```bash theme={null}
    python plivo_tools.py
    ```
  </Step>
</Steps>

Full source: [cookbook/91\_tools/plivo\_tools.py](https://github.com/agno-agi/agno/blob/main/cookbook/91_tools/plivo_tools.py)
