Latency Report
Sends STT, LLM, and TTS latency as one field per LatencyReport message; group the messages by turn for the full breakdown.
The LatencyReport message is the richest latency signal the Agent API emits. Together, the reports break down latency across the full STT → LLM → TTS pipeline. Each LatencyReport message carries one field, so a turn’s breakdown arrives as several messages.
Purpose
LatencyReport lets you attribute latency to the right stage — for example, separating LLM time-to-first-token from TTS time, and isolating tool-call and thinking overhead. It’s fully supported and sent automatically; no configuration flag is required to receive it.
Fields
All fields are floats in seconds. Each message carries type plus one latency field, so collect the fields on the client rather than expecting the whole breakdown in one message.
When reports arrive
- LLM and TTS fields arrive once per turn, as separate messages within about 100 ms of each other. A plain turn sends
ttt_token_latency,ttt_text_latency,tts_latency,total_latency. - Tool turns send
ttt_token_latencyandttt_tool_latencybefore theFunctionCallRequest. After yourFunctionCallResponse,ttt_token_latencyarrives again with the same value, followed byttt_text_latency,tts_latency, andtotal_latency. stt_latencyarrives on its own schedule, not with the turn’s other fields. With Flux STT it arrives roughly every 240 ms throughout the session, including silence. With Nova-3 it arrives once per turn.
Example messages
A plain turn on Flux STT sends these four messages, in this order, alongside the periodic stt_latency messages:
A periodic speech-to-text report:
Use cases
Capture LatencyReport the same way as every other frame, and group the fields by turn (a turn’s fields start with its first ttt_token_latency), to chart and troubleshoot latency:
- Attribute end-to-end latency to the STT, LLM, or TTS stage.
- Separate LLM time-to-first-token from TTS time.
- Isolate tool-call and thinking overhead from text generation.
For an end-to-end logging pattern that persists every WebSocket frame, see Session observability.