agent-harness-construction

Redesign agent action spaces, tool schemas, and observation formats for reliable completion.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you fix low completion rates by improving an agent’s action space, observation formatting, and error recovery contract so it converges to the goal more consistently.

Core Features & Use Cases

  • Action space design: Defines stable tool naming, narrow input schemas, deterministic output shapes, and appropriate granularity (micro/medium/macro tools).
  • Observation contract: Standardizes tool responses with status, summary, next_actions, and artifacts so the agent can plan the next step reliably.
  • Error recovery contract: Specifies root-cause hints, safe retry instructions, and explicit stop conditions for every error path.
  • Context budgeting and architecture guidance: Recommends compact system prompts, on-demand skill loading, phase-boundary compaction, and hybrid ReAct + typed tool execution.
  • Benchmarking and anti-pattern detection: Tracks completion rate, retries, pass@1/pass@3, and cost per success while warning against overlapping tools, opaque outputs, and context overload.

Quick Start

Update your agent’s tool definitions and tool response schema by asking the AI to redesign your action space and observation/error contracts to improve completion rate and reduce retries.

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 AI agent tools to improve task completion rates?

Standardize tool responses with explicit status, summary, next_actions, and artifacts fields to fix unreliable agent observations. This observation contract provides the structured context necessary for the agent to plan the next step without hallucinating or getting stuck.

What is the best way to handle error recovery in AI agent workflows?

The best way to handle AI agent error recovery is to implement explicit contracts specifying root-cause hints, safe retry instructions, and hard stop conditions for every error path. This prevents infinite retry loops and guides the agent back to a successful state.

How do I benchmark AI agents for pass rate and cost per success?

Benchmark AI agents by tracking completion rate, retries, pass@1, pass@3, and cost per success. This reveals whether action space redesigns actually improve reliability or simply hide failures behind excessive context usage and tool calls.

Why does my AI agent fail to converge on a goal under context budget constraints?

Agents fail to converge under context budget constraints due to context overload from opaque outputs and overlapping tools. Mitigate this by using compact system prompts, on-demand skill loading, and phase-boundary compaction to preserve working memory.

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

Avoid macro tools in an AI agent action space when they cause overlapping functionality or opaque outputs, which degrade benchmarking pass rates. Switching to micro or medium granularity tools with deterministic outputs improves error recovery and planning.