{#- Run-health panels shared by the overview and the fleet monitor. Import "with context" so the formatting helpers are visible. -#} {% from '_ui.html' import empty_state %} {#- The time range: preset windows, or a custom start and end in UTC. ``keep`` holds the page's other query parameters. -#} {% macro range_picker(base, window, windows, span, keep={}, labels={}) -%} {% set kept = keep|urlencode %} {%- endmacro %} {#- ``zoom`` is the page's URL up to its query, e.g. "/dashboard?load=1&": a bar opens that page for its own time span, or a lone run's trace. -#} {% macro runs_chart(overview, window, window_label, title='Runs over time', prefix='ov', zoom='') -%} {% set t = overview.totals %} {% set series = overview.series %}

{{ title }}

Succeeded Failed
{% if t.runs %} {% set peak = [series|map(attribute='runs')|max, 1]|max %} {% set span_seconds = (overview.window_end - overview.window_start).total_seconds() %} {% set time_format = '%H:%M' if span_seconds <= 86400 else ('%b %d %H:%M' if overview.bucket_seconds < 86400 else '%b %d') %} {% set bucket_format = '%b %d %H:%M' if overview.bucket_seconds < 86400 else '%b %d' %}
{% for bucket in series %} {% set ends = [bucket.end, overview.window_end]|min %} {% set when = bucket.start.strftime(bucket_format) ~ ' – ' ~ ('now' if ends >= overview.window_end else ends.strftime('%H:%M' if bucket.start.date() == ends.date() and overview.bucket_seconds < 86400 else bucket_format)) ~ ' UTC' %} {% set summary = bucket.runs ~ ' run' ~ ('' if bucket.runs == 1 else 's') ~ (' · ' ~ bucket.failed ~ ' failed' if bucket.failed else '') %} {% set edge = ' ov-bar--start' if loop.index0 < series|length * 0.2 else (' ov-bar--end' if loop.index0 >= series|length * 0.8 else '') %} {% if bucket.runs %} {% set href = bucket.trace_url if bucket.trace_url else zoom ~ 'window=custom&start=' ~ bucket.start.strftime('%Y-%m-%dT%H:%M') ~ '&end=' ~ ends.strftime('%Y-%m-%dT%H:%M:%S') %} {% set fill = (100 * bucket.runs / peak)|round(1) %} {% if bucket.failed %}{% endif %} {% else %} {% endif %} {% endfor %}
{% else %} {{ empty_state('No runs in this window', 'Send a message in the playground or run an automation to see activity here.', '/playground', 'Open the playground') }} {% endif %}
{%- endmacro %} {% macro attention_panel(items, prefix='ov', limit=8) -%}

Needs attention

{{ items|length }}
{% if items %} {% else %}

All clear No failed runs, failing tools or cache regressions in this window.

{% endif %}
{%- endmacro %} {% macro recent_runs(runs, agent_names, title='Recent runs', prefix='ov') -%}

{{ title }}

View all in Observability
{% if runs %}
{% for run in runs %} {% endfor %}
Started Agent Status Duration Model calls Tools Tokens From cache Cost Trace
{{ relative_time(run.started_at, generated_at) }} {% if run.agent_id %}{{ agent_names.get(run.agent_id, run.agent_id[:12]) }}{% else %}—{% endif %} {% if run.status == 'success' %}Succeeded {% elif run.status == 'failed' %}Failed {% elif run.status == 'running' %}Running {% else %}Incomplete{% endif %} {{ fmt_duration(run.duration_ms) }} {{ run.model_calls }} {% if run.tool_calls %}{{ run.tool_calls }}{% if run.tool_failures %} · {{ run.tool_failures }} failed{% endif %} {{ run.tools|map(attribute='name')|unique|join(', ') }} {% else %}—{% endif %} {{ fmt_compact(run.input_tokens + run.output_tokens) }} {% if run.input_tokens %}{{ '%.0f'|format(100 * run.cached_tokens / run.input_tokens) }}%{% else %}—{% endif %} {% if run.unpriced_calls and not run.cost_usd %}—{% else %}{{ fmt_usd(run.cost_usd) }}{% endif %} Trace
{% else %} {{ empty_state('No recorded runs yet', 'Runs appear here as soon as an agent answers a message.') }} {% endif %}
{%- endmacro %}