How to Migrate From Retell or Vapi to Your Own LiveKit Stack (Without Dropping a Call)
- Migrate in shadow mode, never in a big-bang cutover: instrument the vendor stack first to get a baseline, rebuild to parity, run both on the same recorded calls, then ramp 1% → 5% → 25% → 100% with a numeric rollback trigger at each gate.
- Budget six weeks and keep the vendor account warm for 60 days. Week one is instrumenting the system you're about to replace, the most-skipped and most expensive step to skip.
- The hard part isn't building the pipeline. It's the platform features you forgot you depend on: post-call analysis, campaign calling, knowledge base, denoising, PII redaction, branded caller ID, warm transfer and someone else's SOC 2.
- Week 1Instrument the stack you still have
Pull call records and webhooks from your vendor and compute your five parity metrics. You can't beat a baseline you never measured, and after cutover this data is gone. Risk if skipped: no way to prove the new stack is as good, and the decision becomes a matter of opinion.
- Week 2Build to functional parity
LiveKit room, agent worker, STT, LLM, TTS, turn detection, barge-in. This is the part everyone thinks is the project. Risk if skipped: none. You can't skip it, which is why it gets all the attention it doesn't need.
- Week 3Telephony and number strategy
Trunks, dispatch rules, codec forcing, and the decision between porting numbers and forwarding them. Forward first; port only after the new stack has carried 100% of traffic for a fortnight. Risk if skipped: a porting window you can't roll back out of.
- Week 4Shadow mode and regression runs
Replay recorded calls through the new stack offline and score against the vendor baseline. Live forking is better and much harder; start offline. Risk if skipped: you discover regressions with real customers on the line.
- Weeks 5‑6Staged ramp and decommission
1% → 5% → 25% → 100%, holding each gate for at least 48 hours of real traffic, with a rollback trigger defined before you start. Keep the vendor account funded for 60 days after 100%. Risk if skipped: you have a big-bang cutover with extra steps.
Should you actually migrate off Retell or Vapi?
Only for three reasons: cost at volume, control you can't get from the platform, or a compliance and data-residency posture you have to own. If none of those apply, stay, and I say that as someone who makes money doing these migrations.
It matters that I'm not a vendor sceptic. I integrated Retell into a production AI interview platform in 48 hours, and that integration drove false positives from 50% to 15%, a 70% reduction Retell published as an official customer case study. It was the right decision at the time and got us to market faster than building would have. Later, at volume, I replaced it with a custom LiveKit stack and took per-minute cost from about 10¢ to about 2.5¢ with quality unchanged. Both decisions were correct. They were correct at different times.
The reasons that don't justify migrating: a vendor price increase you haven't modelled against your own engineering cost, a desire to "own the stack" as an end in itself, and an engineer who wants to build it. All three are real and none survives contact with the break-even arithmetic, which says that below roughly 20,000 minutes a month a managed platform is cheaper all-in once you count two engineer-days a month of maintenance. That model is in the voice AI build vs buy break-even, and if it says buy, believe it.
The reader I'm writing for has already crossed that line. Their bill has become visible to finance, they have real customers on real numbers, and their fear isn't technical difficulty; it's a bad week. That fear is correct, and the rest of this post is about making the bad week impossible rather than unlikely.
“Both decisions were right at the time. The platform got us to market and the custom stack got us margin. Anyone telling you those are opposing philosophies is selling one of them.”— Neeraj Sharma, founder of Axionry
What are you actually replacing?
The orchestration layer, which is the easy part, and then about twenty platform features you forgot you were using. The pipeline is two weeks. The parity list is the project.
Read Retell's own pricing page as a requirements document and the scale is obvious. Beyond voice infrastructure, LLM and TTS, they sell call transfer, appointment booking, knowledge base, IVR navigation, batch and campaign calling, branded caller ID, verified phone numbers, post-call analysis, AI quality assurance, advanced denoising, safety guardrails, PII removal, webhooks, simulation testing, call analytics and transcripts. Several are priced as add-ons: knowledge base at +$0.005 a minute, denoising +$0.005, guardrails +$0.005, PII removal +$0.01, AI QA at $0.10 a minute after the first 100 free.
The useful realisation is that you can skip about a third of it. Most teams aren't using campaign calling, IVR navigation or AI quality assurance, and the ones who are usually know. Go through the list with the person who owns the agent's behaviour, not the engineer who will build it, because they'll give different answers and only one is right.
What you can't skip is the operational surface. Your ops team looks at a dashboard every day. Somebody reads transcripts. Something downstream consumes post-call summaries. Those aren't features of the voice pipeline; they're features of the workflow around it, and rebuilding them is real work nobody puts in the estimate.
- Orchestration, STT, LLM, TTS, turn detectionRebuild. Two weeks. The part everyone estimates.
- Telephony, numbers, trunks, dispatch rulesReplace with your own carrier. Forward before you port.
- Call recording and recording storageRebuild. LiveKit lists session recordings at $0.005/min.
- Transcripts and per-turn logsRebuild. You need these for the parity gates anyway.
- Post-call analysis and summariesRebuild — usually a batch LLM job, cheap and easy to underestimate.
- Call analytics dashboardRebuild or replace. Ask ops what they actually open.
- Knowledge base retrievalRebuild if used. Vendor charges +$0.005/min for it.
- Advanced denoisingReplace — LiveKit bundles noise suppression on every plan.
- PII redactionRebuild or buy. Deepgram prices redaction at $0.0020/min.
- Safety guardrailsRebuild. Do not skip this one silently.
- Batch / campaign callingSkippable for most inbound-only teams.
- Branded caller ID and verified numbersReplace at the carrier. Budget before launch, not after.
- IVR navigation, warm transfer to a humanRebuild if used. Warm transfer is more work than it looks.
- Webhooks and simulation testingRebuild. Simulation testing becomes your regression corpus.
- Concurrency managementBecomes your problem — check every vendor cap in the new stack.
- SLA, support contact, SOC 2 / BAACannot be rebuilt. This is a genuine loss — see below.
How do you prove the new stack is as good before cutting over?
Shadow mode plus five numeric parity gates defined before you start. Everyone writes about how to build the new thing. Almost nobody writes about how to prove it's as good as the old thing, which is the actual hard part and the only thing a nervous VP wants to see.
The five metrics that must reach parity: task success rate on your own definition of success, false-interruption rate, voice-to-voice p95 latency, transcription accuracy on your domain vocabulary, and cost per completed call. Four of the five are measurable on your current vendor stack today, which is why week one exists. Define the gate values before you build, because gates set afterwards are set to whatever you achieved.
Shadow mode has an easy version and a hard version; start with the easy one. The easy version is offline: pull a corpus of recorded calls, replay the audio through the new stack, and score the outputs against the vendor's transcripts and outcomes. The hard version forks live audio so both stacks process the same call in real time while only the vendor's audio reaches the caller. Offline gets you 80% of the confidence for 20% of the work, and it's repeatable in CI afterwards.
The metric people forget is cost per completed call, as distinct from cost per minute. A cheaper per-minute stack that takes longer to resolve the same request isn't cheaper. Measure the whole call, including the ones that fail and get retried, and compare against the vendor's per-minute rate times its actual average handle time.
| How to measure | Your vendor baseline | Required to ramp | |
|---|---|---|---|
| Task success rate | Your own success definition, scored on 100 calls | ____ | ≥ baseline − 1pp |
| False-interruption rate | Agent speech starting while caller still speaking | ____ | ≤ baseline |
| Voice-to-voice p95 latency | Five timestamps per turn, measured at the edge | ____ | ≤ baseline + 50ms |
| Domain-term accuracy | 20 terms you care about, across 30 real calls | ____ | ≥ baseline |
| Cost per completed call | Total spend ÷ successfully completed calls | ____ | ≤ 40% of baseline |
| Call setup success rate | Connected calls ÷ attempted calls | ____ | ≥ baseline − 0.5pp |
| Mean call duration | A proxy for caller patience — watch both directions | ____ | within ±10% of baseline |
How do you cut over traffic safely?
1% → 5% → 25% → 100%, holding each gate for at least 48 hours of real traffic, with a numeric rollback trigger agreed before the ramp starts. Qualitative triggers don't work: "if it looks bad" means the person with the strongest opinion decides, at 2am, without data.
Route by a deterministic hash of the caller's number rather than randomly per call. A given caller then gets a consistent experience across the migration instead of flipping between two agents with two different voices between calls, which is confusing in a way that generates support tickets you'll misdiagnose as quality problems.
Rollback must be one change. A feature flag or a single config value that returns 100% of traffic to the vendor, tested before the ramp begins, documented in a runbook that names who is allowed to pull it without asking. If rolling back requires a deploy, you don't have a rollback; you have an intention.
And keep the vendor account funded for 60 days after you hit 100%. It costs almost nothing on a pay-as-you-go plan and is the difference between a rollback and an outage in week nine, when you discover the failure mode that only appears on the third Tuesday of a month.
| Gate | Traffic | Hold for | Roll back if | What you are looking for |
|---|---|---|---|---|
| 1 | 1% | 48 hours | Any dropped or silent call attributable to the new stack | Does it work at all on real traffic and real handsets |
| 2 | 5% | 48 hours | False-interruption rate > baseline + 2pp | Turn-taking behaviour against real callers, not your corpus |
| 3 | 25% | 5 days | Voice-to-voice p95 > baseline + 50ms, or task success < baseline − 1pp | Behaviour under concurrency, and the first weekend |
| 4 | 100% | 60 days with vendor warm | Task success < baseline − 1pp for any 24-hour window | Long-tail failure modes and month-boundary effects |
import hashlib
# The ONLY thing you change to roll back. Set to 0.0 and everything
# returns to the vendor on the next inbound call. No deploy required.
RAMP = 0.05 # 0.01 -> 0.05 -> 0.25 -> 1.0
def route_call(caller_number: str) -> str:
"""Deterministic per-caller routing, so one caller sees one stack."""
digest = hashlib.sha256(caller_number.encode()).digest()
bucket = int.from_bytes(digest[:4], "big") / 0xFFFFFFFF # 0.0 .. 1.0
return "livekit" if bucket < RAMP else "vendor"
# Emit the routing decision on every call. Without it you cannot attribute
# a complaint to a stack, and every incident becomes a guess.
def on_inbound(caller_number: str):
stack = route_call(caller_number)
log({"evt": "route", "caller_hash": caller_number[-4:], "stack": stack,
"ramp": RAMP})
return stack
# What this does NOT handle: callers who switch numbers, outbound campaigns
# (hash the destination instead), or per-customer pinning for named accounts.What will go wrong?
Turn-taking will feel different before your metrics say anything is wrong. Customers will treat the voice change as a product change. Vendor concurrency limits you never hit will become limits you have to provision. And your transcripts will differ, quietly breaking everything downstream of them.
Turn-taking is the one that catches people. Every platform makes different endpointing choices, and callers notice a change in conversational rhythm long before a false-interruption metric moves enough to be significant. Expect a week of tuning after each gate, and expect the qualitative feedback before the quantitative signal. The mechanics of what to tune are in turn detection and barge-in for voice agents.
The voice change is a product decision engineers make by accident. If your callers have heard the same voice for a year, changing it is customer-visible and belongs in a release note, not a config diff. Pick the new voice with whoever owns the brand, and pick it before the ramp rather than during it.
The transcript drift is the subtle one. Different STT models format numbers, punctuation and proper nouns differently, and anything downstream that parses transcripts, analytics, CRM enrichment, QA scoring, keyword alerts, was tuned against the old format. Diff a hundred transcripts across both stacks before you ramp, and check what consumes them.
What do you actually lose?
A dashboard your ops team likes, a support contact who answers, somebody else's compliance posture, and somebody else's pager. These are real losses, not all recoverable, and a migration guide that omits them is marketing.
The dashboard generates the most internal friction and the least engineering respect. Your ops team has muscle memory for a UI they use daily, and replacing it with Grafana and a transcript viewer is a downgrade in their experience even when it's an upgrade in capability. Budget time for it, involve them before the ramp, and accept that the first version will be worse.
The compliance posture can block the whole project. On a vendor, one SOC 2 report and one BAA cover the pipeline. On your own stack, every provider in the chain needs its own agreement: Deepgram signs BAAs for enterprise customers handling ePHI, Rime offers a BAA on Enterprise, LiveKit lists HIPAA compliance on its Scale plan. That's a procurement project running in parallel with the engineering, and procurement doesn't compress to fit a sprint.
The pager is the honest one. On a vendor, a 3am failure is someone else's night. On your own stack it's yours, and voice failures happen while a customer is on the line. Mitigate with real alerting, provider fallbacks and a runbook, but don't pretend the burden moved anywhere other than onto your team.
- Voice infrastructure
- $0.055 / min
- LLM
- $0.040 / min
- TTS
- $0.015 / min
- Total per minute
- $0.110
- At 100,000 min/month
- $11,000 / month
- Annualised
- $132,000 / year
- STT (xAI streaming, $0.20/hr)
- $0.0033 / min
- TTS (xAI, $15/1M chars @600 c/min)
- $0.0090 / min
- LLM (small model)
- ≈$0.0004 / min
- Telephony + LiveKit SIP fee
- $0.0072 / min
- Measured all-in, incl. own compute
- ≈$0.025
- At 100,000 min/month
- $2,500 / month
What would I do differently?
Instrument first, and take the eval harness seriously the first time rather than the second. Every mistake I made in this migration traces back to measuring late, and every week I lost went to arguing about whether something had regressed instead of looking it up.
The second is to decide the voice earlier. It's a small decision that turns into a large one the moment a customer notices, and much cheaper to make deliberately in week two than to relitigate at gate 3 with traffic already flowing.
The third is to run the procurement track in parallel from day one. If any of your customers care about a BAA or data residency, start collecting agreements from every provider in the chain in week one. The engineering finishes in six weeks. The paperwork doesn't, and it's the paperwork that decides whether you can ramp past 25%.
If you want the underlying architecture rather than the migration mechanics, that's the full LiveKit voice AI build guide. If you want the telephony half specifically, it's in LiveKit SIP trunking with Twilio vs Telnyx. Before any of it, price your current volume on a custom stack in the voice AI cost calculator: if the saving doesn't cover two engineer-days a month, stop here and stay where you are. And if it does, and you'd rather have this run by someone who's already done it on a platform with real customers on it, that's exactly what voice AI development is.
Migrating off Retell or Vapi: common questions
→How do you migrate from Retell AI to LiveKit?
In six weeks and in shadow mode. Week one instruments your existing Retell stack to establish a baseline on five parity metrics. Week two rebuilds the pipeline on LiveKit. Week three handles telephony, forwarding numbers rather than porting them. Week four replays recorded calls through the new stack and scores against the baseline. Weeks five and six ramp traffic 1% → 5% → 25% → 100% with a numeric rollback trigger at each gate.
→How long does it take to migrate off a voice AI vendor?
Six engineer-weeks for a production system with real customers, of which only about two are the voice pipeline itself. The rest is instrumentation, telephony, the parity harness and the staged ramp. The most commonly compressed weeks are the first and the fourth, both measurement weeks, and compressing them doesn't make the migration faster, only unfalsifiable.
→Can you migrate a voice agent without downtime?
Yes, by ramping traffic in stages rather than cutting over. Route calls by a deterministic hash of the caller's number so a given caller stays on one stack throughout, move 1% then 5% then 25% then 100%, hold each gate for at least 48 hours of real traffic, and keep rollback to a single configuration value that requires no deploy. Forward numbers to the new stack before porting them, and port only after two weeks at 100%.
→What do you lose when you leave Retell or Vapi?
A dashboard your operations team uses daily, a support contact with an SLA, a single SOC 2 report and BAA covering the whole pipeline, and somebody else's on-call rotation. The dashboard and analytics are rebuildable. The compliance chain becomes a procurement project across every provider in your stack. The pager moves to your team, and voice failures happen while a customer is on the line.
→Is it worth migrating off Vapi or Retell at low volume?
No. Below roughly 20,000 minutes a month the per-minute saving doesn't cover the fixed infrastructure plus about two engineer-days a month of maintenance, so the migration never pays back. Retell's published default configuration is $0.11 a minute against about 2.5¢ on a custom stack, a real difference, but at 20,000 minutes that's $1,700 a month against roughly $1,750 a month of infrastructure and labour.
→How do you test a new voice agent before sending it real calls?
Build a regression corpus from real recorded calls and replay it through the new stack offline, scoring against the baseline your vendor produced on the same audio. Score five metrics separately: task success rate, false-interruption rate, voice-to-voice p95 latency, accuracy on your domain vocabulary, and cost per completed call. Agree the required parity for each before you build, because gates set afterwards are set to whatever you happened to achieve.