{% macro hidden(exclude=[]) %} {% for key, value in query.items() if key not in exclude %} {% endfor %} {% endmacro %} {% macro badge(label) %}{{ label }}{% endmacro %} {% macro content(block) %} {% if block.matched %}

Search match in {{ block.label|lower }}.

{% endif %} {% if block.text %}
{{ block.text }}
{% endif %} {% if block.truncated %}

Preview ends after 8,000 characters. Read the full text.

{% endif %} {% for image in block.images %} {% if image.url %} Recorded image: {{ image.path }} {% else %}

External image not loaded: {{ image.path }}

{% endif %} {% endfor %} {% endmacro %} {% macro output(item) %} {{ content(item.content) }} {% for ref in item.refs %}

{% if ref.url %}Open subagent: {{ ref.name }}{% else %}Unavailable subagent reference: {{ ref.name }}{% endif %}

{% endfor %} {% endmacro %} {% macro pagination(page, pages, name) %} {% if pages > 1 %} {% endif %} {% endmacro %} {% macro select_filter(name, label, choices, empty_label) %} {% endmacro %}
SREGym Trace viewer Refresh files
{% if not single_file %} {% endif %}
{% if document and query.get('tab', 'trace') == 'trace' %} {% endif %}
{% if selected %}

{{ selected.name|replace('_', ' ') }}

{{ selected.agent }} · {{ selected.model }}{% if selected.attempt %} · Attempt {{ selected.attempt }}{% endif %}

Diagnosis {{ badge(selected.diagnosis) }} Mitigation {{ badge(selected.mitigation) }} Run {{ badge(selected.status) }}
{% set reason = selected.evaluation.get('incomplete_reason') if selected.status == 'incomplete' else selected.evaluation.get('Mitigation.reason') if selected.mitigation == 'Fail' else none %} {% if reason %}

Recorded {{ 'incomplete-attempt' if selected.status == 'incomplete' else 'mitigation' }} reason: {{ reason[:180] }}{% if reason|length > 180 %}…{% endif %} Evaluation details

{% endif %}
File and download

{{ selected.key }}

Download original JSON
{% endif %} {% if error %}

This trace could not be displayed

{{ error }}

The viewer did not change the file. Use the JSON download to inspect it.

{% endif %} {% if not selected and not error %}

Select a recorded attempt

The viewer reads trajectory.json files from the selected directory.

Evaluation grades appear only when a matching result exists beside the trace.

{% endif %} {% if selected and query.get('tab') == 'evaluation' %}

Recorded evaluation

{{ selected.evaluation_note }}

{% if selected.status == 'incomplete' %}

This attempt is incomplete. Do not treat missing stages as failures.

{% endif %}

An agent submission is not an oracle result. The viewer does not calculate new grades.

{% if selected.evaluation.get('Mitigation.reason') %}

Mitigation reason

{{ selected.evaluation['Mitigation.reason'][:8000] }}
{% endif %} {% if selected.evaluation.get('incomplete_reason') %}

Incomplete attempt

{{ selected.evaluation['incomplete_reason'][:8000] }}
{% endif %} {% if selected.evaluation %}
All recorded evaluation fields
{% for key, value in selected.evaluation.items() %}
{{ key }}
{{ value or '' }}
{% endfor %}
{% endif %}
{% elif selected and query.get('tab') == 'raw' %}

Raw JSON preview

Preview limited to 8,000 characters. The download contains the complete original file, including all subagents.

{{ raw or 'No JSON object is available.' }}
{% elif document and query.get('tab') == 'metadata' %}

Trajectory metadata

Preview limited to 8,000 characters. The JSON download contains all metadata.

{{ metadata }}
{% elif document %} {% if doc_key %}

Back to the parent trace · Subagent: {{ document.agent.name }} · {{ document.trajectory_id }}

{% endif %} {% if document.final_metrics %}
Recorded usage · {{ document.final_metrics.total_prompt_tokens|number }} input · {{ document.final_metrics.total_completion_tokens|number }} output tokens
Input tokens
{{ document.final_metrics.total_prompt_tokens|number }}
Cached input (included)
{{ document.final_metrics.total_cached_tokens|number }}
Output tokens
{{ document.final_metrics.total_completion_tokens|number }}
Recorded cost
{% if document.final_metrics.total_cost_usd is not none %}${{ '%.4f'|format(document.final_metrics.total_cost_usd) }}{% else %}Unknown{% endif %}
{% endif %} {% if children or document.continued_trajectory_ref %} {% endif %}
{{ hidden(['search', 'role', 'tool', 'stage', 'step_page', 'focus']) }} {% if not query.get('run') %}{% endif %} Reset
More trace filters
{{ select_filter('role', 'Source', ['agent', 'user', 'system'], 'All sources') }} {{ select_filter('tool', 'Tool', tool_options, 'All tools') }} {{ select_filter('stage', 'Stage', stage_options, 'All stages') }}
{{ hidden(['focus', 'step_page']) }}

{{ step_count }} of {{ document.steps|length }} steps{% if 'Unknown' in stage_options %} · Some stages were not recorded.{% endif %}

{{ pagination(step_page, step_pages, 'step_page') }} {% if not steps %}

No steps match these filters. Show all steps in this trace.

{% endif %} {% for item in steps %} {% set step = item.step %}
Step {{ step.step_id }} {{ step.source|capitalize }} {{ step.timestamp or 'Time not recorded' }} {% if item.stage != 'Unknown' %}{{ item.stage }}{% endif %}
{% if step.model_name or step.reasoning_effort or step.is_copied_context or step.llm_call_count is not none %}

{{ step.model_name or document.agent.model_name or '' }}{% if step.reasoning_effort %} · Effort {{ step.reasoning_effort }}{% endif %}{% if step.llm_call_count is not none %} · {{ step.llm_call_count }} LLM calls{% endif %}{% if step.is_copied_context %} · Copied context{% endif %}

{% endif %} {% if item.message.text and (item.message.text|length > 1600 or query.get('mode') == 'tools') and not item.message.matched %}
{{ step.source|capitalize }} message · {{ item.message.text|length }} characters shown {{ content(item.message) }}
{% else %} {{ content(item.message) }} {% endif %} {% if step.reasoning_content %}
Reasoning{{ content(item.reasoning) }}
{% endif %} {% for call in item.calls %}

Tool call{{ call.call.function_name }}

Call ID: {{ call.call.tool_call_id }}

{% if call.primary %}

{{ call.primary.label }}

{{ content(call.primary) }}
{% endif %}
All arguments (JSON){{ content(call.arguments) }}
{% for i in call.outputs %}
Tool output {{ item.outputs[i].content.text|length }} characters{% if item.outputs[i].content.truncated %} in preview{% endif %} {{ output(item.outputs[i]) }}
{% else %}

No output was recorded for this call.

{% endfor %}
{% endfor %} {% for i in item.unlinked %}
Observation without a call ID{{ output(item.outputs[i]) }}
{% endfor %} {% if step.metrics or step.extra %}
Step metrics and metadata{{ content(item.metrics) }}{{ content(item.extra) }}
{% endif %}
{% endfor %} {{ pagination(step_page, step_pages, 'step_page') }} {% endif %} {% if previous_run or next_run %} {% endif %}