Metrics
This page explains the metrics sent to clients over the WebRTC data channel.
1. Enable Metrics in the Connect API Request
To receive metrics on the WebRTC data channel, set debug to true when calling the connect API.
HTTP request:
POST https://live.convai.com/connect
X-Api-Key: <X-Api-Key>
Content-Type: application/jsonRequest body:
{
"character_id": "<your character_id>",
"debug": true
}2. Receiving Metrics on the Client
Metrics are sent as RTVI messages on the WebRTC data channel.
Filter incoming messages with:
label === "rtvi-ai"type === "metrics"
3. Metrics Message Shape
A: TTFB message
B: Processing message
C: Custom (NeuroSync) message
Notes:
datacontains only one key (ttfborprocessingorcustom) in a message.Over a single response turn, you will receive multiple metrics messages.
4. Metric Types and Meaning
ttfb
data.ttfb[]
Time from first input at a processor to first output from that processor.
seconds
processing
data.processing[]
Total active processing time for that processor for the emitted span/turn window.
seconds
custom
data.custom[]
Custom processor metrics (currently NeuroSync quality/throughput signals).
number
Entry fields:
processor(string): stage instance identifiermodel(string, optional): model identifier when availablevalue(number): metric value (or placeholder value in docs examples)metric(string, custom only): metric key such asneurosync.output_fpstype(string, custom only): currentlyNeuroSyncMetricsData
NeuroSync custom metrics currently emitted:
neurosync.output_fpsneurosync.blendshapes_receivedneurosync.blendshapes_sentneurosync.frames_dropped
5. Example code to view metrics
6. Usage Notes
These metrics provide immediate per-turn context during live conversations and can be used as a practical troubleshooting signal. When a response feels slow or quality drops, the payload helps identify which stage is contributing most to delay (STT, LLM, TTS, or NeuroSync).
Last updated
Was this helpful?