Header Logo

ElevenLabs Agent Cold Start vs Warm Start: What Actually Changes in Production

ElevenLabs Agent Cold Start vs Warm Start: What Actually Changes in Production

Cold vs warm start in realtime voice agents: reduce WebRTC, avatar, and first-token latency in production

Introduction


Cold start vs warm start sounds like an infrastructure footnote until you ship a realtime voice agent with a video face and discover that the first few seconds determine whether users stay engaged. In production, “cold” usually means some combination of model initialization, WebRTC negotiation, avatar session bootstrapping, media pipeline setup, and the first audio/video frames not being ready yet. “Warm” means some or all of that state already exists, so you can connect faster and start talking with less latency variance.


This post breaks down what actually changes between those two cases in a realtime agent stack. By the end, you should be able to reason about startup latency, identify the expensive phases, and choose a deployment pattern that matches your traffic profile rather than guessing based on demos.


What cold start and warm start mean in practice


For a voice agent, startup is not one thing. It is a sequence:


  1. Provision or reuse the agent runtime.

  2. Establish the transport session, often WebRTC or a similar low-latency media channel.

  3. Initialize speech, LLM, and avatar rendering components.

  4. Synchronize audio output with video/lip motion.

  5. Send the first audible/visible response.


A cold start tends to hit all of these costs at once. A warm start typically amortizes one or more of them across sessions.


The important nuance is that “warm” does not just mean “the container is already running.” In realtime systems, a process can be warm but still have a cold media path, or a warm media path but a fresh model context. The user experience depends on the slowest path to first useful output.


The latency buckets that matter


When developers talk about startup latency, they often collapse distinct phases into a single number. That hides the thing you need to optimize.


1. Runtime initialization
This is process startup, dependency loading, model client construction, and any per-session object graph setup. In Python, this may include loading SDKs, opening sockets, or initializing GPU-backed components elsewhere in the stack.


2. Session negotiation
For voice agents, the transport handshake matters. WebRTC, for example, needs signaling, ICE gathering, NAT traversal, and media track setup before the first real-time packets flow. If your avatar is attached to the agent, the avatar session may need to be created and bound to the same conversation state.


3. First token / first audio
The LLM or agent orchestrator needs to produce the first response. If the agent waits for a full turn of speech recognition, routing, tool planning, and text generation before it begins speaking, users perceive that delay directly.


4. Avatar rendering and sync
A talking face is not just a video stream. The audio timing has to be aligned with lip motion and frame delivery. If rendering starts late or the stream stutters, the system can feel slower than the underlying agent actually is.


In production, these buckets often move independently. For example, a process can be warm, but the first request after autoscaling may still pay the cost of avatar session creation and media negotiation. Or an existing session may be reused, but a new model context makes first-token latency jump.


What changes in production when you keep things warm


Warm start strategies usually target one or more of the following:


  • Pre-initialized workers: keep agent processes alive so imports, clients, and internal state are ready.

  • Connection reuse: avoid rebuilding control-plane connections when you can reuse a session or cached token.

  • Session pooling: keep avatar or media resources available for immediate attachment.

  • Prompt and instruction caching: preload static instructions or persona state instead of rebuilding them on every request.


The trade-off is straightforward: warm systems cost more to keep alive, but they reduce tail latency and make first interaction time more predictable. For interactive avatars, predictability matters almost as much as raw average latency. A 1.5-second median startup with a rare 7-second tail is usually worse UX than a consistent 2-second start.


Another practical difference: cold start failures are often “setup” failures. You see them as handshake errors, timeouts, or missing configuration. Warm start failures are more likely to be stateful bugs: stale session references, expired tokens, or leaked media tracks that interfere with new turns.


How to measure the right thing


If you only measure “request duration,” you will miss where users are actually waiting. Instrument each phase separately. At minimum, track:


  • time to agent process ready

  • time to media/session connected

  • time to first audio packet

  • time to first video frame

  • time to first meaningful utterance


For a live voice agent, “first meaningful utterance” is usually the metric that matters most. If the system emits a brief placeholder or a noncommittal filler, that may technically reduce time to first audio but not improve the actual user experience. Measure what the user perceives, not just what is easy to log.


It also helps to split metrics by traffic class. A demo route, a support flow, and a long-lived conversational agent can have very different warm-start behavior. Latency percentiles by session type are usually more useful than a global average.


Practical implementation patterns


If you are integrating a voice agent with a video face, the first decision is usually whether the avatar is created per session or attached to an already-running agent runtime. The second decision is whether your system should favor fast startup or lower steady-state cost.


A common pattern is to keep the agent warm and create the avatar/session as late as possible, just before the user connects. That keeps most of the expensive model and transport setup off the critical path while still preserving per-session isolation.


from livekit import agents

agent.add_plugin(avatar)
from livekit import agents

agent.add_plugin(avatar)
from livekit import agents

agent.add_plugin(avatar)


If you are working at the REST layer, the same idea applies: create what can be reused, and only instantiate per-session resources when the user is actually about to engage. Here is a simple cURL example against the control plane:


curl -X POST https://api.protoface.com/...
}'
curl -X POST https://api.protoface.com/...
}'
curl -X POST https://api.protoface.com/...
}'


The exact request shape depends on the endpoint, but the production principle is stable: keep the path between “user clicked start” and “media is flowing” as short as possible, and avoid doing work that does not need to be on that path.


Where Protoface fits


Protoface is useful here because it separates the avatar/session lifecycle from the rest of your application in a way that maps cleanly onto the cold-start problem. If you are using a LiveKit agent, the quickstart and the LiveKit plugin let you attach a synchronized talking face without building the media plumbing yourself. That means you can focus on whether to keep the agent runtime warm, when to create sessions, and how to measure startup phases, instead of stitching together the avatar path from scratch.


For API-driven setups, the REST surface and Python SDK are the right tools when you want explicit control over session creation and orchestration. The docs at docs.protoface.com are the place to confirm exact fields, auth, and lifecycle behavior before you wire this into production.


Common gotchas


1. Confusing warm process with warm session
A running worker does not guarantee an already-initialized media session. If users still wait on the first connection, inspect the transport and avatar binding step.


2. Optimizing average latency only
Warm pools often improve the median but also mask occasional stale-state failures. Watch the p95/p99 path, especially after deploys, autoscaling events, or traffic spikes.


3. Ignoring audio/video sync separately
A system can start “fast” but feel broken if the avatar renders before audio is stable, or if lip motion lags the first utterance. Measure both tracks.


4. Over-caching user-specific state
Warm start should cache infrastructure and static instructions, not accidentally reuse one customer’s conversation context for another. Reuse the runtime, not the conversation.


5. Testing only localhost
WebRTC and realtime media behave differently once you add real NATs, mobile networks, and browser policies. Warm-start behavior on your laptop is not representative of production.


Conclusion


Cold start vs warm start in a realtime avatar system is mostly about where the startup cost lives: process, transport, model, or media sync. The production impact is not just faster or slower startup; it is whether the first interaction feels immediate and stable. If you keep the right parts warm, instrument the right phases, and avoid conflating “worker is up” with “user can talk now,” you will make better trade-offs.


If you are building this kind of flow, start by measuring your own startup buckets, then wire the avatar path so it can be attached late and reused safely where appropriate. The docs at docs.protoface.com and the relevant quickstarts are the best place to verify the exact API shape for your integration before you ship it.

Add a face to your AI.

No credit card needed.

Add a face to your AI.

No credit card needed.

Add a face to your AI.

No credit card needed.