Skip to main content
All metric classes except ToolCallMetrics inherit from BaseMetrics, which provides the shared token and cost fields.

BaseMetrics

Shared token fields inherited by RunMetrics, MessageMetrics, SessionMetrics, and ModelMetrics.

RunMetrics

Used on RunOutput.metrics and TeamRunOutput.metrics. Includes all BaseMetrics fields plus:

details keys

The details dictionary uses model type strings as keys. Each key maps to a list of ModelMetrics objects (one per unique model (provider, id) pair). Eval agent metrics are prefixed with eval_. If an eval agent uses model types "model" and "output_model", the details keys become "eval_model" and "eval_output_model".
Metrics is preserved as a backward-compatible alias for RunMetrics. Both from agno.metrics import Metrics and from agno.models.metrics import Metrics still work.

MessageMetrics

Used on Message.metrics. Per-API-call metrics. Includes all BaseMetrics fields plus:

SessionMetrics

Returned by agent.get_session_metrics(). Aggregated across all runs in a session. Includes all BaseMetrics fields plus:

ModelMetrics

Per-model aggregate stored inside RunMetrics.details[model_type]. Includes all BaseMetrics fields plus:

ToolCallMetrics

Used on ToolExecution.metrics. Standalone class (does not inherit BaseMetrics).

Provider field availability

Not all providers populate all fields. This table shows which BaseMetrics fields each provider sets on MessageMetrics. “Standard tokens” = input_tokens, output_tokens, total_tokens. “Audio tokens” = audio_input_tokens, audio_output_tokens.