What can I measure from my realtime agent via prom...
# ask-ai
i
What can I measure from my realtime agent via prometheus?
t
Thanks for reaching out, Matthew. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — you're asking what Prometheus metrics you can collect from your realtime agent. Below is a concise summary and next steps. What you can measure • Infrastructure/autoscaling metrics ◦ livekit_egress_available — indicates whether an Egress instance can accept new requests (used for autoscaling). ◦ livekit_ingress_available — indicates whether an Ingress instance can accept new requests (used for autoscaling). • Service-level metrics ◦ Each service (Egress, Ingress, LiveKit Server) can expose a Prometheus
/metrics
endpoint when you set
prometheus_port
in the service config. This exposes standard runtime and service metrics (CPU, memory, request counts, etc.) for that instance. • Agent/framework metrics (not auto-exposed) ◦ The agents collect detailed per-component metrics/events such as: ▪︎ `LLMMetrics`: time-to-first-token (TTFT), duration, token counts ▪︎ `TTSMetrics`: time-to-first-byte (TTFB), duration, audio length ▪︎ `STTMetrics`: TTFB, duration, audio duration ▪︎
VADMetrics
/ `EOUMetrics`: timing and event data ◦ These are emitted as events and logs; they are not automatically exported to Prometheus. You can forward/transform these events into Prometheus metrics via a custom exporter or by wiring the agents'
metrics_collected
(or event hooks) into your metrics pipeline. How to enable metrics 1. Set
prometheus_port
in the config for the service(s) you want metrics from (Egress, Ingress, or LiveKit Server). This exposes the
/metrics
endpoint. 2. Point Prometheus to the exposed
/metrics
endpoints to scrape them. If you want the agent-specific LLM/TTS/STT/VAD metrics in Prometheus • Option A: Implement a small exporter that subscribes to the agent events (
metrics_collected
) and exposes Prometheus metrics. • Option B: Emit those metrics to a push gateway or statsd/metrics backend that your monitoring stack already converts to Prometheus. Would you like: • the exact config snippet for enabling
prometheus_port
in a specific service (Ingress/Egress/Server), or • a short example exporter pattern to convert agent events (LLM/TTS/STT) into Prometheus metrics? Sources: Self-hosting the Egress Service | LiveKit docs | Self-hosting the Ingress Service | LiveKit docs | Deploying LiveKit | LiveKit docs | LLM Metrics | LiveKit docs | TTS Metrics | LiveKit docs