← All posts

Voice agents

Build a voice bot anyone can talk to from a link

Step by step: add speech keys, turn on the voice engine on your machine, give a bot a brief, and send a link that lets anyone talk to it — with transcripts and follow-ups.

Pocket3 min read

This is the hands-on companion to how to put an AI voice agent on real phone calls. By the end you'll have a bot that talks to people through a link you send them on WhatsApp, remembers what they said, and updates your records afterwards. Setup takes about ten minutes, all from the Pocket app.

What you need

  • A Pocket machine (any size; the voice engine is one small container that uses tens of megabytes of memory when idle).
  • At least one speech provider key. One key can do both halves: Cartesia, ElevenLabs and Deepgram each offer speech-to-text and text-to-speech. Add Sarvam if your callers speak Hindi, Hinglish or another Indian language.
  • A model. Your project's model is used; small fast models give the snappiest replies.

Step 1: add your speech keys

Open Account → Voice. Each provider has an Add key button and a link to get a key. Paste it and tap Save; Pocket makes one cheap call to the provider to check the key before storing it, sealed, for your account. You'll see Key works. under it.

Step 2: turn on the voice engine

On the same screen, under Voice engine, tap Turn on voice and pick a machine. Pocket installs the engine there and it connects out to Pocket's relay. No ports are opened on your machine, and the audio never passes through a third-party voice platform: it goes caller → relay → your machine → your providers. When the dot turns green and says Online, you're ready.

Tap Talk now to try it yourself: it opens a voice link in your browser, with the project's agent on the other end.

Step 3: give a bot a job

Voice conversations run as whichever bot created the link, with its brief, memory and tools. In Account → Bots, create one and write its brief the way you'd brief a new hire on the phone:

You are Asha, the admissions counsellor for Meridian Classes.
On calls: be warm and brief. Find out the class, the target exam,
and whether they want to come for a demo class.
If they want details, send the fee sheet on WhatsApp.
After every call, add the enquiry to enquiries and refresh
the Admissions dashboard.
Voice replies are spoken, so the engine also tells the model: short sentences, no lists, no markdown.

Now just ask, in the bot's chat or from a routine: *"Send Riya (+91 98xxx xxxxx) a voice link to talk about the weekend batch she enquired about."* The bot calls send_voice_link with Riya's name and the purpose, gets back a private URL, and sends it with send_whatsapp. The link is valid for seven days and closes when the conversation ends.

When Riya taps it, she sees the bot's name and a Start talking button. The bot already knows who she is and why she's there, because the purpose you gave is part of its instructions for that call.

Step 5: what happens during and after

  • During: the bot can use tools mid-conversation: send a WhatsApp or email, schedule a follow-up, or end the call politely. Riya can interrupt at any time, and it stops talking.
  • Transcript: every line appears in your project as a run ("Voice call · Riya"), with what she said, what the bot said and any tools it used.
  • Follow-up: when the call ends, the bot gets a normal run with the transcript, so it can do the slower work: update the CRM, add a row to the dashboard, or book a callback with create_routine.

Tuning tips

  • Latency: most of the delay is the model. A small, fast model (a "flash" or "mini" tier) answers in about a second; big reasoning models can take several.
  • Providers: Pocket picks from the keys you have: Deepgram first for listening and Cartesia first for speaking, then the others. For Hindi callers it prefers Sarvam for both; the agent matches the caller's language either way.
  • Voice: Pocket picks a default voice for the language from your provider. Choosing a specific voice per bot is coming to the bot screen.
  • Keep turns short: the brief should ask for one or two sentences at a time. People interrupt long answers.

That's a working voice bot. When you need it on real phone calls, connect Twilio under Account → Voice and the same bot places calls without changing its brief; the overview post explains when to use which.

Voice agentsBotsHow-toWhatsApp

Run it on Pocket

Agents on machines you control — yours or ours — reviewed as diffs, approved from your phone. Free to start.

Keep reading