voice AI agents: Voice and Realtime Agents

Day 82: Voice and Realtime Agents
8 views
This guide focuses on voice AI agents for production systems, with practical trade-offs for reliability, security, and cost. Voice agents look demos-great and ship-poor: turn-taking, barge-in, noise, and “please don’t make me talk to a bot in an open office.” Use voice when hands-free latency wins; otherwise keep text as default.
⚡ TL;DR: Design interruptible sessions. Separate STT partials from agent commits. Confirm irreversible tools by voice and UI. Offer mute / text fallback always.

voice AI agents: production guidance

python
# ✅ Barge-in: cancel TTS and freeze tool commits
class VoiceSession:
    def __init__(self):
        self.speaking = False
        self.pending_tool = None

    def on_user_speech_start(self):
        self.speaking = False
        cancel_tts()
        if self.pending_tool and not self.pending_tool.committed:
            self.pending_tool.cancel()
Concern Practice
Partials Don’t invoke tools on unstable transcripts
Latency Stream TTS; keep replies short
Noise Push-to-talk in offices
Safety Dual confirm for mutate
❌ Firing deploy_prod because STT heard “deploy” in “don’t deploy.”

When not to use voice

  • Deep code review, long diffs, compliance attestations.
  • Shared spaces without headsets.
  • Anything requiring copy-pasteable artifacts (prefer text + links).

Failure modes

Echo cancellation and duplex bugs cause the agent to hear itself and loop. Half-duplex with clear UX beats broken full-duplex. Retaining raw audio longer than the incident window creates DSAR nightmares — default retention hours, not months.

Closing checklist

  • [ ] Interrupt / barge-in tested
  • [ ] Tools gated on final transcript + confidence
  • [ ] Text fallback one tap away
  • [ ] Redact audio retention by default
  • [ ] Explicit non-goals documented for PM

Series navigation

Day 81: Long-Term Memory Without Becoming Creepy · Day 83: Multimodal Coding: Screenshots of Broken UIs Last updated September 11, 2026 Related: Day 76: p99 of Agents: Queueing, Not Just Model Latency; Day 56: Supervisor Patterns on Bedrock Agents; Day 57: Coding Agents That Only Emit Intents.

Watch: 100 Days of AI on YouTube

Short videos from CheatCoders, one AI engineering topic per day.

Open the playlist on YouTube · CheatCoders on YouTube

Deep-dive PDF

Get the expanded guide for this post — extra diagrams-style checklists, failure modes, and a production walkthrough. Free when you subscribe to CheatCoders.

Already subscribed? or open the subscribe page.


Discover more from CheatCoders

Subscribe to get the latest posts sent to your email.

Comments

No comments yet. Why don’t you start the discussion?

Leave a comment

No account needed. Name and email are optional.