{% extends 'base.html' %} {% block title %}Thread · Brain{% endblock %} {% macro tools(agent, open=False) %}
{{ agent.tools | length }} tool calls{{ agent.status }}{% if agent.tokens %}{{ agent.tokens }} tokens{% endif %}
    {% for t in agent.tools %}
  1. {{ t.name }} {{ t.arg }}
  2. {% else %}
  3. No tool calls yet.
  4. {% endfor %}
{% endmacro %} {% block body %}

{{ root.subject or root.body[:80] }}

{{ root.status }} {% if root.status == 'closed' %}
{% else %}
{% endif %}

Back to chat{% if root.project %}{{ root.project }}{% endif %}

{% for m in items %}
{{ m.sender }}{% if m.sender_declared %} self-declared{% endif %} ({{ m.sender_kind }}) → {{ m.recipient }} {{ m.kind }}{% if m.kind == 'question' %} {{ m.status }}{% endif %}
{% set agent = agents.get(m.agent_id) if m.agent_id else None %} {% if agent and m.id == agent.spawn_msg_id %}

Agent started{{ agent.agent_type or 'subagent' }}{% if agent.description %}{{ agent.description }}{% endif %}

Task
{{ m.body }}
{{ tools(agent) }} {% elif agent and m.id == agent.report_msg_id %}

Final report

{{ m.body }}
{% else %} {% if m.subject and not loop.first %}

{{ m.subject }}

{% endif %}
{{ m.body }}
{% endif %}
{% endfor %}
{% endblock %}