Files
myWiki/concepts/agent-harness.md

46 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "Agent Harness (Claw)"
created: 2026-06-15
updated: 2026-06-15
type: concept
tags: [coding-agent, evaluation, multi-agent]
sources: [raw/papers/zheng-claw-swe-bench-2026.md]
---
# Agent Harness (Claw)
## 定义
Agent Harness在 Claw-SWE-Bench 的术语中称为 **claw**)是将 LLM 包装为自主编程系统的 harness 层——包括 agent 循环、工具接口、工作空间管理、停止策略等。它不是模型本身,而是将模型的推理能力转化为可操作的代码编辑行为的**工程层**。
## 与传统 SWE-bench 评测的区别
传统 SWE-bench 评测将 prompt 模板、agent 循环、工具接口、超时、patch 提取和停止逻辑打包为单一系统报告。这导致 **三个因果独立因素的混淆**
1. 被评测的 LLM
2. 将 LLM 转化为 agent 的 harness
3. 被解决的任务实例
Claw-SWE-Bench 将 harness 提升为**受控实验变量**。
## 核心要素
一个 claw 的关键设计空间包括:
- **Agent 循环:** 如何管理多轮交互和状态
- **工具接口:** 暴露给模型的工具集文件读写、shell 执行等)
- **工作空间管理:** 容器、仓库、依赖环境
- **停止策略:** 何时判定任务完成
- **System Prompt:** 任务指令、约束条件、输出格式
## 实验证据
在 Claw-SWE-Bench 的五 claw × 双模型扫掠中:
- 固定 GLM 5.1Pass@1 从 60.9% 到 73.4%**12.5 pp 差距**
- 固定 Qwen 3.6-flashPass@1 从 38.6% 到 66.0%**27.4 pp 差距**
Harness 选择的差异可与相邻模型层级的差异相当甚至更大。
## 参考
- [[claw-swe-bench|Claw-SWE-Bench 论文]]
- [[adapter-protocol|适配器协议]]
- [[harness-model-interaction|Harness × Model 交互]]