{% extends "base.html" %} {% block title %}Agent harnesses - Memorizz{% endblock %} {% block body_attrs %} data-sidebar-scope="harnesses" data-sidebar-default="collapsed"{% endblock %} {% block head %}{% endblock %} {% block content %} {% from '_ui.html' import page_header, empty_state, id_chip %} {% set m = monitor %} {% set dot = {'good': 'healthy', 'warn': 'degraded', 'bad': 'failing', 'idle': 'idle', 'active': 'active'} %} {% set agent_names = {} %} {% for agent in agents %}{% set _ = agent_names.update({agent.agent_id|string: agent.name or agent.agent_id|string}) %}{% endfor %} {% call page_header('Agent harnesses', 'Route memory-grounded tasks to Codex, Claude Code, OpenHands or a native MemAgent, with durable approval and host verification.', 'Execution') %} {% if not ui_read_only %}{% endif %} {% endcall %} {% if error %}{% endif %} {% set c = m.counts %}
Harnesses ready{{ m.ready }}of {{ m.total_harnesses }}
Runs{{ m.run_count }}{% if m.has_more %}+{% endif %}
Active{{ c.active }}
Awaiting approval{{ m.awaiting_approval }}
Succeeded{{ c.succeeded }}
Failed{{ c.failed }}
Verified{% if m.verification_checked %}{{ m.verified }}of {{ m.verification_checked }}{% else %}—{% endif %}
{% if m.spend is not none %}
Spend{{ fmt_usd(m.spend) }}
{% endif %}
Last activity{{ relative_time(m.last_activity, generated_at) if m.last_activity else '—' }}
{# Availability: one compact chip per adapter; selecting one shows its setup details. #}

Availability {{ m.ready }} of {{ m.total_harnesses }} ready

{% if m.availability %}
{% for item in m.availability %} {% endfor %}
{% if m.needs_setup %}

{{ m.needs_setup|length }} harness{{ '' if m.needs_setup|length == 1 else 'es' }} not ready. Select one to see how to fix it.

{% endif %} {% for item in m.availability %} {% endfor %} {% else %} {{ empty_state('No harness adapters registered', 'Install Codex, Claude Code or OpenHands, or register an adapter with the MetaHarness, then refresh this page.') }} {% endif %}
{% if not ui_read_only %}
Launch a bounded runDirect edits, network access, secrets and governed writes need approval before the run starts.
{% endif %} {#- pane=True: inside the run's detail pane (task shown above it). Queue rows whose run is in the ledger link to it (show_run) and leave the policy text to the pane (reason). -#} {% macro approval_card(proposal, pane=False, reason=True, show_run=False) %} {% set args = proposal.arguments or {} %} {% set perms = args.permissions or {} %}
{% if args.harness and args.harness != 'auto' %}{{ args.harness }}{% else %}Auto route{% endif %} · {{ args.mode or 'runtime' }} mode{% if perms.workspace_mode == 'direct' %} · direct edits{% endif %}{% if perms.network and perms.network != 'none' %} · network {{ perms.network }}{% endif %}
{% if not pane %}
{{ args.task }}
{% endif %}
{{ args.workspace }}Expires {{ relative_time(proposal.expires, generated_at) if proposal.expires else proposal.expires_at }}{% if show_run and args.run_id %}{% endif %}
{% if reason %}
{{ proposal.policy_reason }}
{% endif %}
{% if not ui_read_only %}
{% endif %}
{% endmacro %} {% if m.approvals %}

Approval queue

{{ m.approvals|length }} pending · approve the exact run envelope, or reject it
{% for proposal in m.approvals %}{% set unlisted = proposal in m.unlisted_approvals %}{{ approval_card(proposal, reason=unlisted, show_run=not unlisted) }}{% endfor %}
{% endif %} {% if m.runs %}

Run ledger

{% if m.harness_names|length > 1 %}
{% endif %}

j k move↵ evidence{% if not ui_read_only %}n new run{% endif %}

{% for run in m.runs %} {% endfor %}
Run ledger, most recently updated first. Select a run to see its limits, verification, approval and outcome.
Task Mode Run
{{ run.status_label }} {{ run.harness_label }} {{ run.task_line }} {% if run.writes %}Edits{% else %}Read only{% endif %} {% if run.verify_state == 'verified' %}Verified{% elif run.verify_state == 'failed' %}Failed{% elif run.verify_state == 'pending' %}Pending{% else %}—{% endif %} {{ fmt_usd(run.cost_usd) if run.cost_usd is not none else '—' }} {{ fmt_duration(run.duration_ms) if run.duration_ms is not none else '—' }} {{ relative_time(run.updated_at, generated_at) if run.updated_at else '—' }} {{ run.run_id[:8] }}
{% if m.has_more %}

Showing the newest {{ m.run_count }} runs. Older runs are available from memorizz harness runs or GET /api/harness-runs?limit=1000.

{% endif %}
{% else %}

Run ledger

0 recent
{{ empty_state('No harness runs yet', 'Runs started from the CLI or API appear here.' if ui_read_only else 'Launch a bounded run above to create the first durable run record.') }}
{% endif %}
Run evidence

Harness run


{% endblock %} {% block scripts %} {% endblock %}