
Your AI Agent Is Only as Good as the Harness Around It
Cloud Platform EngineeringAI agents frequently look impressive in demos for a reason that has nothing to do with the agent’s capabilities: demo conditions are optimized for success. Questions are clear, reference documents are current, and tools behave exactly as expected. In production, none of those conditions hold reliably — and an agent that gave convincing answers in the demo may give confidently wrong answers in deployment.
The gap between demo performance and production reliability isn’t a model problem. It’s a harness problem.
How It Works
The harness is everything that surrounds the agent: the guardrails that define what it can and cannot do, the tool contracts that specify how it should call external systems, the permission model that limits blast radius when it makes an error, and the tracing infrastructure that lets engineers see what it actually did.
A well-built harness doesn’t make agents smarter. It makes agent behavior predictable, auditable, and bounded. These are distinct goals, and they require different engineering investment than the agent itself.
Guardrails set the outer boundaries of agent behavior — what categories of action are permitted, what requires human approval, and what triggers an automatic stop. Effective guardrails are not prompt instructions. They’re enforced at the infrastructure layer, meaning the agent physically cannot route around them by reasoning its way to a different conclusion.
Tool contracts define how agents interact with external systems. An agent without a well-defined tool contract will call APIs in ways that produce inconsistent results or, worse, produce confidently formatted incorrect output that looks correct. Tool contracts encode the expected input/output schema, error handling, and retry behavior — the agent operates within the contract rather than improvising.
Permission models limit what the agent can access and modify. The principle of least privilege applies to agents at least as strongly as to human users — an agent with access to production databases, message queues, and external APIs simultaneously has a large blast radius when something goes wrong. Scoping permissions to what the current task actually requires is a harness decision, not a model decision.
Tracing closes the observability loop. An agent that produces an answer provides no inherent explanation of how it arrived at that answer. Harness-level tracing — capturing tool calls, intermediate reasoning steps, confidence signals, and decision points — is what allows engineers to diagnose failures, identify patterns, and improve the system over time. Without it, the agent is a black box that occasionally produces wrong answers with no actionable signal.
What This Means for You
The phrase “harness engineering puts humans ‘on’ the loop” — rather than simply “in the loop” — captures a meaningful architectural distinction. Human-in-the-loop systems pause and wait for approval. Human-on-the-loop systems give engineers visibility and override capability without blocking every decision. The difference is throughput: agents that pause constantly aren’t useful; agents that never pause aren’t safe.
Platform engineers building AI agent infrastructure should treat the harness as the primary engineering deliverable, not the model integration. The model is largely a commodity choice at this point — the difference between capable AI systems in production is rarely which foundation model they run, and almost always the quality of the infrastructure surrounding it.
The reliability pattern from The New Stack’s analysis is consistent with what other practitioners are reporting: demo performance and production performance diverge most sharply at the exact conditions the demo avoided — ambiguous input, stale reference data, and tools that behave differently than documented. Those are harness gaps, not model limitations.
The So What
Before deploying an AI agent, the relevant engineering question is not “how capable is the model?” It’s “how much does it cost when the agent is wrong?” If the cost is low and recoverable, simpler harnesses suffice. If the cost is high — incorrect code committed to production, API calls to external payment systems, messages sent to real customers — the harness needs to match the risk level. Model selection is the last decision in production agent design, not the first.
Source: The New Stack
Content created with AI assistance and reviewed for accuracy.
Join the conversation
Stack Insiders is our free community for readers who want to go deeper — share resources, ask questions, and connect with others across every vertical we cover.
Join Stack Insiders →