By Sagar Shankaran, Founder of CallSphere
An STT-LLM-routing pipeline that detects intent on every utterance and routes to the right specialist agent in under 500 ms. We cover schema, debouncing, and how CallSphere routes 6 verticals worth of intents.
Key takeaways
TL;DR — Run an STT → LLM intent classifier → router pipeline in under 500 ms. Use a 12-intent enum for stability, debounce flips, and let the router publish a NATS subject like
call.intent.bookso the right agent picks it up. CallSphere does this across 6 verticals with 18 distinct intents.
Modern voice agents don't ask "Press 1 for billing." They listen, classify intent in real time, and hand off. The bar in 2026 is < 500 ms end-to-end (STT + LLM + route) — the rhythm of natural conversation. Anything slower and the caller starts repeating themselves.
The architecture has three moving parts: an always-on STT, a small LLM (or fine-tuned classifier) that emits a structured intent, and a router that maps intent → agent.
flowchart LR
Audio[Caller audio] --> STT[Streaming STT<br/>Deepgram / Whisper]
STT -->|partial transcript| Cls[Intent classifier<br/>gpt-4o-mini, structured]
Cls -->|{intent, confidence}| Deb[Debouncer<br/>3-utterance window]
Deb --> Router{Router}
Router -->|book| BookA[Booking agent]
Router -->|cancel| CanA[Cancellation agent]
Router -->|escalate| EscA[Escalation agent]
Router -->|info| FAQ[FAQ agent]
Router -->|unknown| Gen[Generalist agent]
Debouncer prevents flapping when the caller starts a sentence one way and reframes mid-stream.
CallSphere runs 37 specialist agents · 90+ tools · 115+ DB tables · 6 verticals, priced $149 / $499 / $1499 at /pricing. 14-day trial, 22% affiliate. The Healthcare orchestrator at /industries/healthcare detects 18 intents (book-appt, reschedule, refill, billing-question, complaint, hipaa-disclosure, ...) and routes via NATS subjects. Watch live at /demo.
Hear it before you finish reading
Talk to a live CallSphere AI voice agent in your browser — 60 seconds, no signup.
enum so the model can never hallucinate a new intent.call.intent.{intent} and a correlation ID.unknown routes to the generalist agent.const INTENTS = ["book","reschedule","cancel","refill","billing","complaint","escalate","faq","unknown"] as const;
type Intent = typeof INTENTS[number];
async function classify(text: string): Promise<{ intent: Intent; conf: number }> {
const r = await ai.chat.completions.create({
model: "gpt-4o-mini",
response_format: {
type: "json_schema",
json_schema: {
name: "intent",
schema: {
type: "object",
properties: {
intent: { enum: INTENTS },
confidence: { type: "number", minimum: 0, maximum: 1 },
},
required: ["intent", "confidence"],
},
},
},
messages: [
{ role: "system", content: "Classify the caller's intent." },
{ role: "user", content: text },
],
});
return JSON.parse(r.choices[0].message.content!);
}
unknown route — every intent eventually misses; have a fallback.Latency budget? STT 150 ms + LLM 200 ms + route 30 ms = ~380 ms p95.
Can we use a fine-tuned BERT? Yes for 12 fixed intents; cheaper and 50 ms faster, but needs 500+ labeled examples per intent.
How does this interact with topic classification (post #3)? Topic is "what they're talking about"; intent is "what they want done." We run both in parallel.
Multi-intent in one call? Re-classify on every turn; intent changes mid-call are normal.
HIPAA? Use Azure OpenAI for healthcare; intent text never leaves the BAA boundary.
Realtime Intent Detection and Routing for Voice AI With Sub-500 ms Latency in 2026 forces a tension most teams underestimate: agent handoff state. A single LLM call is easy. A booking agent that hands a confirmed slot to a billing agent that hands a follow-up to an escalation agent — that's where context loss, hallucinated IDs, and double-bookings live. Solving it well means treating the conversation as a stateful workflow, not a chat.
Still reading? Stop comparing — try CallSphere live.
CallSphere ships complete AI voice agents per industry — 14 tools for healthcare, 10 agents for real estate, 4 specialists for salons. See how it actually handles a call before you book a demo.
Production AI agents live or die on three loops: evals, retries, and handoff state. CallSphere runs 37 agents across 6 verticals, each with its own eval suite — synthetic call transcripts replayed nightly with assertion checks on extracted entities (date, time, party size, insurance, address). Without that loop, prompt regressions ship silently and you only find out when bookings drop.
Structured tools beat free-form text every time. Our 90+ function tools all enforce JSON schemas validated server-side; if the model hallucinates an integer where a string is required, we retry with a corrective system message before falling back to a deterministic path. For long-running flows, we treat agent handoffs as a state machine — booking → confirmation → SMS — so context survives turn boundaries.
The Realtime API vs. async decision usually comes down to "is the user holding the phone right now?" If yes, Realtime; if no (callback queue, after-hours voicemail), async wins on cost-per-conversation, which we track per agent in 115+ database tables spanning all 6 verticals.
How does this apply to a CallSphere pilot specifically?
Real Estate runs as a 6-container pod (frontend, gateway, ai-worker, voice-server, NATS event bus, Redis) backed by Postgres realestate_voice with row-level security so multi-tenant data never crosses tenants. For a topic like "Realtime Intent Detection and Routing for Voice AI With Sub-500 ms Latency in 2026", that means you're not starting from scratch — you're configuring an agent template that's already been hardened across thousands of conversations.
What does the typical first-week implementation look like? Day one is integration mapping (scheduler, CRM, messaging) and prompt tuning against your top 20 real call transcripts. Day two through five is shadow-mode running, where the agent transcribes and recommends but a human still answers, so you can compare side-by-side. Go-live is the moment your eval pass-rate clears your internal bar.
Where does this break down at scale? The honest answer: it scales until your tool catalog gets stale. The agent is only as good as the integrations it can actually call, so the operational discipline is keeping schemas, webhooks, and fallback paths green. The platform handles the rest — observability, retries, multi-region routing — without your team owning the GPU layer.
Want to see how this maps to your stack? Book a live walkthrough at calendly.com/sagar-callsphere/new-meeting, or try the vertical-specific demo at salon.callsphere.tech. 14-day trial, no credit card, pilot live in 3–5 business days.
Written by
Sagar Shankaran· Founder, CallSphere
Sagar Shankaran is the founder of CallSphere, where he builds production AI voice and chat agents deployed across healthcare, hospitality, real estate, and home services. He writes about agentic AI, LLM engineering, and shipping voice agents that handle real calls in production.
See how AI voice agents work for your industry. Live demo available -- no signup required.
A founder's guide to texto a voz (text-to-speech in Spanish): LATAM vs Castilian voices, free options, and how CallSphere ships Spanish agents.
A founder's guide to the female voice generator landscape: AI female voices, Japanese voices, robot voices, and how CallSphere ships 57+ voices live.
A founder's guide to the Siri voice generator landscape: how AI voice cloning works, what is legal, and how CallSphere uses 57+ voices in production.
A founder's guide to AI voice assistants for ecommerce: customer service, order lookup, and how CallSphere fits in versus virtual receptionists.
Robot text to speech in 2026: how I pick TTS APIs, when robotic voices help, and how CallSphere ships 57+ language voice agents. Hands-on guide.
The customer support specialist role in 2026 is half human, half AI. Here is what the job looks like, the AI tools that pair with it, and how we ship it.
© 2026 CallSphere LLC. All rights reserved.