AI Agents After the Harness: Verifiability and Evaluation Loops
Agent harnesses have made execution more stable and controllable, but production systems still need reliable evaluation, usable memory, traceable failures, and built-in cost and permission controls. This article explains why verifiability and continuous evaluation are likely to become the next engineering focus, and outlines the evaluation layers and supporting architecture needed to make agent quality measurable and regression-testable.
1. What Agent Harnesses Have Solved
Over the past six months, one engineering concept has dominated discussions about AI agents: the runtime framework, commonly called a harness. Its popularity reflects a real gap rather than a new label. Models provide reasoning and generation capabilities, while production environments require execution that is stable, controlled, and recoverable. The idea that an agent consists of a model plus a runtime framework has therefore become an increasingly common engineering view.
A harness supplies five essential capabilities:
- Context management: Trimming, summarizing, and selectively injecting long conversations and tool responses to prevent context-window overflow and keep important information from being buried.
- Tool-call governance: Standardizing tool descriptions, parameter validation, timeouts, retries, and concurrency controls. This turns “the model wants to call a tool” into “the system permits the call.”
- Error recovery: Distinguishing retryable failures from those requiring human intervention or those that cannot be recovered, while supporting execution from checkpoints.
- State persistence: Saving task state, intermediate artifacts, and checkpoints to external storage so long-running tasks can continue after a process restart.
- Safety guardrails: Filtering inputs and outputs, blocking sensitive operations, enforcing permission boundaries, and maintaining audit trails.
As these capabilities become standardized, long-running tasks become less fragile, giving enterprises greater confidence in deploying agents within real workflows. Yet engineering history suggests that once the execution layer matures, bottlenecks move upward—to evaluation and cognition.
2. Four Gaps That Harnesses Leave Open
Reliable Evaluation and Regression Testing
Traditional software has unit and integration tests. Agent outputs, however, are probabilistic, and execution paths can diverge.
Two runs with the same input may take entirely different steps and both succeed. Alternatively, they may follow the same steps but produce an incorrect result. Without trajectory-level evaluation, prompt or tool changes amount to blind modifications, and production quality problems may surface only through user complaints.
Memory That Is Stored but Not Effectively Used
Many implementations either place the entire interaction history into the context or use vector retrieval for coarse-grained recall.
What is missing is layered memory with distinct roles for working, episodic, semantic, and skill memory. Effective memory also requires write policies, conflict resolution, forgetting mechanisms, and decay as information becomes outdated.
Logs Without Failure Attribution
Agent failures often form a chain rather than a single isolated error:
Incorrect planning → incorrect tool selection → incorrect parameters → incorrect conclusion
Unless trace data captures each step’s inputs, outputs, latency, and token consumption, it is difficult to determine whether the failure originated in the model, a tool, or the orchestration layer.
Cost and Permissions Without Built-In Constraints
Multistep reasoning naturally increases token consumption. When tools have real-world side effects, overly broad permissions create unacceptable risk.
Cost budgets, tiered model routing, least-privilege access, and approval workflows are still often implemented separately for each project, making them difficult to reuse.
3. The Next Focus: Verifiability and Evaluation Loops
My assessment is that, after the harness, the industry’s focus will shift toward verifiability and closed-loop evaluation—a layer that could be called an evaluation runtime.
There are three reasons for this:
- Evaluation is a prerequisite for other optimizations. Context compression, model routing, and memory strategies all involve trade-offs. Without quantitative evaluation, those trade-offs cannot be assessed reliably.
- It shapes how agents are delivered and accepted. Enterprise acceptance depends not on an impressive demonstration, but on reproducible pass rates, regression reports, and clear boundaries of responsibility.
- It complements the harness. The runtime handles execution; evaluation establishes whether the work was done correctly. Together, they form a feedback loop.
The core of this loop is to break “Was the result correct?” into three layers of assessable signals:
| Layer | What Is Evaluated | Typical Methods |
|---|---|---|
| Outcome | Final answer or artifact | Rule-based validation, exact matching, model-based judging |
| Trajectory | Step sequence and tool calls | Required checkpoint coverage, unauthorized-call detection, step-count limits |
| Process | Cost, latency, and stability | Budget constraints, latency percentiles, variance across repeated runs |
An illustrative evaluation loop:
def eval_loop(agent, cases, judge, budget):report = []for case in cases:runs = [agent.run(case.input, budget=budget) for _ in range(case.k)]scores = [judge(case, r) for r in runs]report.append({"id": case.id,"pass_rate": sum(s.passed for s in scores) / len(scores),"avg_steps": mean(s.steps for s in scores),"avg_cost": mean(s.cost for s in scores),"illegal_calls": sum(s.illegal_calls for s in scores),})return report # Use as a regression baseline; compare every change against it.
Three engineering principles matter here:
- Build test cases from real failures, rather than relying on invented scenarios.
- Decouple the judging model from the execution model to reduce shared-model bias.
- Make evaluation regression-testable. Run the same baseline whenever prompts, tools, or models change.
4. Supporting Architecture
Putting an evaluation loop into production requires three supporting capabilities to mature alongside it.
Unified Tracing and Replay
Assign a trace ID to every execution and record planning steps, tool calls, retrieval hits, model responses, and artifact versions.
Replay by trace ID can help turn intermittent production failures into reproducible test cases.
Layered Memory and Reusable Skills
Abstract successful trajectories into reusable skills, and label failed trajectories as a repository of counterexamples.
The goal is to accumulate experience, not merely add more context.
Built-In Budgets and Permissions
Enforce token and tool-call limits at the orchestration layer. Add tiered model routing, two-person approval for high-risk tools, and comprehensive auditing.
Cost control and security should be default properties of the system, not patches added later.
For cloud deployment, these requirements can be supported by a combination of general-purpose services:
- Object storage for trajectories and artifacts.
- Message queues to decouple asynchronous tasks.
- Container platforms for sandboxed tool execution.
- Logging, monitoring, and alerting services for metrics and anomaly detection.
- Model services as entry points for tiered inference.
Baidu AI Cloud offers capabilities in these general service categories and can serve as an infrastructure foundation for evaluation and governance. Availability should be checked for the intended deployment region.
5. Conclusion
Harnesses address whether an agent can reliably complete a task—the first threshold between a demonstration and a production system.
The next threshold is whether its work can be shown to be correct. That requires reproducible evaluation sets, trace data that supports failure attribution, regression-testable quality baselines, and enforceable cost and permission limits.
Teams that turn evaluation loops into reusable infrastructure will be better positioned to move agents from project-specific delivery to platform-level reuse.
