Harness engineering is the practice of improving an AI agent's performance and reliability by designing and tuning the harness—the execution scaffold around a model—without changing the model itself. The harness is the software structure that lets a model call tools and act in an environment rather than merely generate tokens; it includes the system prompt, tool definitions and schemas, middleware logic between model calls, context and memory management, and supervisory structures for sub-agents.
Compared with post-training a model, it requires far less cost and engineering effort yet can substantially change the results of the same model, so it is regarded, together with context engineering, as a core discipline of agent development. It is broader than prompt engineering, which only refines prompt wording, and includes building the constraints an agent must follow into the execution structure rather than into the prompt.