agent-harness-construction

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

Updated Mar 25, 2026
One-click install
npx skills add https://github.com/Femad-6/my-skills --skill agent-harness-construction-femad-6
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-harness-construction
Source: https://github.com/Femad-6/my-skills/tree/main/.github/skills/agent-harness-construction
Command: npx skills add https://github.com/Femad-6/my-skills --skill agent-harness-construction-femad-6

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agents often fail because of poorly designed action spaces, opaque tool outputs, and missing error recovery paths. This Skill provides a structured framework for designing agent harnesses so agents plan, call tools, recover from errors, and converge on task completion more reliably. ## Core Features & Use Cases - Action Space Design: Rules for stable tool naming, schema-first narrow inputs, deterministic output shapes, and granularity guidance (micro, medium, and 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: When to use ReAct, function-calling, or hybrid patterns, and which metrics to track (completion rate, retries, pass@1/pass@3, cost per task). - Use Case: You are building a coding agent whose tool calls frequently fail silently. Apply this Skill to redesign tool outputs with structured status and next_actions fields, then measure completion rate improvements. ## 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 choose granularity based on risk: micro-tools for high-risk operations, medium tools for common loops, macro-tools when round-trip overhead dominates.

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 parsing opaque output.

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

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

How do I handle errors in agent tool calls?

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 unsafe operations without bounds.

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 add more tools to an agent?

Avoid adding tools when they overlap semantically with existing ones, since overlapping action spaces confuse agent planning. Also avoid macro-tools unless round-trip overhead is the dominant cost, and keep large guidance in on-demand skills rather than the system prompt.