Run experiments and customize agent harnesses.
Compare harness changes on benchmarks. Build a harness for your domain and refine it from feedback during use.
π§ Contents Β· π§ͺ Experiments Β· π οΈ Customize Β· π Docs Β· π¬ Community Β· π Citation
π§ͺ Run experiments Follow how a harness changes across rounds. Open experiments β |
π οΈ Customize a harness Build for a domain or refine a harness from session feedback. Domain customization Β· Test-time evolving |
- π§ͺ Run experiments
- π οΈ Customize a harness
- π¬ Community
- π Documentation
- π Citation
- π Related work
- π License
Tip
Expand a workflow to see what you can build with HarnessGrad and how to get started.
π§ͺ Run experiments β compare harnesses and RSI methods under recorded conditions
Track how a harness performs as an improvement method edits it over successive rounds. Click a chart to enlarge it.
| ALFWorld | AppWorld | ScienceWorld |
|---|---|---|
![]() ![]() |
![]() ![]() |
![]() ![]() |
| PersonaMem-v2 | WTM-Bench | RoboCasa365 |
![]() ![]() |
![]() ![]() |
![]() ![]() |
How does one round of DGM change Loopβs performance on math word problems? The task agent uses Loop 0.2.0 (study source) with Qwen3.5-9B to solve five GSM8K training questions. DGM uses DeepSeek Harness (headless) with DeepSeek-V4.1-Flash to edit Loop, then HarnessGrad scores the candidate on the same questions. Set up the two agents and GSM8K.
harnessgrad run --preset gsm8k-dgm-studyOpen runs/gsm8k-dgm-study/end-summary.md to compare the two rounds. For a repeat run, add --run-id with a new name.
Choose a harness β Select an RSI method β Run tasks β Inspect the evidence. Use the same recorded conditions when comparing results, then explore the learning curve, versions and task trajectories in the Console.
A research run is one point in a harness Γ method Γ benchmark space: a harness solves tasks, a method proposes edits to that harness between rounds, and a benchmark scores each candidate. HarnessGrad provides tasks and scoring, isolated execution, and version control for candidate harnesses, with a recorded curve for each experiment.
[!NOTE] The inventory lists declared integrations; each harness and benchmark has its own preparation and runtime requirements.
Full harness, method and benchmark inventory
The table records the inventory at this README revision; the benchmark row is checked against the declared adapters.
| axis | what ships | where |
|---|---|---|
| harnesses | 11: loop, codex, opencode, deepseek-harness, openclaw, claude-code, pi, oh-my-pi, hermes-agent, miniswe, oracle |
base_harness/<name>/ |
| RSI methods | 9: dgm, rrsi, ahe, tthe, dream_rsi, sica_ci, hyperagents, meta_harness, harnessx |
experiments/method-<name>.json |
| benchmarks | 43 declared adapters; preparation and runtime prerequisites vary β every one listed: agentdojo, aime, alfworld, appworld, authored_example_fix_bug, bfcl_v3, bird_minidev, chessbench_puzzles, cooperbench, costbench, costbench_dynamic, deepswe, ds1000, fever, gaia, gsm8k, hotpotqa, jericho, jobbench, kumo, livecodebench, locomo, memoryagentbench, musique, personamem_v2, physicsquestions, ptc_bench, reasoning_gym, robocasa365, scienceworld, sportsunderstanding, spreadsheetbench, spreadsheetbench2, strategyqa, strongreject, swe_bench_pro, tau2_bench, tau3_bench, tau_bench, terminal_bench, triviaqa, twowikimultihopqa, wtm_bench |
data/datasets/, detail in DATASETS.md |
- Bring a harness: supply a directory with
harness.jsonand an entrypoint accepting--taskand--workdir. See bring your own harness. - Edit a native Harness: version its supported instructions, skills, hooks, tools, plugins and behavior settings, or candidate-owned Python source. See editable resources and qualification evidence.
- Bring a method: supply a program that reads a trajectory and writes a candidate tree. See bring your own method.
- Bring a benchmark: write an adapter that materialises tasks and runs its official scorer. See dataset onboarding.
A harness supplies harness.json and an entrypoint accepting --task and --workdir (interface). The platform runs dataset tasks and scoring, isolates execution, versions candidate harnesses, and records each run's outcomes and receipts. Dataset and harness prerequisites still need to be installed separately.
Each round records the candidate harness hash and its changes, alongside the run's model roles and measurement metadata.
[!IMPORTANT] Compare results only when the task selection, scorer, models and other relevant conditions support it. Failed or incomplete measurements are not scores; do not substitute proxy scores under a benchmark name. See the measurement policy.
Requires Linux, Python 3.12+, Git, uv, and a working bubblewrap. See the first-use guide for setup details.
git clone https://github.com/zjunlp/HarnessGrad.git
cd HarnessGrad
uv venv --seed --python 3.12 ~/.venvs/harnessgrad
source ~/.venvs/harnessgrad/bin/activate
uv pip install -e .
./install.sh --checkSet the shared external dataset directory in your local .env:
HG_DATA_ROOT=/path/to/datasetsSee downloads for preparation and locations, and datasets for adapter details.
[!TIP] New to HarnessGrad? The first-use guide includes an installation control that does not need a model call or dataset download.
Use the shared Console to inspect experiments, harness versions and task trajectories.
export HG_CONSOLE_RUNS="$PWD/runs" # existing run-record directory
python console/server.py --port 4460Open http://127.0.0.1:4460/ from the repository root, or point HG_CONSOLE_RUNS to another existing run-record directory. The Console binds to localhost by default.
![]() Experiments |
![]() Versions |
![]() Trajectories |
π οΈ Customize a harness β build for a domain and refine the harness during use
The workflow starts with a domain task. Develop a harness on examples you can train on, give people an interface to its useful capabilities, then use their feedback to refine it.
If a domain benchmark supplies only a test set, reserve it for the final evaluation. Use separate domain sources to construct training and validation questions. The domain workflow evaluates a baseline, edits candidate source and checks candidate changes against validation tasks. Compatible harnesses can also install versioned plugins from the library. Domain workflow Β· Plugin library and supported formats
Use Python 3.12+ and install from the HarnessGrad checkout. For model-generated edits, configure an editor endpoint in the customization guide.
python -m pip install .If you already have a harness, harnessgrad customize inspect --root ./my-harness lists its declared components. You can also propose a single change to selected text files with the example below. Harness manifest and entrypoint
Prepare a task configuration with your domain sources and validation criteria using the domain workflow guide. Keep the run directory outside the checkout. List the available plugins and start development with:
harnessgrad customize plugins list
harnessgrad customize workflow run --config /path/to/task.json --run-dir /path/to/domain-run --env-file /path/to/.envFor a single text edit, configure an editor endpoint using the customization guide and choose the feedback and files you want it to see. For example, put the following in feedback.json.
[{"id": "review-1", "kind": "failure", "text": "The task ended without running the project tests."}]harnessgrad customize collect --root ./my-harness --skill skills/main.md --feedback ./feedback.json > request.json
harnessgrad customize propose --request request.json --stage text-edit-v1 --max-calls 8 > proposal.json
harnessgrad customize review --request request.json --proposal proposal.json --root ./my-harnessReplace ./my-harness and skills/main.md with your own selected paths. The proposal includes candidate text and a diff for review; use the guide to export a patch and test it on a copy.
Choose a task that shows what the harness does well, then expose the inputs, evidence and result a user needs. In the Ocean Harness demo above, a user asks an ocean-science question and can inspect the sources behind the answer. A browser workbench can present a domain-specific interaction like this. The Console also provides an editor for the harness itself. Browser workbench plugins Β· Console editor
Use feedback from a session to adapt a harness you already use. Select a correction and the project instructions it concerns. The local workspace freezes those inputs, generates a proposed edit and shows its diff. For a supported instruction check, it can also compare the baseline and candidate and retain both run records for review. Offline review guide
Today this path uses an adapter for the selected project instructions. Extending it to a newly evolved harness requires discovering which parts can be edited and how to check the resulting behavior.
Xiao LΓΌ demonstrates the workflow in a desktop assistant. The local service uses the same HarnessGrad installation. To build the native shell, follow the desktop setup guide.
Open the local personal workspace with a synthetic session. Choose an existing project directory and a separate state directory outside the checkout and project.
harnessgrad customize test-time demo --state-root /path/to/state --project /path/to/project
harnessgrad customize test-time serve --state-root /path/to/stateOpen the printed local URL and select the service's connection.json in the browser. The demo uses a synthetic session and makes no model calls. Existing harnessgrad personal commands use the same local service. Test-time evolving guide
If the platform, the measurement protocol or a curve produced here is useful in your work:
@misc{xu2026harnessgrad,
title = {HarnessGrad: Harness as A Continual Learner},
author = {Buqiang Xu and Yenan Wang and Yutong Yu and Rongyao Li and
Jintian Zhang and Shuofei Qiao and Xuehai Wang and Zirui Xue and
Yijun Chen and Ningyu Zhang},
year = {2026},
}MIT. Third-party benchmark code keeps its own licence and provenance next to the code that uses it (PROVENANCE.json, LICENSE.upstream).



















