agent-harness-construction
设计和优化AI代理的动作空间、工具定义和观察格式,以提高完成率。
- License 许可
- MIT
- 最近更新
- 2026-05-20
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- agent-harness-construction
- origin
- ECC
- description
- 设计和优化AI代理的动作空间、工具定义和观察格式,以提高完成率。
03 SKILL.md 正文
智能体框架构建
当你在改进智能体的规划、调用工具、从错误中恢复以及收敛到完成状态的方式时,使用此技能。
核心模型
智能体输出质量受限于:
- 行动空间质量
- 观察质量
- 恢复质量
- 上下文预算质量
行动空间设计
- 使用稳定、明确的工具名称。
- 保持输入模式优先且范围狭窄。
- 返回确定性的输出形状。
- 除非无法隔离,否则避免使用全能型工具。
粒度规则
- 对高风险操作(部署、迁移、权限)使用微工具。
- 对常见的编辑/读取/搜索循环使用中等工具。
- 仅当往返开销是主要成本时使用宏工具。
观察设计
每个工具响应都应包括:
status: success|warning|errorsummary: 一行结果next_actions: 可执行的后续步骤artifacts: 文件路径 / ID
错误恢复契约
对于每个错误路径,应包括:
- 根本原因提示
- 安全重试指令
- 明确的停止条件
上下文预算管理
- 保持系统提示词最少且不变。
- 将大量指导信息移至按需加载的技能中。
- 优先引用文件,而不是内联长文档。
- 在阶段边界处进行压缩,而不是任意的令牌阈值。
架构模式指导
- ReAct:最适合路径不确定的探索性任务。
- 函数调用:最适合结构化的确定性流程。
- 混合模式(推荐):ReAct 规划 + 类型化工具执行。
基准测试
跟踪:
- 完成率
- 每项任务的重试次数
- pass@1 和 pass@3
- 每个成功任务的成本
反模式
- 太多语义重叠的工具。
- 不透明的工具输出,没有恢复提示。
- 仅输出错误而没有后续步骤。
- 上下文过载,包含不相关的引用。
04 同仓库更多 Skills
webgpu-threejs-tsl
Comprehensive guide for developing WebGPU-enabled Three.js applications using TSL (Three.js Shading Language). Covers WebGPU renderer setup, TSL syntax and node materials, compute shaders, post-processing effects, and WGSL integration. Use this skill when working with Three.js WebGPU, TSL shaders, node materials, or GPU compute in Three.js.
webgpu-threejs-tsl
Comprehensive guide for developing WebGPU-enabled Three.js applications using TSL (Three.js Shading Language). Covers WebGPU renderer setup, TSL syntax and node materials, compute shaders, post-processing effects, and WGSL integration. Use this skill when working with Three.js WebGPU, TSL shaders, node materials, or GPU compute in Three.js.
verification-loop
暂无简介
tdd-workflow
Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and E2E tests.
strategic-compact
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
security-review
Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment/sensitive features. Provides comprehensive security checklist and patterns.