brief-dress-9950
05/19/2026, 4:03 PMtall-airline-16756
05/19/2026, 4:03 PMtall-airline-16756
05/19/2026, 4:03 PMe2e_latency) which measures the time between the end of the user utterance and the agent’s verbal response onset.
• For deeper diagnosis, break the total into stages: end-of-turn detection, LLM time-to-first-token (TTFT), and TTS time-to-first-byte (TTFB).
How to measure (two options)
• Observability dashboard (quick, visual)
◦ Open Agent Observability to view synchronized audio, transcripts, and traces.
◦ Use the timeline to click the end of the user utterance and the agent audio onset — the UI shows the exact timestamps and computed e2e latency.
• Programmatic / metrics access (precise, automatable)
a. Record per-turn metrics for each ChatMessage and read the e2e_latency field.
b. If you need bottleneck detail, also collect:
• end_of_turn_delay (user finished-speaking detection)
• llm_node_ttft (LLM time-to-first-token)
• tts_node_ttfb (TTS time-to-first-byte)
a. Sum or compare those fields to get the total and per-stage latencies.
Suggested targets to evaluate performance
• Aim for total e2e latency < 800 ms
• Individual goals: STT <200 ms, LLM TTFT <300 ms, TTS TTFB <300 ms
Would you like help locating the e2e_latency field in your data or a short snippet for reading these metrics programmatically?
Sources: Build Your First AI Voice Agent in Python: Complete Tutorial | LiveKit | Understand and Improve Agent Latency | LiveKit | Understand and Improve Agent Latency | LiveKit, with interactive elementsbrief-dress-9950
05/19/2026, 4:10 PMtall-airline-16756
05/19/2026, 4:10 PMbrief-dress-9950
05/19/2026, 4:11 PMtall-airline-16756
05/19/2026, 4:12 PMbrief-dress-9950
05/19/2026, 5:00 PMtall-airline-16756
05/19/2026, 5:01 PMcontext.session.say() at the start of the function to play a phrase like “one moment please.”
• For lower latency or consistent audio, pre-synthesize and cache the filler TTS at startup and play that audio during the call. You can also use BackgroundAudioPlayer to play ambient “thinking” sounds.
Would you like a short code snippet (Python or JS) showing how to add context.session.say() inside a function tool?
Sources: The ReAct Pattern for Voice Agents and How AI Agents Think, Act, and Respon... | Audio customization | LiveKit Documentation | External data and RAG | LiveKit Documentation, with interactive elements