BlogGuide

How to Build an AI Agent Evaluation Harness That Survives Production

Oren CohenSources reviewed September 2, 202612 min read

Most AI agent evaluation harnesses produce a score. Far fewer can explain why the score changed. Teams version the prompt while the model alias, tools, fixtures, cases, grader, or threshold moves underneath it, then compare two runs that did not test the same system.

A real harness makes the comparison reproducible. It runs an identified agent version against defined scenarios, captures the full trajectory, applies versioned evaluators, and preserves the evidence behind a release decision. The prompt is one input to that contract, not the contract itself.

The short version

A useful harness is not a score generator. It is a reproducible path from a production failure to a matched test, an attributable change, a release decision, and fresh production evidence.

What an AI agent evaluation harness actually is

A harness coordinates five jobs: select the system under test, create its starting conditions, execute the workflow, capture the full trace, and apply a decision rule. The output should be more than a score. It should be a reviewable receipt showing what ran, under which conditions, how it was judged, and why a candidate passed or failed.

A playground is useful for exploration, but a few manually chosen prompts are not a harness. A leaderboard can summarize results, but it does not establish reproducibility. An LLM judge can grade one dimension, but it does not own the scenarios, execution environment, comparison, or release decision. The harness is the system that binds those pieces together.

Version the harness, not just the prompt

Treat each accepted result as a claim about one exact test contract. The prompt matters, but so do the model configuration, tools, retrieval, routing, state, cases, evaluators, and decision rule. If any material component changed without a new identity, two runs that look comparable may describe different systems.

Component
Outcome contract
Identity to preserve
Target behavior, consequence, acceptance rule, owner
Failure when missing
The harness optimizes a convenient proxy
Component
Agent bundle
Identity to preserve
Prompt, model, parameters, tools, permissions, routing, retrieval
Failure when missing
A result cannot be attached to the system that ran
Component
Scenario set
Identity to preserve
Cases, expected conditions, source, version, protected splits
Failure when missing
Coverage changes silently between experiments
Component
Execution environment
Identity to preserve
Tool fixtures, state, dependencies, timeouts, random seed
Failure when missing
A simulated win depends on unrealistic conditions
Component
Evaluation contract
Identity to preserve
Code checks, judge versions, rubrics, human labels
Failure when missing
The same trajectory receives a different meaning
Component
Decision rule
Identity to preserve
Comparison method, minimum evidence, thresholds, blockers
Failure when missing
A dashboard score becomes an improvised release gate
Component
Run receipt
Identity to preserve
Inputs, outputs, trajectory, errors, costs, timestamps
Failure when missing
A failed or successful run cannot be reconstructed
Component
Release identity
Identity to preserve
Candidate, approval, deployment marker, rollback target
Failure when missing
Test evidence cannot be joined to production behavior

1. Start with one costly failure, not a generic score

Write the failure as a behavior contract: when the agent faces situation X, it must do Y, because doing Z creates a defined consequence. Name the person who can decide whether that contract is correct. Without that owner, the harness can produce precise numbers for the wrong objective.

Start narrow. A pricing agent invents a discount. A support agent resets the wrong account. A router sends billing questions to sales. A research agent cites a source that does not support its claim. One concrete failure gives the first harness version a useful boundary and a falsifiable job.

2. Build scenarios from production evidence

Use reviewed production failures to identify the conditions that made the behavior possible, then create privacy-safe cases that reproduce those conditions. Add clean controls for behavior that already works. Add boundary cases around permissions, missing context, tool errors, long histories, and ambiguous requests when they are relevant to the failure.

Do not copy one incident repeatedly and call it coverage. Separate the underlying failure mechanism from surface wording, then vary the details that should not change the expected decision. Keep tuning cases apart from protected acceptance cases so repeated iteration does not merely teach the visible suite.

Scenario class
Target failure
Purpose
Reproduce the costly behavior
Example evidence
Reviewed production trace or incident record
Scenario class
Clean control
Purpose
Protect behavior the current agent handles
Example evidence
Reviewed successful trajectory
Scenario class
Behavioral variation
Purpose
Test the same rule under different wording or state
Example evidence
Synthetic case tied to the failure hypothesis
Scenario class
System boundary
Purpose
Exercise tools, authorization, routing, and recovery
Example evidence
Tool contract and expected state transition
Scenario class
Ambiguous case
Purpose
Test escalation or abstention
Example evidence
Domain-owner decision with an allowed outcome set

3. Execute the trajectory, not only the final answer

An agent can produce a plausible final sentence after taking the wrong action, calling an unauthorized tool, retrieving stale evidence, or looping through unnecessary steps. Capture the full trajectory: messages, routing decisions, tool calls and arguments, tool results, state changes, retries, latency, errors, and final output.

Control dependencies without making the environment unrealistically clean. Stable fixtures help compare candidates, but the harness should also test expected timeouts, empty results, denied permissions, partial failures, and recovery paths. Every simulated dependency needs a clear contract stating what production behavior it represents and what it omits.

4. Use the cheapest trustworthy evaluator for each rule

Use deterministic code for schemas, permissions, tool arguments, required fields, exact state transitions, and other machine-checkable invariants. Use semantic graders when the requirement genuinely depends on meaning. Use human review to define policy, label consequential examples, calibrate automated graders, and resolve important disagreements.

Do not ask one model judge to collapse correctness, safety, usefulness, style, and business outcome into a universal score. Preserve dimension-level results and the evidence behind them. Measure judge agreement against reviewed labels on the failure slice that matters; a grader that works on ordinary responses may still miss the rare behavior controlling the release.

Decision
Schema or tool argument
Default evaluator
Deterministic code
Escalation
Human review when the contract itself is disputed
Decision
Policy or authorization
Default evaluator
Deterministic rule plus trajectory inspection
Escalation
Policy owner for ambiguous cases
Decision
Meaning or task completion
Default evaluator
Calibrated semantic grader or pairwise review
Escalation
Human label on consequential disagreement
Decision
Style or preference
Default evaluator
Pairwise reviewer or bounded rubric
Escalation
Domain owner when preferences conflict
Decision
Production outcome
Default evaluator
Observed business or operational measure
Escalation
Confounded when attribution is not defensible

5. Compare the baseline and candidate on matched conditions

Run the current agent and candidate against the same scenario identity, starting state, tool fixtures, model configuration, and evaluator contract. Pair each result at the scenario or persona level. Unmatched runs can describe coverage or operations, but they should not decide which version performed better.

Require positive improvement on the targeted behavior and protect material regressions. An aggregate average can hide a challenger that fixed one slice by breaking another. Keep denominators, missing pairs, failed executions, evaluator abstentions, and blocked cases visible instead of silently dropping them from the result.

6. Make the harness testable and reviewable

Version the harness configuration and test its own invariants. A scenario loader should fail on missing required state. A tool fixture should prove it enforces the same permission boundary the test claims to exercise. A grader should have labeled examples showing accepted, rejected, and ambiguous outcomes. A report should retain failures rather than averaging them away.

This is where prompt version control belongs. A prompt can live in Git, a prompt registry, or a deliberate hybrid, but the run receipt must identify the exact effective prompt. The same rule applies to model settings, tool schemas, retrieval inputs, scenario versions, and grader prompts. Git is one implementation; reproducible identity is the requirement.

7. Connect the harness to deployment and production evidence

A passing harness result means the candidate earned consideration for release under the declared test contract. It does not mean the candidate reached production, encountered comparable traffic, or improved the real outcome. Preserve the accepted candidate identity, approval, deployment time, environment, and rollback target so new traces can be joined to the exact change.

After deployment, evaluate the original failure on fresh comparable production evidence. The result can be verified, not fixed, or confounded. Feed reviewed failures back into later scenario versions, but preserve the protected evidence used to judge each release. The harness improves when production teaches it what it missed; it becomes theater when a green score ends the investigation.

Where Converra fits

Converra automates the repetitive path around a targeted production behavior: trace-backed diagnosis, prompt or supported configuration candidates, paired simulation, regression checks, governed delivery, and post-deployment measurement. The customer still owns the outcome definition, data boundary, deployment policy, and final accountability.

Converra does not claim to replace every customer-owned test, tool sandbox, retrieval evaluator, security review, or harness component. When evidence points to code, retrieval, data, permissions, or orchestration outside the supported change scope, that owner and fix type should remain explicit rather than being relabeled as a prompt problem.

Frequently asked questions

What is an AI agent evaluation harness?

An AI agent evaluation harness is a repeatable system that runs an identified agent version against defined scenarios, captures the complete trajectory, applies versioned evaluators, compares results, and preserves evidence for a release decision.

What should an AI agent evaluation harness test?

An AI agent evaluation harness should test the target outcome, full trajectory, tool and permission behavior, state transitions, expected recovery paths, protected successful behavior, and the specific production failure the candidate is meant to fix.

Should prompts be version-controlled inside the harness?

Yes. The run receipt should identify the exact effective prompt, but it must also identify the model settings, tools, state, scenarios, evaluators, and decision rule that made the result meaningful.

How many test cases does an AI agent evaluation harness need?

There is no universal number of test cases. Start with enough reviewed target failures, clean controls, behavioral variations, and system boundaries to support the specific release decision, then report the denominator and missing coverage explicitly.

What is the difference between an eval harness and production monitoring?

An eval harness creates controlled, repeatable evidence for development and release decisions, while production monitoring observes real traffic and dependencies after deployment; reliable teams connect the two without treating either as a substitute for the other.

Stop reading dashboards. Ship the fix.

Converra diagnoses the failure, tests the fix in simulation, and verifies it worked on your real traffic. Connect your production data and see it on your own agent.