Skip to main content

Agent Eval Harness: 6 Essential ADLC Steps to Build First

· 17 min read
Vadim Nicolai
Senior Software Engineer

Six of the eight agent vendors I surveyed ship an evaluation runner as product code. IBM, Salesforce, AWS, Databricks, Google and Microsoft each give you a command or function that runs your agent against a test set and scores it. Only one of them writes down the rule that makes the runner useful, and that rule lives in a sample skill, not in the product.

Agent Development Lifecycle, a 10-part series. ← Part 3

An agent eval harness is a fixed task set, graders, and a recorded baseline run. Use code graders where code can decide and an LLM judge only where it cannot. You build the harness before you change prompts, tools or models. Each change is then scored against the baseline, one change at a time.

My thesis is that in the agent development lifecycle (ADLC), the harness comes before you change the agent. Without it, every prompt tweak, tool swap and model upgrade is a guess presented as progress. Some practitioners disagree, and they are partly right. I narrow the thesis below.

Everything here was read, not run. The vendor claims come from source files and READMEs on GitHub, recorded as returning HTTP 200 on 2026-11-26. The LangSmith material comes from documentation pages fetched the same day. I executed none of it, including the code below.

An Unscored Change Is a Guess, So the Baseline Comes Before the Agent Changes​

"ADLC" is a practitioner and vendor term. The research behind this piece found no peer-reviewed definition of it. Each vendor places evaluation inside its own lifecycle story:

The "six steps" in the title are my synthesis, not a standard.

The clearest statement of the rule comes from Databricks' agent skill for MLflow evaluation:

"For a new evaluation, establish a baseline with a fixed dataset and scorers, change one thing, then run the same evaluation again." — Databricks (2026)

That sentence contains three constraints, and each one blocks a specific failure:

  • A fixed dataset stops you from comparing scores taken on different test sets.
  • Change one thing stops you from crediting a score change to the wrong cause.
  • The same evaluation again stops you from swapping graders between runs and mistaking grader drift for agent improvement.

Suppose you upgrade the model and rewrite the system prompt in one commit, and the score drops. You now have two candidate causes and no evidence to choose between them. If you revert both, you may throw away the change that helped.

LangSmith's evaluation concepts page puts this work before deployment. It says to "Use offline evaluations for pre-deployment testing," and it names "Regression testing: Ensure new versions don't degrade quality" as a core use (LangChain (2026)). "Regression" assumes there is something to regress from. The baseline is that something.

The Three Runners I Could Read All Take a Dataset, Graders and a Way to Call the Agent​

I can show signatures or docstrings for three runners: MLflow, AWS and LangSmith. All three have the same shape.

MLflow's evaluate signature shows it most compactly (MLflow (2026)):

def evaluate(
data: "EvaluationDatasetTypes",
scorers: list[Scorer],
predict_fn: Callable[..., Any] | None = None,

It takes data, scorers, and a function that calls the system under test.

AWS's AgentCore on-demand runner describes the same shape in its docstring. For each scenario in the dataset, the runner "1. Invokes the agent for each turn (run_scenario). 2. Collects spans via the span collector (collect_spans). … 4. Sends the requests and collects results (run_evaluations)" (AWS (2026)).

LangSmith states what the dataset is for: "Offline evaluations target examples from datasets: curated test cases with reference outputs that define what "good" looks like" (LangChain (2026)). Your reference outputs are your requirements, whether or not you meant them to be.

LangSmith's baseline call puts all three inputs in one place. This is adapted from the docs, with the metadata dict written inline using the documented models, prompts and tools keys (LangChain (2026)):

results = ls_client.evaluate(
toxicity_classifier,
data=dataset.name,
evaluators=[correct],
experiment_prefix="gpt-5.4-mini, baseline", # optional, experiment name prefix
description="Testing the baseline system.", # optional, experiment description
max_concurrency=4, # optional, add concurrency
metadata={"models": ["gpt-5.4-mini"], "prompts": ["baseline"], "tools": []}, # optional, used to populate model/prompt/tool columns in UI
)

The dataset is data=dataset.name, managed through LangSmith's dataset management tooling. The grader is evaluators=[correct]. The named run is experiment_prefix. The metadata line records which model, prompt and tool configuration produced the run. Without it, nobody can audit "change one thing" after the fact.

Two caveats apply. First, the target is toxicity_classifier, a single-call classifier, not a multi-step agent. Agents need evaluators over the execution trajectory, which LangChain's agent testing guide covers. Second, I fetched this snippet but did not run it.

For IBM, Salesforce, Google and Microsoft, the material shows command names and docstrings but no input signatures. My inference is that the three-input shape generalizes.

The Strong Form of "Graders First" Is Wrong; Fixing the Dataset First Is Right​

Here is the opposing view, as its advocates would state it:

You cannot write good graders before you have seen the agent's outputs. A grader written up front encodes guesses, and a baseline scored by guessed graders gives false confidence. Build a rough agent, read what it does, then write the evals.

Its strongest support comes from a vendor. Anthropic's skill-creator skill tells the author to save the test cases to a file first, then: "Don't write assertions yet — just the prompts." — Anthropic (2026)

The research literature backs the concern about step-matching graders. In WebCanvas, Pan et al. (2024) find that metrics focused on action-prediction accuracy "can falsely penalize valid alternative solutions." That transfers because of its mechanism: a trajectory grader asserting "called tools in this order" matches one reference path, exactly as an action-prediction metric does.

The timing point is my inference. A step-matching grader written before you know the valid paths is the one most likely to encode a single path as the only correct one. A model upgrade that finds a shorter tool path would be scored as a regression, and you would roll back a better model because your grader was frozen too early.

So I concede the point on assertions. The "write all graders first" version of my thesis is wrong.

The opposing view still doesn't win the whole argument. The Anthropic instruction fixes the prompts first and delays the assertions, not the dataset. The Databricks rule is about controlling what you compare. Both freeze the inputs before anything else moves.

That gives the narrowed thesis:

  • Freeze the dataset first.
  • Capture the unchanged agent's outputs before changing it.
  • Write graders against those outputs, and re-score the stored run whenever a grader changes, so comparisons stay like-for-like.

Nothing in this material shows that harness-first teams ship better agents than agent-first teams. The argument rests on vendor guidance and reasoning about attribution, not an outcome study.

Code Graders Decide What They Can; the LLM Judge Gets Only the Leftovers​

LangSmith describes code evaluators plainly: "code evaluators use deterministic logic you define" (LangChain (2026)). Its own example is two lines long (LangChain (2026)):

def correct(inputs: dict, outputs: dict, reference_outputs: dict) -> bool:
return outputs["class"] == reference_outputs["label"]

If a property can be checked this way, checking it any other way is waste. That covers a field value, a tool called with the right argument, a record written, or a file changed.

LLM judges exist for what code cannot decide:

  • MLflow's make_judge(name: str, instructions: str, ...) builds a judge from a natural-language rubric (MLflow (2026)).
  • Microsoft's TaskAdherenceEvaluator subclasses PromptyEvaluatorBase, which marks it as a prompt-driven judge (Microsoft (2026)).
  • LangChain covers both kinds: "Evals use evaluators to assess your agent's execution trajectory, either via deterministic matching or an LLM judge" (LangChain (2026)).

I'd defend three tiers, in this order.

Final-state checks in code are the primary signal. Pan et al. name the cost honestly: outcome-based evaluation "requires fully reproducible standalone web environments" (Pan et al. (2024)). For an agent with side effects, that means a resettable test environment. That is real build work, but the alternative trades an infrastructure cost you can see for a grading error you can't.

Trajectory checks in code come second, and only for constraints you actually care about. "Never called the delete tool" belongs here. "Called tools in exactly this order" does not.

The judge comes last, for adherence, tone and helpfulness.

I am deliberately not quoting judge-agreement or judge-bias numbers; I could not trace the ones in circulation to a primary source.

Six of Eight Vendors Ship a Runner as Product; OpenAI and Anthropic Leave It to You​

IBM ships @evaluation_app.command(name="evaluate", help="Evaluate an agent against a set of test cases"), with red-teaming on the same CLI (IBM (2026)).

Salesforce ships sf agent test run and a beta run-eval. AWS ships the OnDemandEvaluationDatasetRunner. Databricks ships mlflow.genai.evaluate and make_judge.

Google ships adk eval, with the docstring "Evaluates an agent given the eval sets" (Google (2026)).

Microsoft ships the "Evaluate API - Python API to evaluate dataset or application using built-in or custom evaluators" (Microsoft (2026)).

OpenAI's maintained Agents SDK has no graded eval runner. openai/evals still exists, but its last push was 2026-04-14. The simple-evals README is blunt: "July 2025: simple-evals will no longer be updated for new models or benchmark results" (OpenAI (2025)).

Anthropic has no product harness in the Agent SDK. Its loop exists only in the skill-creator sample quoted earlier. If you build on the OpenAI or Anthropic SDKs directly, harness-first is a discipline you impose, not a default you inherit.

Salesforce grades server-side and clamps batches at five​

The @salesforce/agents library under the CLI POSTs tests to the Einstein evaluation API (Salesforce (2026)):

url: 'https://api.salesforce.com/einstein/evaluation/v1/tests',

Your grading runs on infrastructure you don't control. Separately, the beta run-eval command clamps batch size (Salesforce (2026)):

const batchSize = Math.min(Math.max(flags['batch-size'], 1), 5);

That is a throughput limit, not guidance on how many cases to write.

AWS's CI gate is a sample​

The workflow that fails a pull request below a 0.8 threshold lives in the agentcore-samples gated-evaluation workflow, not in the SDK. The runner is product. The gate is something you copy and own.

Google's failure analysis is experimental​

agents-cli eval compare ("Compare two eval result files") is product (Google (2026)). Failure clustering is labelled "[Experimental] Analyze failure clusters from an evaluation run result JSON file" (Google (2026)).

A Grader That Gates or Optimizes the Agent Must Be Harder to Game Than One That Reports​

A grader that only reports can be wrong, and the damage stops at a misleading chart. A grader that acts is a different object.

MLflow's JudgeGuardrail reuses a judge at runtime: "For VALIDATION actions, blocks if the judge returns a failing value" (MLflow (2026)). A judge you wrote for the offline harness can become the thing that rejects a live user's request.

Google's ADK ships adk optimize: "Optimizes the root agent instructions using the GEPA optimizer" (Google (2026)). The same docstring says the sampler config "contains the eval config and the eval sets to use for training and validation during optimization." So candidates are scored against eval sets, and the grader stops measuring the agent and starts selecting it.

An optimizer that keeps whichever instructions score highest will find whatever your grader under-penalizes and amplify it. If your judge rewards confident-sounding answers, the optimized prompt will sound confident, whether or not it is right.

So a reporting grader must be accurate, and a gating or optimizing grader must also resist gaming. Before you wire a judge into a guardrail, a CI threshold or an optimizer, deliberately write outputs that are wrong but well-phrased, and check whether they score well.

Choose the Harness by Where Your Agent Already Lives​

OptionWhat it costs youBetter when
Vendor-native runner (sf agent test run, adk eval, orchestrate evaluations evaluate, AgentCore runner)Lock-in to the platform's agent and dataset format. Server-side grading and a batch cap of 5 on Salesforce's beta run-eval. CI gate is a sample on AWS. Failure clustering is experimental on Google.The agent already lives on that platform and you won't port it.
MLflow (mlflow.genai.evaluate + make_judge)You write the dataset, scorers and predict_fn yourself. The ecosystem centres on MLflow/Databricks.You want framework-agnostic evals, or plan to promote a judge into JudgeGuardrail.
Hosted service (LangSmith ls_client.evaluate)Datasets and results live with a third party.You want dataset management and experiment comparison in a UI without building them.
Roll your own (the de facto path on OpenAI's SDK)You own the runner, storage and comparison, with no maintained OpenAI grader runner.You need full control or have no platform dependency.

The source material covers no pricing, latency, or build-effort figures for any option. Measure those yourself before you budget.

Keep the dataset and code graders in a format you control: plain JSON and plain functions. Then adopt the runner native to your platform, or MLflow if you have no platform. The dataset and graders are the asset. The runner is the replaceable part.

Six Steps to Build Before the Next Prompt Change​

Loading diagram…

This sequence is my synthesis, not an industry standard. It satisfies the Databricks rule, which requires a baseline with "a fixed dataset and scorers," by separating running the agent from scoring the run.

  1. Freeze the task prompts. Write the inputs before any assertions, the order Anthropic's skill-creator uses.
  2. Store the unchanged agent's raw outputs, along with model, prompt and tool metadata. Nothing is scored yet.
  3. Add code graders and score the stored run. Check final state first. Add trajectory constraints only where a path is genuinely forbidden.
  4. Add an LLM judge for the remainder, written after reading the stored outputs. Re-score the stored run after every grader addition or revision.
  5. Change one thing and re-run the same evaluation. Use a compare command where one exists, such as agents-cli eval compare.
  6. Harden any grader before it gates or optimizes.

Steps 2–4 assume your runner can re-score stored outputs without re-invoking the agent. I have not confirmed that any of these runners supports it.

One deliberate omission: no step runs a task more than once. Agents are non-deterministic, so a single run per case can mistake luck for improvement. Repeated trials are out of scope because no vendor source in this material shows a repeated-trial feature.

FAQ​

How many cases do I need before the first run? The sources give no number. Salesforce's cap of 5 is a batch size, not a dataset size. My rule of thumb: start with as many cases as you can hand-review, and grow the set as new failure modes appear.

Where do offline and online evals sit in the ADLC? LangSmith positions offline evals as pre-deployment and regression testing. The material quotes no vendor on online evals or production drift.

Can the agent's own model grade it? The sources here don't settle it, so I'm leaving the question open.


The vendors productized the dangerous transition. A judge becoming a runtime gate is product at MLflow, and an optimizer over agent instructions is product at Google. What stays a sample, an experiment or a skill is the work that should come before that transition: the CI gate, failure analysis, and the baseline-first rule itself.

You can give a grader power over your agent with one command. Testing whether it deserves that power is still your job.

Series: ADLC, Part 04. Next: Part 05.