{% extends "base.html" %} {% block title %}Agents - Memorizz{% endblock %} {% block body_attrs %} data-sidebar-scope="agents" data-sidebar-default="collapsed"{% endblock %} {% block content %} {% from '_ui.html' import page_header, empty_state, id_chip %} {% from '_run_health.html' import runs_chart, attention_panel, recent_runs with context %} {% set window_labels = {'24h': 'last 24 hours', '7d': 'last 7 days', '30d': 'last 30 days'} %} {% set ov = fleet_overview %} {% set rows = fleet.values()|list %} {% set active_count = rows|selectattr('stats')|list|length %} {% set attention_count = rows|selectattr('health', 'in', ['failing', 'degraded'])|list|length %} {% set idle_count = rows|selectattr('health', 'equalto', 'idle')|list|length %} {% set favorite_count = agents|selectattr('is_favorite')|list|length %} {% set query_suffix = ('&sort_by=' ~ sort_by) ~ ('&load=1' if loaded else '') %} {% call page_header('Agents', 'Fleet health for every agent in this memory provider. Select an agent to inspect it or send a quick message.', 'Agents') %} Create agent {% endcall %} {% if agents %}
Agents{{ agents|length }}
{% if ov %} {% set t = ov.totals %}
Active{{ active_count }}
Needs attention{{ attention_count }}
Runs{{ '{:,}'.format(t.runs) }}
Success{% if t.success_rate is none %}—{% else %}{{ '%.1f'|format(t.success_rate) }}%{% endif %}
Run time p95{{ fmt_duration(t.p95_ms) }}
Tokens{{ fmt_compact(t.input_tokens + t.output_tokens) }}
From cache{% if t.cache_read_percent is not none %}{{ '%.0f'|format(t.cache_read_percent) }}%{% else %}—{% endif %}
Spend{{ fmt_usd(t.cost_usd) }}
{% endif %}
{{ window_labels[window]|capitalize }}{{ generated_at.strftime('%H:%M') }} UTC
{% if fleet_deferred %}

Run health is not read automatically for this provider. Load run health

{% elif fleet_error %}

{{ fleet_error }} Configuration and quick chat still work.

{% endif %}
{% if loaded %}{% endif %}

j k move↵ playgroundt tracese edit

{% for agent in agents %} {% set agent_id_value = agent.agent_id|string %} {% set agent_display_name = agent.name if agent.name else (agent.persona.name if agent.persona and agent.persona.name else 'Agent') %} {% set row = fleet.get(agent_id_value, {}) %} {% set st = row.stats %} {% set health = row.health or 'idle' %} {% set tags = [] %} {% if st and st.runs %}{% set _ = tags.append('active') %}{% endif %} {% if health in ['failing', 'degraded'] %}{% set _ = tags.append('attention') %}{% endif %} {% if health == 'idle' %}{% set _ = tags.append('idle') %}{% endif %} {% if agent.is_favorite %}{% set _ = tags.append('favorite') %}{% endif %} {% endfor %}
Agents with run health for the {{ window_labels[window] }}. Select a row to see details.
Favorite Trend
{{ agent_display_name }} {{ agent_id_value[:8] }} {% if agent_copies.get(agent_id_value, 1) > 1 %}{{ agent_copies[agent_id_value] }} copies{% endif %} {{ row.model }} {{ health|capitalize }} {{ st.runs if st else 0 }} {% if st %} {% set peak = [st.series|map(attribute='runs')|max, 1]|max %} {% for b in st.series %}{% if b.runs %}{% set h = [20 * b.runs / peak, 2]|max %}{% set fh = h * b.failed / b.runs %}{% if b.failed %}{% endif %}{% endif %}{% endfor %} {% else %}{% endif %} {% if st and st.success_rate is not none %}{{ '%.0f'|format(st.success_rate) }}%{% else %}—{% endif %} {{ fmt_duration(st.p95_ms) if st else '—' }} {{ fmt_compact(st.tokens) if st else '—' }} {% if st and st.cache_read_percent is not none %}{{ '%.0f'|format(st.cache_read_percent) }}%{% else %}—{% endif %} {{ fmt_usd(st.cost_usd) if st else '—' }} {{ relative_time(st.last_run_at, generated_at) if st else '—' }}
{% if ov %} {# Fleet-wide activity fills the column under the grid. #} {% set agent_names = {} %} {% for agent in agents %}{% set _ = agent_names.update({agent.agent_id|string: agent.name or (agent.persona.name if agent.persona and agent.persona.name else agent.agent_id|string)}) %}{% endfor %}
{{ runs_chart(ov, window, window_labels[window], title='Fleet runs over time', prefix='fleet') }} {{ attention_panel(ov.attention, prefix='fleet', limit=6) }}
{{ recent_runs(ov.recent, agent_names, title='Recent runs across the fleet', prefix='fleet') }} {% endif %}
{% else %} {{ empty_state('No agents yet', 'Agents you create here, or save from Python with agent.save(), appear in this list.', '/agents/new', 'Create agent') }} {% endif %} {% endblock %}