# abhiramarise/agent-harness-benchmark architecture

> Architecture diagram of the GitHub repository abhiramarise/agent-harness-benchmark, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abhiramarise/agent-harness-benchmark
- Repository: https://github.com/abhiramarise/agent-harness-benchmark

## Overview

Agent Harness Benchmark compares ReAct, plan-then-execute, and reflexion on a shared task set and LLM, scoring each trial and exposing results through a static dashboard. The main workflow is CLI/runner → harness → task answer → checker/scorer → results → dashboard; custom YAML tasks provide an alternate CLI entry. README documents the unsampled runner and harness capabilities, while source excerpts confirm key helper and CLI calls. The graph omits uncertain internal runner wiring and treats the dashboard and result artifacts as documented product components.

Main entry points: [`backend/app/runner.py`](https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/runner.py) (Benchmark runner), [`backend/app/cli.py`](https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/cli.py) (Benchmark CLI), [`backend/app/llm_client.py`](https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/llm_client.py) (LLM clients), [`backend/app/harnesses/react.py`](https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/harnesses/react.py) (ReAct loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Benchmark execution"]
  node_cli["Benchmark CLI<br/>[cli.py]"]
  node_config["Config loader<br/>[config_loader.py]"]
  node_runner["Benchmark runner<br/>[runner.py]"]
  node_models["Run data models<br/>[models.py]"]
end

subgraph group_harnesses["Agent harnesses"]
  node_react["ReAct loop<br/>[react.py]"]
  node_plan["Plan-execute loop<br/>[plan_execute.py]"]
  node_reflexion["Reflexion loop<br/>[reflexion.py]"]
  node_base["Harness helpers<br/>[base.py]"]
  node_sandbox["Python sandbox<br/>[sandbox.py]"]
end

subgraph group_evaluation["Tasks and evaluation"]
  node_tasks["Benchmark tasks"]
  node_scorer["Trial scorer<br/>[scorer.py]"]
end

subgraph group_results["Results and dashboard"]
  node_report["Terminal report<br/>[report.py]"]
  node_meta_export["Task metadata export"]
  node_trial_data["Trial results<br/>[results.json]"]
  node_task_data["Task metadata<br/>[tasks_meta.json]"]
  node_dashboard["Static dashboard<br/>[index.html]"]
end

subgraph group_integration["LLM integration"]
  node_llm["LLM clients<br/>[llm_client.py]"]
  node_providers(("LLM providers"))
end

node_operator(("Benchmark operator"))

node_operator -->|"runs benchmark"| node_cli
node_cli -->|"loads configuration"| node_config
node_cli -->|"invokes benchmark"| node_runner
node_cli -->|"prints report"| node_report
node_runner -->|"runs harness"| node_react
node_runner -->|"runs harness"| node_plan
node_runner -->|"runs harness"| node_reflexion
node_runner -->|"selects tasks"| node_tasks
node_runner -->|"scores trials"| node_scorer
node_runner -->|"writes results"| node_trial_data
node_runner -->|"exports metadata"| node_meta_export
node_react -->|"uses helpers"| node_base
node_base -->|"executes code"| node_sandbox
node_react -->|"requests completions"| node_llm
node_plan -->|"requests completions"| node_llm
node_reflexion -->|"requests completions"| node_llm
node_llm -->|"calls provider"| node_providers
node_scorer -->|"runs checker"| node_tasks
node_meta_export -->|"reads task definitions"| node_tasks
node_meta_export -->|"writes metadata"| node_task_data
node_dashboard -->|"reads results"| node_trial_data
node_dashboard -->|"reads metadata"| node_task_data

click node_cli "https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/cli.py"
click node_config "https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/config_loader.py"
click node_runner "https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/runner.py"
click node_models "https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/models.py"
click node_react "https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/harnesses/react.py"
click node_plan "https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/harnesses/plan_execute.py"
click node_reflexion "https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/harnesses/reflexion.py"
click node_base "https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/harnesses/base.py"
click node_sandbox "https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/sandbox.py"
click node_tasks "https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/tasks/task_definitions.py"
click node_scorer "https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/scorer.py"
click node_llm "https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/llm_client.py"
click node_report "https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/report.py"
click node_meta_export "https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/export_tasks_meta.py"
click node_trial_data "https://github.com/abhiramarise/agent-harness-benchmark/blob/main/results/results.json"
click node_task_data "https://github.com/abhiramarise/agent-harness-benchmark/blob/main/results/tasks_meta.json"
click node_dashboard "https://github.com/abhiramarise/agent-harness-benchmark/blob/main/frontend/index.html"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_config,node_runner,node_models toneBlue
class node_react,node_plan,node_reflexion,node_base,node_sandbox toneAmber
class node_tasks,node_scorer toneMint
class node_report,node_meta_export,node_trial_data,node_task_data,node_dashboard toneRose
class node_llm,node_providers,node_operator toneIndigo
```

## Components

### Benchmark execution

- [Benchmark CLI](https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/cli.py): `backend/app/cli.py`
- [Config loader](https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/config_loader.py): `backend/app/config_loader.py`
- [Benchmark runner](https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/runner.py): `backend/app/runner.py`
- [Run data models](https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/models.py): `backend/app/models.py`

### Agent harnesses

- [ReAct loop](https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/harnesses/react.py): `backend/app/harnesses/react.py`
- [Plan-execute loop](https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/harnesses/plan_execute.py): `backend/app/harnesses/plan_execute.py`
- [Reflexion loop](https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/harnesses/reflexion.py): `backend/app/harnesses/reflexion.py`
- [Harness helpers](https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/harnesses/base.py): `backend/app/harnesses/base.py`
- [Python sandbox](https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/sandbox.py): `backend/app/sandbox.py`

### Tasks and evaluation

- [Benchmark tasks](https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/tasks/task_definitions.py): `backend/app/tasks/task_definitions.py`
- [Trial scorer](https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/scorer.py): `backend/app/scorer.py`

### Results and dashboard

- [Terminal report](https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/report.py): `backend/app/report.py`
- [Task metadata export](https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/export_tasks_meta.py): `backend/app/export_tasks_meta.py`
- [Trial results](https://github.com/abhiramarise/agent-harness-benchmark/blob/main/results/results.json): `results/results.json`
- [Task metadata](https://github.com/abhiramarise/agent-harness-benchmark/blob/main/results/tasks_meta.json): `results/tasks_meta.json`
- [Static dashboard](https://github.com/abhiramarise/agent-harness-benchmark/blob/main/frontend/index.html): `frontend/index.html`

### LLM integration

- [LLM clients](https://github.com/abhiramarise/agent-harness-benchmark/blob/main/backend/app/llm_client.py): `backend/app/llm_client.py`
- **LLM providers**

### Other components

- **Benchmark operator**

## Connections

- Benchmark operator → Benchmark CLI: runs benchmark
- Benchmark CLI → Config loader: loads configuration (evidence: `backend/app/cli.py`)
- Benchmark CLI → Benchmark runner: invokes benchmark (evidence: `backend/app/cli.py`)
- Benchmark CLI → Terminal report: prints report (evidence: `backend/app/cli.py`)
- Benchmark runner → ReAct loop: runs harness
- Benchmark runner → Plan-execute loop: runs harness
- Benchmark runner → Reflexion loop: runs harness
- Benchmark runner → Benchmark tasks: selects tasks
- Benchmark runner → Trial scorer: scores trials
- Benchmark runner → Trial results: writes results
- Benchmark runner → Task metadata export: exports metadata
- ReAct loop → Harness helpers: uses helpers (evidence: `backend/app/harnesses/react.py`)
- Harness helpers → Python sandbox: executes code (evidence: `backend/app/harnesses/base.py`)
- ReAct loop → LLM clients: requests completions (evidence: `backend/app/harnesses/react.py`)
- Plan-execute loop → LLM clients: requests completions
- Reflexion loop → LLM clients: requests completions
- LLM clients → LLM providers: calls provider (evidence: `backend/app/llm_client.py`)
- Trial scorer → Benchmark tasks: runs checker (evidence: `backend/app/scorer.py`)
- Task metadata export → Benchmark tasks: reads task definitions (evidence: `backend/app/export_tasks_meta.py`)
- Task metadata export → Task metadata: writes metadata (evidence: `backend/app/export_tasks_meta.py`)
- Static dashboard → Trial results: reads results
- Static dashboard → Task metadata: reads metadata
