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

# Build with an AI coding agent

> Paste one prompt into Claude Code, Cursor or Codex and it connects your voice agent to phone calls with Audio Streaming, using the Plivo CLI and the Plivo Audio Streaming skill.

Let your AI coding agent set up Audio Streaming: live call audio sent to your bot over a persistent WebSocket connection. Paste the prompt below into Claude Code, Cursor or Codex. The agent installs the Plivo CLI and its skills, then follows the Audio Streaming skill step by step.

## Start

Paste this into your coding agent:

```text Prompt theme={null}
Install the Plivo CLI: curl -fsSL https://raw.githubusercontent.com/plivo/plivo-cli/main/install.sh | bash. Then run plivo skill install all and follow the plivo-audio-streaming skill to set up my first voice agent.
```

You complete the browser sign-in. The skill asks you before anything that spends money or changes your account.

> [!NOTE]
>
> Already have the CLI? Run `plivo skill install cli` and `plivo skill install audio-streaming`. For Codex, add `--agent codex` to each command so the files go into its skills folder.

## What the agent does

1. **Checks your setup.** It checks the number, voice capability and India know your customer (KYC) compliance where required. For an existing setup, it checks routing, the answer URL, `<Stream>` XML and WebSocket. Missing fallback and hangup URLs are warnings. These checks do not change your Plivo account, but they can request your webhook.
2. **Writes the XML for your case.** Inbound or outbound, recording, a greeting, human handoff, status callbacks, using shapes that are known to work.
3. **Builds or connects a bot.** It checks credit and number readiness, then uses your bot or sets up an echo bot or Pipecat bot. Pipecat can use OpenAI, plus Deepgram and Cartesia if you have them.
4. **Connects a first call.** It makes the bot reachable through Cloudflare Tunnel or ngrok, creates an application named `audio-stream-<bot>-<n>`, links the number and places a test call. It asks you before anything that spends money or changes routing.
5. **Debugs from evidence.** It runs `plivo voice calls diagnose`, reads the hangup cause, checks the XML, then tests the WebSocket, rather than guessing.

## Keep it current

The skills are reference files bundled with the CLI. [Upgrade the CLI](https://plivo.com/docs/cli/install.md#upgrade) first, using `brew upgrade plivo` for Homebrew or `plivo upgrade` for a standalone install. Then preview and refresh installed skills:

```bash theme={null}
plivo skill update --dry-run
plivo skill update
```

`skill update` covers Codex too. To install the skills as a plugin in Claude Code, Gemini CLI, Codex or Antigravity, or into a project for your whole team, see [Use with a coding agent](https://plivo.com/docs/cli/agents.md).

## Related

> [card] [SIP trunking skill](https://plivo.com/docs/voice-agents/sip-trunking/integration-guides/ai-coding-agent.md)
>
> For agents on LiveKit, ElevenLabs, Retell or Vapi

> [card] [Voice XML skill](https://plivo.com/docs/voice/xml/ai-coding-agent.md)
>
> For IVRs, call routing, recording and conferences

> [card] [Audio Streaming overview](https://plivo.com/docs/voice-agents/audio-streaming/overview.md)
>
> How streaming works, without an agent

> [card] [Plivo CLI](https://github.com/plivo/plivo-cli)
>
> The command-line tool the skill drives
