RunOutput.
- Per message: Each assistant message has
MessageMetricswith per-API-call token counts and timing. - Per member run: Each team member run has its own
RunMetrics. Setstore_member_responses=Trueto access them. - Team leader run:
TeamRunOutput.metricshasRunMetricsfor the team leader’s model calls only. - Per session:
team.get_session_metrics()returnsSessionMetricsaggregated across leader and all members.
| Level | Type | Access |
|---|---|---|
| Per message | MessageMetrics | message.metrics |
| Per member run | RunMetrics | member_response.metrics (requires store_member_responses=True) |
| Team leader run | RunMetrics | run_response.metrics |
| Per session | SessionMetrics | team.get_session_metrics() |
Run fields (RunMetrics)
| Field | Description |
|---|---|
input_tokens | Tokens sent to the model. |
output_tokens | Tokens generated by the model. |
total_tokens | Sum of input_tokens and output_tokens. |
audio_input_tokens | Audio tokens in the input. |
audio_output_tokens | Audio tokens in the output. |
audio_total_tokens | Sum of audio_input_tokens and audio_output_tokens. |
cache_read_tokens | Tokens read from cache. |
cache_write_tokens | Tokens written to cache. |
reasoning_tokens | Tokens used for reasoning. |
cost | Cost of the run. |
duration | Run duration in seconds. |
time_to_first_token | Time from run start to first token (seconds). |
details | Per-model breakdown by model type. See Metrics reference. |
additional_metrics | Extra metrics (e.g., eval_duration). |
Message fields (MessageMetrics)
| Field | Description |
|---|---|
input_tokens | Tokens sent to the model. |
output_tokens | Tokens generated by the model. |
total_tokens | Sum of input_tokens and output_tokens. |
audio_input_tokens | Audio tokens in the input. |
audio_output_tokens | Audio tokens in the output. |
audio_total_tokens | Total audio tokens. |
cache_read_tokens | Tokens served from cache. |
cache_write_tokens | Tokens written to cache. |
reasoning_tokens | Tokens used for reasoning. |
cost | Cost of this API call. |
duration | Duration of this API call (seconds). |
time_to_first_token | Time to first token for this API call (seconds). |
provider_metrics | Provider-specific metrics (e.g., Ollama timing, Groq timing, Cerebras timing). |