Skip to content
Back to skills

Harness Zero Agent As Harness

ASecurity

Use when building agent training pipelines or wanting to remove harness dependencies. Distills specialized agent-harness behaviors into model weights so gains survive with a single fixed harness at deployment.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 28, 2026
devopsgoperformance

Security analysis

A100/100

Scanned September 28, 2026

npx -y skills add hiyenwong/ai_collection --skill harness-zero-agent-as-harness --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Harness Zero Agent As Harness?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Harness Zero Agent As Harness
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hiyenwong-harness-zero-agent-as-harness/badge)](https://www.skillsdirectory.com/skills/hiyenwong-harness-zero-agent-as-harness)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
name: harness-zero-agent-as-harness
description: Use when building agent training pipelines or wanting to remove harness dependencies. Distills specialized agent-harness behaviors into model weights so gains survive with a single fixed harness at deployment.
trigger: harness distillation, agent-as-harness, harness removal, agent framework distillation, tool harness internalization, deployment-time harness, code-as-harness, agent training pipeline
category: ai_collection
---

# Harness-Zero: Harness Distillation via Agent-as-Harness

**Source**: arXiv:2609.24974v1 (2026-09-21) — Ye, Lu, Dong, Su, Song (Peking University).

## Problem

Agent harnesses (external systems mediating model-environment interaction: tool wrappers, file systems, browsers, scaffolds) substantially boost agent performance, but gains are tied to the harness at deployment. Since the best harness varies across domains/instances/models, a general-purpose agent must either settle for one suboptimal shared harness or route among ever-growing specialized ones.

## Core Idea: Harness Distillation

Use a domain- or instance-optimized harness as **training-time guidance** and transfer the behaviors it induces **into model weights**, so its gains survive under a single fixed target harness.

**Challenge**: source (optimized) and target harnesses differ in action space and available information — guidance from the optimized harness cannot serve directly as supervision for the target one.

## Agent-as-Harness Mechanism

1. **Harnessing agent**: guided by the optimized harness, a *harnessing agent* corrects student responses **before execution, in the target harness's action space** — turning harness guidance into training demonstrations compatible with the target harness.
2. **Fine-tune** on the resulting trajectories → internalizes harness-induced behavior into the model.
3. **Deploy** without the specialized harness (single fixed harness).

Contrast with **code-as-harness** (Gempt et al. lineage: harness executes/patches student code during training): agent-as-harness corrects in the target action space directly and outperforms code-as-harness for frontier LLMs.

## Verified Results

| Setting | Result |
|---|---|
| Frontier LLMs, same evolved harness | agent-as-harness > code-as-harness |
| Specialized harness removed at deployment | macro success 23.3% → **44.3%**, exceeding the 41.7% reached with harness still attached |
| Behavior recovery | **82.3%** average recovery of harness-induced patterns across 28 patterns in 3 domains (knowledge work, tool use, science) |

Key finding: distillation beats even *keeping the harness attached to the base model* — internalized behavior exceeds external scaffolding.

## Implementation Checklist

1. Identify the specialized harness behaviors worth internalizing (e.g., retry logic, verification steps, decomposition patterns, format checks).
2. Run the optimized harness over training tasks; have the harnessing agent rewrite each student response into the target harness's action space (corrections, not raw harness actions).
3. Treat corrected trajectories as SFT demonstrations; fine-tune.
4. Evaluate under the fixed target harness with the specialized harness removed.
5. Measure pattern recovery rate (fraction of harness-induced behaviors preserved) alongside task success.

## When to Use / Not Use

- **Use**: many specialized harnesses accumulating; deployment constraints forbid per-domain harnesses; want model-only portability of scaffold behaviors.
- **Not use**: behaviors requiring genuinely external state (live retrieval, sandbox execution) that cannot be approximated in weights; small models where correction quality by the harnessing agent is poor.

## Related Skills

- `agent-harness-scaling` — harness design itself
- `deterministic-retrieval-agent-reliability` — agent reliability engineering
- `tscg-tool-schema-optimization` — tool/harness interface design

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…