---
title: "Harness 与评估参考：HALO - Harness 与评估 | 思行致远"
canonical: "https://siyuanailab.com/knowledge/workflows/agent-building/harness-evaluation/agent-building-harness-evaluation-halo/"
dateModified: "2026-06-30"
datePublished: "2026-06-30"
---

打开 AI·外脑目录  

 

AI·外脑

 [返回专栏首页](https://siyuanailab.com/knowledge/)

 ×

 

站内搜索 

⌕

   

主要栏目

 

- [AI 核心概念](https://siyuanailab.com/knowledge/ai-core/)

- [工作流](https://siyuanailab.com/knowledge/workflows/)

- [工具配置与选型](https://siyuanailab.com/knowledge/toolkits/)

- [信源与标准](https://siyuanailab.com/knowledge/sources/)

- [场景案例 待开发](https://siyuanailab.com/knowledge/scenarios/)

- [职业与能力](https://siyuanailab.com/knowledge/career/)

 

专题

 

- [从这里开始](https://siyuanailab.com/knowledge/start/)

- [获取与安装](https://siyuanailab.com/knowledge/install/)

- [建设日志](https://siyuanailab.com/knowledge/ops/)

  

[工作流子目录](https://siyuanailab.com/knowledge/workflows/) 

基础设施层

 

- [浏览器自动化 **5**](https://siyuanailab.com/knowledge/workflows/infrastructure/browser-automation/)

- [MCP 工具 **5**](https://siyuanailab.com/knowledge/workflows/infrastructure/mcp-tools/)

- [文件系统与本地执行 **5**](https://siyuanailab.com/knowledge/workflows/infrastructure/filesystem-local/)

- [API 网关与工具路由 **5**](https://siyuanailab.com/knowledge/workflows/infrastructure/api-tool-routing/)

Skill 生产线

 

- [目标明确 **5**](https://siyuanailab.com/knowledge/workflows/skill-forge/goal-definition/)

- [Skill 设计 **5**](https://siyuanailab.com/knowledge/workflows/skill-forge/skill-design/)

- [代码实现 **5**](https://siyuanailab.com/knowledge/workflows/skill-forge/implementation/)

- [测试评估 **5**](https://siyuanailab.com/knowledge/workflows/skill-forge/testing-evaluation/)

Skill 参考库

 

- [写作与内容 **5**](https://siyuanailab.com/knowledge/workflows/skill-library/writing-content/)

- [研究与知识 **5**](https://siyuanailab.com/knowledge/workflows/skill-library/research-knowledge/)

- [沟通与协作 **5**](https://siyuanailab.com/knowledge/workflows/skill-library/communication-collaboration/)

- [产品与项目 **5**](https://siyuanailab.com/knowledge/workflows/skill-library/product-project/)

- [数据与分析 **5**](https://siyuanailab.com/knowledge/workflows/skill-library/data-analysis/)

- [创意与设计 **5**](https://siyuanailab.com/knowledge/workflows/skill-library/creative-design/)

- [商业与营销 **5**](https://siyuanailab.com/knowledge/workflows/skill-library/business-marketing/)

Agent Building

 

只收录有多步工作流、工作标准、Loop、Harness、工具链或通信机制的真 Agent；不收纯 persona、profile、curated list 或只有 system prompt 的仓库。

 

- [多 Agent 框架 **5**](https://siyuanailab.com/knowledge/workflows/agent-building/multi-agent-frameworks/)

- [工作流编排 **5**](https://siyuanailab.com/knowledge/workflows/agent-building/workflow-orchestration/)

- [Sub-agent 模式 **5**](https://siyuanailab.com/knowledge/workflows/agent-building/sub-agent-patterns/)

- [Harness 与评估 **5**](https://siyuanailab.com/knowledge/workflows/agent-building/harness-evaluation/) 

- [WF-091 Harness 与评估参考：agent lens](https://siyuanailab.com/knowledge/workflows/agent-building/harness-evaluation/agent-building-harness-evaluation-agent-lens/)

- [WF-092 Harness 与评估参考：claude code hooks multi agent observability](https://siyuanailab.com/knowledge/workflows/agent-building/harness-evaluation/agent-building-harness-evaluation-claude-code-hooks-multi-agent-observability/)

- [WF-093 Harness 与评估参考：HALO](https://siyuanailab.com/knowledge/workflows/agent-building/harness-evaluation/agent-building-harness-evaluation-halo/)

- [WF-094 Harness 与评估参考：litefuse](https://siyuanailab.com/knowledge/workflows/agent-building/harness-evaluation/agent-building-harness-evaluation-litefuse/)

- [WF-095 Harness 与评估参考：www project agent observability standard](https://siyuanailab.com/knowledge/workflows/agent-building/harness-evaluation/agent-building-harness-evaluation-www-project-agent-observability-standard/)

  

Agent Building · Harness 与评估 · Agent Building 参考 · WF-093

 

# Harness 与评估参考：HALO

 

思行致远 · 2026/6/30 · 置信度：高

 

HarnesstraceobservabilityAgent评估

 

Hierarchical Agent Loop Optimizer，用 RLM 分析大量执行 trace，找出 harness 级失败模式，再让编码 Agent 修改 harness 并循环验证。

 

# HALO

 

> Hierarchical Agent Loop Optimizer，用 RLM 分析大量执行 trace，找出 harness 级失败模式，再让编码 Agent 修改 harness 并循环验证。

 

## 这个能力解决什么问题

 

HALO 解决的是 Agent harness 上线后失败模式难以从海量 trace 中归纳的问题。普通编码 Agent 读少量 trace 容易过拟合某个个案，或者因为 trace 太长丢失系统性模式。HALO 用 RLM 专门处理长 trace，识别跨执行的共同失败，再把诊断报告交给 Cursor/Claude Code 等编码 Agent 修改 harness。

 

## 核心逻辑

 

输入是 agent harness 的 OpenTelemetry-compatible trace JSONL 和一个诊断 prompt。HALO engine 递归分解 trace，分析工具调用、拒答、冗余参数、语义错误等失败模式，生成 findings report。报告进入编码 Agent，编码 Agent 修改 harness/prompt/tool contract；新 harness 再部署，继续采集 trace，重复循环。输出是诊断报告、建议修改、HALO 自身 telemetry、可选 benchmark 改善记录。

 

## 技术结构

 

- 关键模块：HALO Desktop App 提供本地运行界面；`halo-engine` Python package/CLI 读取 trace；HALO-RLM engine 做递归 trace 分析；OpenTelemetry/OpenInference 负责 trace 输入与自身 telemetry；demo 展示 OpenAI Agents SDK 集成；benchmark 示例覆盖 AppWorld。
 
- 调用链路：agent harness 运行并产出 trace → `halo TRACE_PATH -p ...` → engine 用 root/subagent 递归分析 → synthesis/compaction 模型归纳失败 → report → coding agent 修改 harness → 再跑任务收集新 trace。
 
- 输入输出：输入是 JSONL trace、prompt、model/provider/base_url/header 配置；输出是 AgentOutputItem 流、诊断报告、telemetry JSONL 或 OTLP span、benchmark 对比。
 
- 核心依赖：Python `halo-engine`，OpenAI-compatible provider，支持 max-depth、max-parallel、synthesis/compaction model 配置。

 

## 为什么值得参考

 

HALO 的参考价值在于把评估闭环的对象从“模型回答”提升到“harness 本身”。它关注的是工具定义、prompt、拒答循环、参数冗余、语义正确性这些可被工程修改的 failure mode。对 Agent Building 来说，这是一种很关键的思路：不是只调模型，而是让 trace 反向驱动 harness 迭代。

 

## 为什么不建议直接套用

 

HALO 适合有大量真实 trace 的高流量 Agent 部署。小样本或一次性任务没有足够方差，RLM 可能归纳不出稳定模式。README 中 AppWorld 改善数据来自特定 benchmark 和模型组合，不能直接迁移成性能承诺。它还需要 trace 质量足够高，否则 engine 分析的是残缺证据。

 

## 如何改造成自己的版本

 

- 先把每次 Agent run 记录成统一 trace，至少包含工具调用、错误、最终 outcome。
 
- 每周抽取失败 trace 做人工分类，等样本量够再引入自动 RLM 分析。
 
- HALO 报告只能生成 patch 建议，必须经过人审和回归 eval。
 
- 把 failure mode 映射到可修改对象：prompt、tool schema、approval、retrieval、grader。
 
- 用 dev/test 分离验证，防止只针对某批 trace 过拟合。

 

## 适用场景

 

- 已有生产或准生产 Agent，有大量 trace 和明确 harness。
 
- 需要自动发现系统性失败模式，并迭代工具/prompt/harness。
 
- Benchmark 或业务 eval 可以验证修改是否泛化。

 

## 不适用场景

 

- 没有 trace、没有 eval、只有少量手工样例的早期项目。
 
- Trace 含敏感数据但没有脱敏和权限控制。
 
- 想用它直接提升模型能力，而不是改 harness 的场景。

 

## Agent Building 判断

 

- 多步工作流：collect traces → RLM trace analysis → findings report → coding agent modifies harness → redeploy → collect more traces。
 
- 工作标准：trace_path、prompt、model、max-depth、max-parallel、telemetry、benchmark 都是运行契约。
 
- Loop 标准：核心就是 harness optimization loop，依赖多轮采集和验证。
 
- Harness 标准：OpenTelemetry trace、HALO engine、telemetry、demo、AppWorld benchmark 构成评估/优化 harness。
 
- 工具调用链路或 Agent 间通信：RLM root/subagents 递归分析 trace，编码 Agent 接收报告修改 harness。
 
- 为什么不是 persona / profile / system prompt only：它以 trace 和 harness 修改为对象，不是角色提示词。

 

## 参考信息

 

- 原项目：[HALO](https://github.com/context-labs/HALO)
 
- 作者：context-labs
 
- 相关概念：[[Agent Harness]]、[[可观测性]]
 
- 相关卡片：[workflow-read-087](https://siyuanailab.com/knowledge/workflows/agent-building/sub-agent-patterns/agent-building-subagents-dart-agent-core/)

 

## 参考对象信息

 

**名称：**HALO

 

**作者：**context-labs

 

**链接：**[https://github.com/context-labs/HALO](https://github.com/context-labs/HALO)

 

## 适用场景与行动

 

**场景：**Agent Building / Harness 与评估

 

**适合谁：**关注 AI 工作流、Skill 生产和 Agent Building 的读者

 

**下一步：**先阅读边界说明，再判断它是否适合改造成自己的Harness 与评估流程。

 

当前内容按公开来源和已审核草稿整理，只作为工作流理解与方法论参考。

 

涉及客户数据、外部平台、会议记录和业务系统的场景，必须保留人工确认与授权边界。

  

[上一张：Harness 与评估参考：claude code hooks multi agent observability](https://siyuanailab.com/knowledge/workflows/agent-building/harness-evaluation/agent-building-harness-evaluation-claude-code-hooks-multi-agent-observability/) [下一张：Harness 与评估参考：litefuse](https://siyuanailab.com/knowledge/workflows/agent-building/harness-evaluation/agent-building-harness-evaluation-litefuse/)

 

[返回当前分类](https://siyuanailab.com/knowledge/workflows/agent-building/harness-evaluation/) [返回工作流专栏](https://siyuanailab.com/knowledge/workflows/)
