跳到正文
Skillpedia
智能体280k · #129

agent-harness-construction

它能做什么

这个工具可以帮助你整理并优化 AI 智能体使用工具完成任务的方式。它能确保智能体清楚地知道该做什么、怎么做,以及出错时该怎么办,从而更有可能成功完成任务。

适用场景

  • ✓在定义或调整 AI 智能体可以使用的工具时。
  • ✓当你希望 AI 智能体在任务中更加可靠、高效时。
  • ✓当 AI 智能体在完成任务或从错误中恢复时遇到困难时。

技能链接

https://github.com/affaan-m/ECC/blob/main/pi/core/skills/agent-harness-construction/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/affaan-m/ECC/blob/main/pi/core/skills/agent-harness-construction/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“怎样才能更好地组织我的 AI 智能体所使用的工具,让它不会迷失方向?”

每周 5 个新技能,1 分钟读完。

工作原理

它的做法是为智能体制定清晰的规则,包括如何命名工具、应接收哪些信息、应返回哪些信息。其中也包括如何处理错误,以及回复中应包含哪些内容。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Agent Harness Construction

Use this skill when you are improving how an agent plans, calls tools, recovers from errors, and converges on completion.

Core Model

Agent output quality is constrained by:

  1. Action space quality
  2. Observation quality
  3. Recovery quality
  4. Context budget quality

Action Space Design

  1. Use stable, explicit tool names.
  2. Keep inputs schema-first and narrow.
  3. Return deterministic output shapes.
  4. Avoid catch-all tools unless isolation is impossible.

Granularity Rules

  • Use micro-tools for high-risk operations (deploy, migration, permissions).
  • Use medium tools for common edit/read/search loops.
  • Use macro-tools only when round-trip overhead is the dominant cost.

Observation Design

Every tool response should include:

  • status: success|warning|error
  • summary: one-line result
  • next_actions: actionable follow-ups
  • artifacts: file paths / IDs

Error Recovery Contract

For every error path, include:

  • root cause hint
  • safe retry instruction
  • explicit stop condition

Context Budgeting

  1. Keep system prompt minimal and invariant.
  2. Move large guidance into skills loaded on demand.
  3. Prefer references to files over inlining long documents.
  4. Compact at phase boundaries, not arbitrary token thresholds.

Architecture Pattern Guidance

  • ReAct: best for exploratory tasks with uncertain path.
  • Function-calling: best for structured deterministic flows.
  • Hybrid (recommended): ReAct planning + typed tool execution.

Benchmarking

Track:

  • completion rate
  • retries per task
  • pass@1 and pass@3
  • cost per successful task

Anti-Patterns

  • Too many tools with overlapping semantics.
  • Opaque tool output with no recovery hints.
  • Error-only output without next steps.
  • Context overloading with irrelevant references.
常见问题

“微型工具”“中型工具”和“宏观工具”是什么?

这是不同规模的工具。微型工具用于小而关键的任务,中型工具用于常见任务,宏观工具用于大型、耗时较长的任务。

“动作空间质量”是什么意思?

指 AI 智能体可用工具的清晰度和组织程度。良好的“动作空间”意味着智能体确切知道该用哪些工具,以及如何使用它们。

为什么“错误恢复”很重要?

它对 AI 智能体从失败中恢复至关重要。了解错误的根本原因以及如何重试,能帮助智能体不轻易放弃,最终完成任务。

详情

作者的原始描述

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent's tool set, action space, or observation format.

repo: affaan-m/ECC

热度

GitHub 星标
280k
排名
#129
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能