{% 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', 'Run a memory-grounded task on one harness, chain harnesses into a staged plan, or compare them side by side, with durable approval and host verification.', 'Execution') %} {{ 'Live' if activity.active else '' }} {% if not ui_read_only %}{% endif %} {% endcall %} {% if not ui_read_only %}
{% for ws in recent_workspaces %}{% endfor %}
{% endif %} {% 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 %} {% set hx_harnesses = [] %}{% for item in harnesses %}{% set _ = hx_harnesses.append({'name': item.name, 'ready': item.ready, 'edits': not (item.metadata or {}).get('write_requires_external_isolation'), 'models': item.models or [], 'network': (item.metadata or {}).get('network_modes') or ['none'], 'tools': (item.metadata or {}).get('task_tool_policy', False), 'cost': (item.metadata or {}).get('cost_reporting', item.usage_reporting) is true, 'tokens': (item.metadata or {}).get('token_reporting', item.usage_reporting) is true, 'schema': (item.metadata or {}).get('output_schema', False) is true, 'subagents': (item.metadata or {}).get('subagents') or item.name == 'memagent', 'isolation': item.requires_external_isolation is true, 'edit_isolation': (item.metadata or {}).get('write_requires_external_isolation') is true, 'mcp': item.mcp or (item.metadata or {}).get('mcp_fallback') == 'context_pack', 'default_model': ((model_choices or {}).get(item.name) or {}).get('default') or (item.metadata or {}).get('default_model') or '', 'choices': ((model_choices or {}).get(item.name) or {}).get('groups') or []}) %}{% endfor %} {% set hx_agents = [] %}{% for agent in agents %}{% set _ = hx_agents.append({'id': agent.agent_id|string, 'name': agent_label(agent), 'model': (agent.llm_config.model if agent.llm_config and agent.llm_config.model else '')}) %}{% endfor %}
More launch optionsStaged plans across harnesses, side-by-side comparisons, limits and policies. Edits, web access, secrets and governed writes need approval first.

One harness runs the task. Auto route picks one from past results.

{% if workspace_roots %}Blank, or an existing folder inside {% for root in workspace_roots %}{{ root }}{% if not loop.last %} or {% endif %}{% endfor %}.{% endif %}
Plan and comparison answers are saved to this memory so later runs can recall them.
Codex and Claude Code sandbox themselves. A MemAgent runs code in its agent’s sandbox provider. The wrappers are for adapters whose command you have wrapped, such as OpenHands.
Thread, environment, tools and output schema

Tool lists apply to Claude Code-based harnesses. memagent uses its saved agent’s tools and connected apps, set on the Agents page. Codex uses its own shell and file tools.

{% endif %} {#- A run's actions at a glance: messages, commands, tool calls, file edits. -#} {% macro step_strip(steps) %}{% set labels = {'message': 'message', 'command': 'command', 'tool_call': 'tool call', 'file_change': 'file edit'} %}{% for kind, n in steps.items() if n %}{{ n }}{% endfor %}{% endmacro %} {#- 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 perms.allow_subagents %} · subagents{% 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.workflows %}

Workflows {{ m.workflows|length }} recent{% if m.workflows_active %} · {{ m.workflows_active }} active{% endif %}{% if m.workflows|length > 1 %}{% endif %}

{% for wf in m.workflows %}
{{ 'Canceling' if wf.canceling else wf.status_label }} {{ wf.kind_label }}

{{ wf.goal_line }}

{{ wf.progress }} {% if wf.duration_ms is not none %}{{ fmt_duration(wf.duration_ms) }}{% endif %} {% if wf.cost_usd is not none %}{{ fmt_usd(wf.cost_usd) }}{% endif %} {% if wf.updated_at %}{{ relative_time(wf.updated_at, generated_at) }}{% endif %} {% set wf_runs = wf.steps|map(attribute='run_id')|select|list %} {% if wf_runs|length > 1 %}{% endif %} {% if wf.cancellable and not ui_read_only %}{% endif %} {% if wf.rerunnable and not ui_read_only %}{% endif %} {% if wf.group not in ['active', 'approval'] and not ui_read_only %}{% endif %}
{% if wf.setup and not ui_read_only %}{% endif %}
{{ 'Goal' if wf.kind == 'plan' else 'Task' }} {{ wf.steps|length }} {{ ('stage' if wf.kind == 'plan' else 'harness') ~ ('' if wf.steps|length == 1 else ('s' if wf.kind == 'plan' else 'es')) }}
    {% for step in wf.steps %}
  1. {% if step.run_id %}{% set live = step.run and step.run.group in ['active', 'approval'] %} {% endif %}
  2. {% endfor %}
{% if wf.error and wf.group != 'succeeded' %}

{{ wf.error }}

{% endif %}

{% if wf.memory_id %}Answers saved to memory {{ wf.memory_id }}{% if wf.steps %} ({{ wf.remembered }} of {{ wf.steps|length }}){% endif %}{% else %}No memory ID, so answers are kept only in the run ledger{% endif %} · {{ id_chip(wf.id, 8) }} {% if wf.rerun_of %}· Run again from {{ id_chip(wf.rerun_of, 8) }}{% endif %} · JSON

{% endfor %}
{% endif %}
{% if m.runs %}

Run ledger

{% if m.harness_names|length > 1 %}
{% endif %} {% if not ui_read_only %}{% 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 }}{% if run.agent_id and run.harness == 'memagent' and agent_names.get(run.agent_id|string) %}{{ agent_names.get(run.agent_id|string) }}{% endif %}{% if run.model %}{{ run.model }}{% endif %} {% if run.workflow %}{{ run.workflow.label }}{% endif %}{% if run.parent_run_id %}Delegate{% endif %}{{ 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 %} {% if run.total_cost_usd is not none %}{% if run.total_cost_estimated %}≈{% endif %}{{ fmt_usd(run.total_cost_usd) }}{% if run.delegate_runs %}with delegates{% endif %}{% else %}—{% endif %} {{ 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', 'This console is read-only (MEMORIZZ_UI_READ_ONLY), so launching is turned off here. Runs, plans and comparisons started from the SDK, CLI or API appear here.' if ui_read_only else 'Launch a run, a staged plan or a comparison above to create the first durable run record.') }}
{% endif %}
Run evidence

Harness run

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