agent-harness-construction

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

Updated Mar 18, 2026
One-click install
npx skills add https://github.com/freedom909/real-estate-saas --skill agent-harness-construction-freedom909
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agent-harness-construction
Source: https://github.com/freedom909/real-estate-saas/tree/main/.trae/skills/agent-harness-construction
Command: npx skills add https://github.com/freedom909/real-estate-saas --skill agent-harness-construction-freedom909

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agents often fail tasks because of poorly designed tool definitions, opaque tool outputs, and missing error recovery guidance. This Skill provides a structured methodology for designing action spaces, observation formats, and context budgets so agents plan, call tools, and recover from errors more reliably. ## Core Features & Use Cases - Action Space Design: Rules for stable tool names, narrow schema-first inputs, deterministic output shapes, and micro/medium/macro tool granularity. - Observation & Recovery Contracts: Standard response fields (status, summary, next_actions, artifacts) plus root-cause hints, safe retries, and stop conditions for every error path. - 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 success). - Use Case: When building a coding agent whose tool calls keep failing, apply this Skill to restructure tool schemas and add recovery hints so the agent converges on completion instead of looping. ## 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.

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 for agent architecture?▼

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 errors and retries?▼

For every error path, include a root cause hint, a safe retry instruction, and an explicit stop condition. Error-only output without next steps is an anti-pattern that causes agents to loop or stall.

What metrics measure AI agent performance?▼

Track completion rate, retries per task, pass@1 and pass@3, and cost per successful task. These metrics reveal whether tool design and recovery contracts are actually improving convergence.

When should I use micro-tools vs macro-tools?▼

Use micro-tools for high-risk operations like deploys, migrations, and permission changes. Use macro-tools only when round-trip overhead is the dominant cost; medium tools cover common edit, read, and search loops.