← Return to field notes
ai / production field doctrine

Latency is an ownership problem

Voice-agent latency is a chain of accountable decisions—not a flattering average on a dashboard.

case-study maintained created 2026-07-16 updated 2026-07-18 6 min 4 sections 3 figures
subscribe via RSS report a correction sec intro ~6 min left read 0%
opening contract case-study · maintained
problem
Voice-agent latency crosses asynchronous stages, so aggregate timing hides who owns delay, pressure, cancellation, and failed recovery.
scope
A public operating model for stage budgets, queue pressure, interruption, degraded modes, and per-turn traces without customer-specific details.
environment
LiveKit-style real-time voice runtimes with streamed STT, LLM, tools, TTS, and transport boundaries.

Assumptions

  • Every stage can emit correlated telemetry under one turn identity.
  • Cancellation and degraded-mode state can cross provider boundaries.

Limitations

  • Customer topology, credentials, recordings, and production metrics are intentionally withheld.
  • This is an ownership model, not a provider benchmark or a universal latency target.
Table of contents 4 sections
  1. 1 Define the path the user experiences
  2. 1.1 Give every stage an owner and pressure policy
  3. 2 Correlate the operational view per turn
  4. 3 Publish the method without inventing proof

Define the path the user experiences

A latency number without ownership is theater. The measured path follows what the user actually experiences: audio ingress, VAD endpointing, STT, prompt and memory assembly, LLM first token, tool interception, TTS first audio, transport readiness, and playout.

  1. Audio ingress and endpointing
  2. Context, model, and tool execution
  3. Speech synthesis, transport, and playout
  4. Interruption, cancellation, and recovery
One turn, one accountable signal path Every handoff carries ownership, pressure, and cancellation state through the same turn identity.
  1. ingress audio frames, VAD evidence, endpoint decision
  2. understand STT, prompt assembly, memory, model first token
  3. act tool boundary with timeout, fence, and outcome state
  4. speak TTS first audio, transport readiness, playout
  5. recover cancellation, fallback, degraded mode, final trace

Give every stage an owner and pressure policy

Every stage needs a stable owner, a bounded queue or explicit pressure policy, and a telemetry name that survives internal refactors. Otherwise the dashboard can look fast while endpointing drifts, providers stall, queues age, or the agent keeps speaking after the user interrupts.

stage-contract.ts typescript
type StageContract = {  owner: string;  timeoutMs: number;  onTimeout: 'cancel' | 'degrade' | 'fallback';  traceName: string;};

Correlate the operational view per turn

The operational view stays per-turn and correlated: stage percentiles, queue pressure, provider fallback, interruption detection, audio cutoff, and the degraded path when voice output is unhealthy. Averages are where bad conversations go to hide.

Minimum proof surface per turn
boundaryevidencefailure question
endpointingp50 / p95 / p99 + decision reasonDid silence or noise end the turn?
modelfirst token + cancellation stateDid stale work survive interruption?
speechfirst audio + playout startDid generated audio reach the user?
recoveryfallback + degraded-mode traceDid the system fail visibly and safely?

Publish the method without inventing proof

This public note deliberately omits customer context, credentials, private topology, and unsupported production metrics. The method is the proof: assign the budget, instrument every boundary, preserve cancellation, and make recovery a first-class path.

experiment trace 1 decision
01

Replace aggregate latency with owned stage traces

observation
A single end-to-end number can improve while endpointing, queue age, or interruption behavior gets worse.
hypothesis
Stable stage ownership and one correlated turn identity will make hidden pressure and recovery failures attributable.
change
Name each boundary, emit stage spans and queue state, and carry cancellation and fallback decisions through the same turn trace.
measurement
The public verification target is coverage: every stage, pressure transition, interruption, fallback, and degraded path must appear in one trace. No private latency numbers are claimed here.
mechanism
Correlation preserves causality across asynchronous providers, while explicit queue and cancellation state prevents a healthy average from hiding a broken conversation.
decision
Keep the owned-stage model; reject uncorrelated averages as the primary operational view.
evidence ledger 2 claims
  1. field-observed
    Production failure vocabulary

    Endpoint drift, provider stalls, queue age, interruption cutoff, fallback, and degraded voice output are treated as distinct operational states.

  2. implemented
    Per-turn trace contract

    Stage owners, queue pressure, cancellation, fallback, and recovery share one correlated telemetry path.

linked artifacts 1 attached
  • reference
    LiveKit Agents documentation

    Public platform reference for the real-time agent runtime discussed by this field doctrine.

    open ↗