> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/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

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

**1. Install dependencies**

```bash theme={null}
uv pip install -U agno openai plivo
```

**2. Export your credentials**

```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"
```

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

**4. Run the example**

```bash theme={null}
python plivo_tools.py
```

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.