{% extends "base.html" %} {% block title %}AI usage · {{ site_title }}{% endblock %} {% block heading %}AI usage{% endblock %} {% block content %}
Calls {{ "{:,}".format(total_calls) }} {% if failures %} {{ failures }} failed {% endif %}
Tokens {{ "{:,}".format(total_tokens) }}
Cost ${{ "%.2f"|format(total_cost) }}
Avg latency {{ "{:,}".format(avg_latency) }}ms

Tokens per day

{{ tokens_chart }}

Cost per day (USD)

{{ cost_chart }}

By model

{% if by_model %}
{% for row in by_model %} {% endfor %}
Model Calls Tokens Cost Avg latency
{{ row.model }} {{ "{:,}".format(row.calls) }} {{ "{:,}".format(row.tokens) }} ${{ "%.4f"|format(row.cost) }} {{ "{:,}".format(row.latency) }}ms
{% else %}

No calls recorded

Usage appears here as soon as your app makes its first provider call.

{% endif %}

Recent agent runs

View all
{% if recent_runs %}
{% for run in recent_runs %} {% set level = {'succeeded': 'success', 'failed': 'danger', 'running': 'info'} %} {% endfor %}
AgentModelStatus StepsTokensCost
{{ run.name }} {{ run.model }} {{ run.status.value }} {{ run.steps }} {{ "{:,}".format(run.total_tokens) }} ${{ "%.4f"|format(run.cost_usd) }}
{% else %}

No agent runs yet

Runs started with ai.Agent are traced here, step by step.

{% endif %}
{% endblock %}