Han Chi1, Jiaxin Qi1, Yan Cui2, Baisheng Lai1, Jianqiang Huang1,2**
1 Computer Network Information Center, Chinese Academy of Sciences
2 Hangzhou Institute for Advanced Study, Chinese Academy of Sciences
* Equal contribution
Which model–harness pair solves tasks well at a reasonable cost—and how much does its measured performance depend on the task description?
A command-line harness determines tool interfaces, context management and failure recovery. Changing the harness can change the same model's execution trajectory. The wording of a task can also favor some pairs over others. AgentMeter makes both choices explicit in quality–efficiency evaluation.
Figure 1. AgentMeter evaluates complete model–CLI configurations. The paper's original panels show why quality and cost must be considered together and why the best harness depends on the model.
| Contribution | What it makes measurable |
|---|---|
| Evaluate the pair | An 80-task benchmark and a balanced 30-task Core Subset for comparing 7 models × 4 harnesses. |
| AgentMeter Score (AMS) | Graded task quality, quality within calibrated cost budgets, and expensive zero-reward execution. |
| AgentMeter-Opt | Trajectory-guided description construction followed by evaluation on the same source-balanced description set for every target. |
For each task and source pair, AgentMeter-Opt uses the Original trajectory to propose clarifications. Candidates are screened for task preservation and selected on the source pair by reward first, cost second. Selected descriptions are frozen before transfer; task environments and verifiers remain fixed.
How AMS combines quality and cost
AMS averages equally over fixed observed-effort strata:
TQ preserves partial reward. AUBQC measures reward achieved within calibrated billable-cost budgets. EFR discounts costly zero-reward runs. All pairs use the same frozen strata, calibration and billing rules.
Selected Core30 configurations illustrate why completion, cost and AMS identify different leading pairs.
| Model × harness | Full passes ↑ | Tokens / pass ↓ | USD / pass ↓ | AMS ↑ |
|---|---|---|---|---|
| Qwen3.6-Plus × Kimi Code CLI | 16/30 | 1.71M | $0.198 | 0.525 |
| Qwen3.6-Plus × Codex CLI | 12/30 | 0.48M | $0.074 | 0.393 |
| Qwen3.6-Plus × Claude Code | 11/30 | 3.51M | $0.332 | 0.325 |
| GLM-5.1 × Qwen Code | 18/30 | 1.56M | $0.633 | 0.437 |
| Gemini 3.5 Flash × Codex CLI | 18/30 | 3.15M | $2.013 | 0.273 |
With Qwen3.6-Plus fixed, the harness produces a 0.200 AMS gap. Core30 also preserves Full80 configuration trends on the shared configurations (Spearman ρ = 0.835).
Tokens/pass and USD/pass include the consumption of failed runs in the numerator. All 28 pairs · Run-level inputs
The 16-task description study evaluates four source/target pairs under Original, Self, Cross-only and equal-weight Pooled conditions.
| Target pair | Original AMS | Self AMS | Cross-only AMS | Pooled AMS |
|---|---|---|---|---|
| Qwen3.6-Plus × Kimi | 0.353 | 0.509 | 0.457 | 0.470 |
| Qwen3.6-Plus × Codex | 0.250 | 0.600 | 0.411 | 0.457 |
| DeepSeek-V4-Pro × Kimi | 0.341 | 0.517 | 0.438 | 0.457 |
| GLM-5.1 × Qwen | 0.389 | 0.498 | 0.429 | 0.446 |
| Macro | 0.333 | 0.531 | 0.434 | 0.458 |
Pooled increases macro AMS from 0.333 to 0.458 (+0.125) and changes the leading target from GLM × Qwen to Qwen × Kimi. Self is a source-side diagnostic: selection retains a higher-reward candidate, or an equal-reward candidate at lower cost, and otherwise keeps Original. Cross-only measures transfer from the other three sources after descriptions are frozen. Pooled evaluates every target on all four sources with equal weights, so it does not select a different best description for each target.
Condition definitions · Archived observations and accounting
The release includes 1,160 run records, frozen task lists and calibration, 16 task definitions, and four complete task groups × four source rewrites from the 64-description study. SkillsBench skill contents are external dependencies: see the skill inventory and preparation. Core30/Full80 execution uses a separate task checkout. Reproduction scope
Python 3.11+ is sufficient for scoring. Use Python 3.12 or 3.13 if you also plan to run Harbor and AgentMeter-Opt.
git clone https://github.com/bothan66/AgentMeter.git
cd AgentMeter
python -m venv .venv
source .venv/bin/activate
python -m pip install -e .
agentmeter tables
agentmeter tables --descriptiveThis recomputes all 28 Core30 rows and the description-condition results
from the archived observations. No API or Docker is needed. Use
agentmeter tables --examples for all 16 released Original/Self pairs.
The example uses the paper's Qwen3.6-Plus × Codex CLI pair on dm-csv-009.
Live execution requires Docker, provider credentials, and network access for
images and dependencies. Provider calls incur charges.
Prepare Harbor and configure the provider
agentmeter setup
export AGENTMETER_MODEL='Qwen3.6+'
export AGENTMETER_AGENT=codex
export AGENTMETER_AGENT_VERSION=0.153.0
export OPENAI_API_KEY=your-provider-key
export OPENAI_BASE_URL=https://provider.example/v1
export CODEX_FORCE_API_KEY=1
export CODEX_WIRE_API=responsesUse your provider's model identifier and a Responses endpoint reachable from the task container. The setup command installs pinned Harbor and AgentMeter's adapters; the example tasks are already included. Codex 0.153.0 pins the released execution recipe, not every historical paper run.
Execution and data-disk setup · Optional CLIProxyAPI routing
agentmeter probe
agentmeter compare qwen36_codex original dm-csv-009 --dry-run
agentmeter compare qwen36_codex original dm-csv-009
agentmeter compare qwen36_codex optimized dm-csv-009The positional pair selects the description source; the configured model
and agent select the evaluation target. Matching them gives Self.
Each invocation keeps its instruction snapshot, result.json,
agent/trajectory.json and verifier output under a separate jobs/ directory.
Omitting task IDs runs the same released source-specific subset in both conditions.
| Goal | Entry point |
|---|---|
| Run a frozen Core30 or Full80 selection | agentmeter suite |
| Construct a rewrite from an Original trajectory | agentmeter optimize |
| Compute AMS from task-level reward and USD cost | agentmeter score --runs condition.csv |
All commands also work as python -m agentmeter. The
reproduction guide covers installed wheels,
external task directories and validation.
Four tasks, with all four source rewrites for each.
| Task | Adaptation focus | Released coverage |
|---|---|---|
| dm-csv-009 | Public file roles, ranking guidance and CSV schema | 4/4 sources |
| citation-check | Citation identification, title cleaning and JSON delivery | 4/4 sources |
| csv-data-validator | Existing validation rules, report schema and completion guidance | 4/4 sources |
| econ-detrending-correlation | Annual/quarterly data parsing and the specified analysis pipeline | 4/4 sources |
The showcase covers public artifact interpretation, output contracts and completion guidance. Selection is at the task level: every source variant and paired outcome is included, with historical wording preserved. Some variants add post-output stopping directives; the notes distinguish these from requirements already present in Original. Inspect every version.
One task, all four sources: dm-csv-009 (author rankings)
The Original asks for three top-10 author rankings using guidance.txt and
the sample_result.csv format. All four rewrites retain those requirements:
they clarify public file paths, ranking rules or template fields. The
ranking guidance, data and output template are included with the task.
| Description source | Reward: Original → Self | USD: Original → Self | Cost change |
|---|---|---|---|
| DeepSeek-V4-Pro × Kimi | 0.333 → 0.333 | 0.04906 → 0.04318 | -12.0% |
| GLM-5.1 × Qwen | 0.333 → 0.333 | 0.05093 → 0.03515 | -31.0% |
| Qwen3.6-Plus × Codex | 0.000 → 0.333 | 0.00540 → 0.01142 | +111.4% |
| Qwen3.6-Plus × Kimi | 0.333 → 0.333 | 0.03301 → 0.01409 | -57.3% |
Publication is task-level: all four historical rewrites and their outcomes are shown together, including the cost increase. Rewards here are partial, not full passes. These observations illustrate adaptations; the paper's aggregate results use the complete study, not the four example groups.
Read all 16 rewrites and results · Interpretation and public evidence
The research implementation lives in one installable Python package:
| Module | Responsibility |
|---|---|
agentmeter.metrics |
AMS computation: agentmeter_score.compute_ams |
agentmeter.optimization |
Trajectory evidence, candidate construction and preservation checks |
agentmeter.runtime |
Pinned Harbor setup, task selection and paired execution |
agentmeter.reporting |
benchmark_tables reproduces results; adaptation_comparison compares rewrite outcomes |
agentmeter.providers |
Endpoint probes and private routing configuration |
Architecture · Task lists · Bundled tasks · Scoring data
Harbor patches and the separately attributed CLIProxyAPI Go snapshot live
in integrations/. Credentials, runtime caches and new trajectories are
excluded from Git.
@article{chi2026matching,
title = {Matching Matters: A Fair Quality--Efficiency Benchmark for Command-Line Agents},
author = {Chi, Han and Qi, Jiaxin and Cui, Yan and Lai, Baisheng and Huang, Jianqiang},
year = {2026}
}AgentMeter code: MIT. Harbor compatibility patches: Apache-2.0. Benchmark tasks, data and retained instruction content follow their upstream terms; see third-party notices and example provenance.

