---
id: "concept-harness-engineering"
type: "concept"
source_timestamps: ["00:04:51", "00:05:16", "00:08:06"]
tags: ["prompt-engineering", "system-design", "optimization"]
related: ["concept-meta-task-agent-split", "contrarian-harness-over-weights", "claim-emergent-meta-behaviors"]
definition: "The process of optimizing the external scaffolding around an AI model—such as prompts, tool definitions, and orchestration logic—to improve agent performance without changing model weights."
sources: ["s04-karpathy-agent-700"]
sourceVaultSlug: "s04-karpathy-agent-700"
originDay: 4
---
# Harness Engineering

## Definition
The process of optimizing the **external scaffolding** around an AI model — such as prompts, tool definitions, and orchestration logic — to improve agent performance without changing model weights.

## What Counts as the Harness
A "harness" includes:
- **System prompts**
- **Tool definitions**
- **Routing logic**
- **Orchestration strategies**
- **Memory management systems**

These collectively dictate how an agent behaves and interacts with its environment.

## Why It Matters Commercially
While optimizing training code (traditional auto-research of weights) is a highly niche domain, optimizing the harness is **universally applicable** to nearly any business deploying AI. This is the [[contrarian-harness-over-weights|contrarian view]] vs. frontier-lab orthodoxy that better AI primarily comes from better weights.

## How It Operates in a Loop
In an auto-improvement loop, a Meta-Agent (see [[concept-meta-task-agent-split]]) acts as the harness engineer, systematically rewriting these external constraints based on performance data to steer the Task Agent toward better outcomes. This converts agent improvement from a model-training problem into a **software engineering and systems design** problem — the model itself is held fixed, the context and tools around it are mutated.

## Emergent Phenomena
In the harness-engineering loop, Meta-Agents spontaneously develop unprogrammed software-engineering behaviors (spot-checking, validators, unit tests, progressive disclosure). See [[claim-emergent-meta-behaviors]].


## Related across days
- [[contrarian-harness-over-weights]]
- [[concept-system-matters]]
- [[contrarian-training-not-moat]]
- [[concept-context-engineering]]
