Case study · Voice AI and customer operations

Answering in under a breath: voice AI agents for a Mexican e-commerce marketplace

A Mexican marketplace took most of its customer calls about one thing: where is my order. Wait times grew every sales season. Voice AI agents could answer those calls, but only if they sounded natural in Mexican Spanish, responded fast enough to feel like a conversation, handed over to people gracefully and respected callers' data rights. The architecture had to make all four true at once.

Case studyE-commerce · MexicoSumanta Mukhopadhyay9 min read
#ai#agents#architecture
CASE STUDY · CASE STUDY · VOICE AI AND CUSTOMER OPERATIONS31 Oct 2026 · 15:50 GST
At a glance
SectorE-commerce · Mexico
My roleFractional CTO and AI architect
EngagementAssessment, architecture and delivery leadership
ScopeVoice agent pipeline, telephony, order tools, latency budgets, human handover, data rights and recordings
What changed
  • Routine order and delivery calls answered without a queue
  • Every call able to reach a person, with context passed across
  • Latency measured per stage, so slow components are found and fixed
  • Speech providers swappable behind the framework, avoiding lock-in
  • Recordings and transcripts handled under clear retention and objection rules
Pipecat (open-source voice agent framework)Streaming speech-to-textLLM with structured tool callsStreaming text-to-speechSIP telephonyOrder and delivery APIsContact centre handoverOpenTelemetry tracing

Anonymised composite. Client names, identifying details and confidential figures are withheld; public facts are cited in the references.

The situation

A marketplace in Mexico sold electronics, home goods and fashion from thousands of sellers, with deliveries handled by several carriers. Its contact centre took calls in Spanish, and most of them were about the same few things: where an order was, when it would arrive, how to change the address, how to start a return. During sales seasons, queues grew long enough that callers hung up and tried again, which made the queues longer.

Why now. On 29 October 2026, Deepgram announced it is acquiring Daily, the company behind Pipecat, a widely used open-source framework for real-time voice agents1. Both companies said Pipecat will stay under its BSD licence and move to an independent foundation whose steering committee includes Deepgram's competitors2. For a team choosing a voice agent stack, that settled the main worry about building on an open framework. On the legal side, Mexico's new personal data protection law took effect in March 202534, and legal commentary notes a right to object to automated processing that significantly affects people without human involvement3. Callers would always need a route to a person.

What had to be true

  • Natural Mexican Spanish, including regional accents, background noise and code-switching with English product names.
  • Conversational speed: replies quick enough that silence never feels like a dropped call.
  • Grounded answers only: order status from the systems, never from the model's imagination.
  • A person on request, with the conversation so far passed across.
  • Clear data rules for recordings and transcripts, and no lock-in to one speech vendor.

Architecture

Caller
PhoneSIP trunkApp call buttonWebRTC
Voice pipeline
Pipecatstreaming orchestrationSpeech-to-textstreaming, Spanish modelsText-to-speechstreaming, Mexican voice
Reasoning
LLM with tool callsstructured, narrow toolsTurn-takinginterruptions, silence
Tools
Order lookupverified caller onlyCarrier trackinglive statusAddress change and returnsrules first
People
Handover to agentssummary and transcript
Assure
Per-stage tracingOpenTelemetryEvaluationsreal call samplesRetention rulesrecordings and transcripts
The framework streams every stage; tools ground every answer; people are one sentence away.

The data flow, end to end

  1. AnswerThe call connects; the agent says it is an automated assistant and offers a person
  2. VerifyThe caller is matched to an order with phone number and a light check
  3. UnderstandStreaming speech recognition feeds the model as the caller speaks
  4. Look upThe model calls order and carrier tools; it never guesses a status
  5. ReplySpeech starts streaming as soon as the first words are ready
  6. Hand overOn request or low confidence, a person takes over with the summary
Streaming at every stage is what makes the pause short enough to feel human.

The hard part: latency you can feel

In text chat, a two-second delay is fine. On a phone call it feels like the line has dropped. The delay a caller hears is the sum of several stages: detecting that they stopped speaking, finishing speech recognition, the model's first tokens, any tool calls, and the first audio from speech synthesis. Each stage looked acceptable alone; together they were too slow.

The team set a latency budget per stage and traced every call end to end, so each turn showed exactly where the time went, in the same way distributed tracing shows which service in a request is slow5. That made the fixes obvious: stream everything instead of waiting for whole sentences; prefetch the caller's recent orders as soon as they are verified, so the first tool call is usually instant; use a smaller, faster model for routine turns; and play a short natural acknowledgement while a slow carrier API responds.

Trace view showing a request's entity map across frontend, cart, product catalogue, currency and feature flag services, with a span timeline below listing each call and its duration
A trace shows where every millisecond of a request goes; the same view, applied to each conversational turn, made latency fixable. Source: OpenTelemetry blog, Jordi Bisbal Ansaldo · CC BY 4.0

Turn-taking was the other half. Callers interrupt, pause mid-sentence and talk over the agent. The framework's interruption handling let the agent stop speaking when the caller started, and tuning silence detection for Spanish speech patterns cut the most awkward moments. See model routing and prompt caching for latency.

Voice agents are judged in hundreds of milliseconds. Budget latency per stage, trace every turn, and stream everything that can be streamed.

How it ran

Customer operations
  1. Top call reasons
  2. Handover rules
  3. Agent coaching
Engineering
  1. Voice pipeline
  2. Latency budget and tracing
  3. Order and carrier tools
Legal and privacy
  1. Disclosure script
  2. Recording retention
  3. Objection and access requests
Operations defined what the agent should handle; engineering made it fast; legal made it fair.
Phase 1Listen
  • Call reason analysis
  • Evaluation set from real calls
  • Provider tests in Spanish
Phase 2Build
  • Pipecat pipeline
  • Order and carrier tools
  • Handover
Phase 3Tune
  • Latency budget
  • Turn-taking
  • Shadow calls
Phase 4Expand
  • Off-peak first
  • Sales-season readiness
  • Returns flow
Off-peak hours first, then sales seasons once the latency budget held.

Key decisions and trade-offs

DecisionAlternativeWhy
Open-source frameworkA closed voice agent platformSwap speech and model providers; no lock-in
Stream every stageSentence-by-sentence processingThe only way to stay inside the latency budget
Narrow tools for order dataGive the model raw order recordsGrounded answers and less personal data exposed
Disclose AI and offer a person upfrontOnly hand over on failureTrust, and respects the right to object
Off-peak rollout firstLaunch for a sales seasonLearn under low risk before peak load

What I'd do again, and differently

Again: build the evaluation set from real call recordings before choosing providers. Speech models that tested well on clean audio struggled with real calls. Differently: trace latency per stage from the first prototype, not after the first complaints. Related: evaluating AI agents, an agent-ready travel marketplace, today's tech news and where I work.

If you are building voice AI for customers in Mexico or elsewhere in Latin America, see my AI architecture work, or analyse your challenge and bring the result to a call.

References
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
FAQ

Common questions

What is Pipecat?

An open-source framework for building real-time voice and multimodal AI agents, made by Daily. In October 2026 Deepgram announced it is acquiring Daily, and both companies say Pipecat stays under its BSD licence with governance moving to an independent foundation.

How fast does a voice agent need to respond?

Fast enough that the pause feels like a person thinking, not a system failing. That means budgeting latency across speech recognition, the model, tools and speech synthesis, and streaming each stage rather than waiting for the previous one to finish.

Does Mexican data protection law affect voice AI?

Yes. Mexico's new personal data protection law took effect in March 2025. Legal commentary notes a right to object to automated processing that significantly affects people without human involvement, so callers should be able to reach a person, and recordings need a clear purpose and retention period.

Keep reading

Related

Open to advisory, fractional CTO & select builds

Let's talk about what you're building.

The fastest route is a free 30-minute call. Prefer to write? Send a message and I'll reply personally within two business days.

Start a conversation

How would you like to reach me?

Book a 30-min callFastest. Pick any open slot on my calendar.→ Write in GmailOpens a pre-filled draft in your browser.→ Use my email appOutlook, Apple Mail or your default client.→

I reply personally within two business days. Time zones from the Americas and Europe to the Middle East and Asia-Pacific.