{% macro render_task_hierarchy(task_info, indent='') -%}
{{ indent }}- {{ task_info.task.id }} ({{ task_info.task.status.value }}){% if task_info['is_active'] %}
(active){% endif %}
{%- if task_info.children %}
{% for child in task_info.children %}
{{ render_task_hierarchy(child, indent + ' ') }}
{%- endfor %}
{%- endif %}
{%- endmacro -%}

# Active Tasks

The following tasks are active:

{% for task in tasks %}
<Task ID {{ task.id }}>
    Assigned agents: {{ task._serialize_agents(task.get_agents()) }}
    {% if task.completion_agents -%}
    Completion agents: {{ task._serialize_agents(task.completion_agents) }}
    {% endif %}

    {{ task.get_prompt() }}
</Task>
{% endfor %}

Only agents assigned to a task are able to mark the task as complete. You must use a tool to end your turn to let other
agents participate. If you are asked to talk to other agents, post messages. Do not impersonate another agent! Do not
impersonate the orchestrator!

Only mark a task failed if there is a technical error or issue preventing completion.

## Task hierarchy

{% for task in task_hierarchy %}
{{ render_task_hierarchy(task) }}
{% endfor %}