Adding Harness Support
This guide is for developers building AI clients, IDEs, agent frameworks, or other tools who want to support the Agent Harnesses standard.What clients must implement
A compliant client must support the four-phase loading model:- Load — at session start, inject the full
HARNESS.mdbody into the agent’s context - Discovery — expose tools so the agent can read skill and reference descriptions to find what is relevant to a task
- Activation — expose tools so the agent can read the full content of a skill or reference when its description matches the task
- Execution — expose tools so the agent can run scripts bundled within skills
Loading model in detail
Load
At session start, readHARNESS.md frontmatter to get name and description for routing or presenting the harness to the user, then inject the full body into the agent’s context:
HARNESS.md is the agent’s map of the harness — it establishes the agent’s role and tells it what skills and references are available.
Discovery
When a task arrives, the agent reads skill and reference descriptions to decide what is relevant. Expose a tool so the agent can request descriptions on demand rather than having the client inject everything upfront.Activation
When the agent determines a skill or reference is relevant, your client reads the requested content and returns it. Expose these tools to the agent:Handling subdirectories
Skills and references may be organized into named grouping subdirectories. Each grouping directory contains aSKILLS.md or REFERENCES.md summary file that describes its contents.
HARNESS.md to learn about groups, loads a SKILLS.md to learn what is in a group, then loads individual SKILL.md files only when a task requires them. Your client’s load_skill tool handles all three levels via the same path-based interface.
The same pattern applies to references/ with REFERENCES.md. Groups may be nested arbitrarily; each level gets its own summary file.
Reference file types
References may be any file type — markdown, images, code, data files, or anything else. Yourload_reference tool should return the raw file content and let the agent handle interpretation.
When indexing references for presentation or search, only markdown files (.md) may carry a description frontmatter field. Non-markdown files have no structured metadata.
Script execution
When an agent invokes a script bundled inside a skill, your client is responsible for executing it. The expected interface:- Scripts receive input via command-line arguments or stdin
- Scripts write results to stdout
- Non-zero exit code indicates failure; stderr contains the error message
run_script(skill: str, script: str, args: list[str]) -> str tool to the agent.
Validation
Use theharnesses-ref CLI to validate a harness before loading it:
HARNESS.md frontmatter, skill validity, and the presence of SKILLS.md/REFERENCES.md in grouping subdirectories. Clients may run this check at install time and surface errors to the user.