{# --- Agent Header --- #}

{{ agent.name }}

{% set state = agent.agent_state or agent.status %} {{ state }}{% if agent.state_ms and state == 'active' %} ({{ (agent.state_ms / 1000)|round(0)|int }}s){% endif %}
{# --- Info --- #}
{% if agent.last_heartbeat %}

Last heartbeat: {{ agent.last_heartbeat }}

{% endif %}
{# --- Messages --- #} {% if messages %}

Messages

{% for msg in messages %}
{% if msg.priority == 'urgent' %} ! {% endif %} {{ msg.from_agent }} → {{ msg.to_agent }}
{{ msg.body[:200] }} {% if msg.attachments %} {% endif %}
{{ msg.created_at[11:16] }} {% if msg.read_at %} {% endif %}
{% endfor %}
{% else %}

No messages

{% endif %}