← Back to blog
GuideJanuary 22, 202615 min read

How to Give Your AI Agent the Ability to Make Phone Calls

AI agents can now browse the web, write code, and search databases. But most of them still can't pick up the phone. This post explains how to add real phone call capability to an AI agent in a few minutes, using Spix — and how to integrate it with LangChain, CrewAI, and any other framework your agent runs on.

Why agents need to make phone calls

Not everything can be handled via chat or email. Some tasks genuinely require a voice conversation.

  • Sales and lead qualification — A live phone conversation converts 3-5x better than a form fill or chat widget.
  • Appointment scheduling and confirmation — An agent that calls to confirm appointments reduces no-show rates substantially.
  • Delivery and logistics coordination — Real-time confirmation via voice call.
  • Customer support escalation — A follow-up call is the difference between a resolved ticket and a churn event.
  • Verification and identity confirmation — Phone-based verification as a second factor.

The problem with existing tools

Twilio gives you raw telephony primitives. To run an AI phone call on Twilio you need to provision a number, set up TwiML, run a WebSocket server, pipe audio through STT, run your LLM, convert to TTS, handle interruptions, parse transcripts, and store records. That's six separate systems before your agent can say "hello."

Voice-only platforms like Bland.ai, Vapi, and Retell AI handle the AI voice layer well but stop at voice. If your agent needs to send a follow-up email or coordinate across channels, you're back to managing another integration.

What you actually need is an agent-native communications layer: one binary, all channels, structured output, CLI-first. That's what Spix is.

How Spix works

Spix is a CLI binary. Your agent runs a command. The call happens. You get JSON back.

The voice pipeline runs server-side: Deepgram Nova-3 handles speech-to-text, Claude handles the conversation logic, and Cartesia Sonic-3 delivers text-to-speech. End-to-end latency is approximately 500ms.

spix --json playbook create --type call \
  --name "Appointment confirmation" \
  --goal "Confirm the appointment and collect a preferred backup time" \
  --persona "You are Aria, a scheduling assistant at City Dental." \
  --briefing "Confirm the patient's appointment for tomorrow at 10am." \
  --success-criteria "Patient confirmed or rescheduled."

spix --json call create +14155559999 --playbook plb_call_abc123 --sender +14155550201

Structured result

Your agent gets a structured result it can act on — no transcript parsing, no raw audio to handle.

{
  "ok": true,
  "data": {
    "call_id": "call_01jkv8kprz4k",
    "status": "completed",
    "duration_seconds": 47,
    "transcript": [
      {"role": "agent", "text": "Hi, this is Aria from City Dental..."},
      {"role": "human", "text": "Yes, I'll be there."},
      {"role": "agent", "text": "Perfect, we'll see you tomorrow at 10am."}
    ],
    "outcome": "confirmed",
    "ended_reason": "natural_end"
  }
}

Getting started

curl -sf https://spix.sh/install | sh
spix auth login
spix --json billing plan set --plan agent
spix --json phone rent --area-code 415
spix --json phone list

# Make your first call (use the phone number from the list above)
spix --json call create +14155559999 --playbook plb_call_abc123 --sender +14155550201

Python subprocess wrapper

Since Spix is a CLI binary, any language that can run a subprocess can use it.

# Python
import subprocess, json

def make_call(phone: str, playbook: str) -> dict:
    result = subprocess.run(
        ["spix", "--json", "call", "create", phone, "--playbook", playbook],
        capture_output=True, text=True, timeout=120
    )
    data = json.loads(result.stdout)
    return data["data"]

Using with Claude via MCP

If your agent runs on Claude, the fastest integration is the MCP server — no subprocess code required. Install with spix mcp install claude. Your Claude agent gains direct access to 43 Spix tools including spix_call_create, spix_call_get, and every other Spix operation.

Once installed, you can ask Claude directly: "Call +14155559999 using the appointment confirmation playbook." Claude runs spix_call_create automatically, waits for the call to complete, and returns the structured result — no code, no subprocess, no glue.

Pricing

Sandbox is free. Agent plan is $20/mo with 1 phone number and 500 credits included. Operator is $99/mo with up to 10 numbers and 5,000 credits. Fleet is $299/mo with up to 30 numbers and 25,000 credits.

Voice calls consume 10 credits per minute. Unanswered attempts cost 1 credit.