agent-harness-construction

Designs agent tool schemas, observation formats, and error recovery contracts for higher task completion rates.

2|Updated Mar 29, 2015
One-click install
npx skills add https://github.com/ovisan/dotfiles --skill agent-harness-construction-ovisan
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agent-harness-construction
Source: https://github.com/ovisan/dotfiles/tree/main/.agents/skills/agent-harness-construction
Command: npx skills add https://github.com/ovisan/dotfiles --skill agent-harness-construction-ovisan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agents often fail tasks because of poorly designed tool interfaces, opaque tool outputs, and missing error recovery guidance. This Skill provides a structured methodology for designing action spaces, observation formats, and recovery contracts so agents complete tasks more reliably. ## Core Features & Use Cases - Action Space Design: Rules for stable tool naming, schema-first narrow inputs, deterministic outputs, and granularity guidance (micro, medium, macro tools). - Observation & Recovery Contracts: Standard response fields (status, summary, next_actions, artifacts) plus error contracts with root cause hints, safe retries, and stop conditions. - Architecture & Benchmarking Guidance: Recommendations on ReAct vs function-calling vs hybrid patterns, context budgeting, and metrics like completion rate, pass@1, and cost per successful task. - Use Case: When building a coding agent whose tool calls frequently fail, apply this Skill to redesign tool schemas and add structured error outputs so the agent can self-correct instead of stalling. ## Quick Start Use the agent-harness-construction skill to review my agent's tool definitions and improve its error recovery and observation formatting.

Frequently Asked Questions about agent-harness-construction

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design tool definitions for an AI agent?▼

Use stable, explicit tool names with schema-first narrow inputs and deterministic output shapes. Avoid catch-all tools unless isolation is impossible, and match granularity to risk: micro-tools for high-risk operations, medium tools for common edit/read/search loops.

What should an agent tool response include?▼

Every tool response should include a status field (success, warning, or error), a one-line summary, actionable next_actions, and artifacts such as file paths or IDs. This structure lets the agent plan its next step without guessing.

ReAct vs function-calling: which agent architecture should I use?▼

ReAct suits exploratory tasks with uncertain paths, while function-calling fits structured deterministic flows. A hybrid approach is recommended: ReAct for planning combined with typed tool execution for reliability.

How do I handle agent tool errors and retries?▼

Every error path should include a root cause hint, a safe retry instruction, and an explicit stop condition. This prevents agents from looping indefinitely or retrying operations that cannot succeed.

What metrics should I track to benchmark an AI agent?▼

Track completion rate, retries per task, pass@1 and pass@3, and cost per successful task. These metrics reveal whether harness changes actually improve reliability rather than just shifting failure modes.

When should I not use macro-tools in an agent action space?▼

Avoid macro-tools for high-risk operations like deploys, migrations, or permission changes, where micro-tools give finer control. Macro-tools are only appropriate when round-trip overhead is the dominant cost.