Documentation menu

Agent Evaluations

An evaluation is a test of an agent's work. Once the agent has done its job, an evaluation looks at what it produced and answers one question: does this work meet the standard set for it? In Jetty, evaluations are written into the runbook, next to the instructions, and Jetty carries them out as part of every run. Their results add up to the run's verdict: pass or fail.

Why agents need evaluations

Start with an ordinary program. Give it the same input twice and it does exactly the same thing twice. If it worked yesterday, it works today, so a test you ran once tells you something that stays true.

An agent does not behave that way. It is driven by a language model, and the model picks each next step by sampling from many plausible ones. Give an agent the same instructions and the same input twice and it can take a different path each time: open files in a different order, reach for a different tool, phrase its answer differently. Most of those paths end somewhere good, and some do not. That is what non-deterministic means: the result of a run is one draw from a range of possible results, not a fixed answer.

This changes what “it works” means. One good run shows that the agent can do the job, not that it will do it next time. Nor can you take the agent's word for it: an agent that says it succeeded is reporting what it believes, and a model can be confident and wrong at the same time. To know whether a run did the job, something has to examine that run's actual output.

Why evaluate every run

If every run can turn out differently, then every run has to be checked. So Jetty does not evaluate an agent once and trust it afterwards: it evaluates each run while the run is happening, against that run's own outputs. This gives you three things.

  • A verdict on every result. You learn whether a particular output is good before you rely on it, not after something downstream breaks.
  • Coverage of inputs nobody planned for. A fixed test set only contains the cases someone thought of in advance. An evaluation that runs with the job judges the input the job actually received, including ones no one anticipated.
  • A record to learn from. Every run leaves a verdict and the evidence behind it. Across many runs you can see how often the agent succeeds, which checks it tends to fail, and whether a change to the runbook made things better or worse.

That is how an agent's work improves through experience: each run is both a piece of work and a measurement of how well it was done.

Rubric and programmatic evaluation

A runbook is written in one of two patterns, named by the evaluation key in its frontmatter. The pattern decides how the agent grades its own output in the evaluate step and what it iterates on. Both patterns carry the same types of evaluation (code checks, a checklist, and in a rubric, judge scores) and write the same report. The create-runbook skill picks one: rubric by default, programmatic when the task clearly has right and wrong answers.

evaluation: rubricevaluation: programmatic
ForOutput whose quality has several dimensions: reports, content, summaries, images, training materialOutput with a right answer: structured data, extraction, code, API results
The evaluate stepScore the output on each criterion of a table, 1–5, with what 5, 3 and 1 look likeGive each output PASS, PARTIAL or FAIL against criteria written in the runbook
The barAn overall average of at least 4.0 and no criterion below 3Every output passes
In the reportOne judge entry per criterion, with its score and a threshold of 3; the average is checked by a checklist itemStep, checklist and code check entries; no judge entries
IterationRework the lowest-scoring criteria, up to three roundsRerun the failed items with targeted fixes, up to three rounds

A rubric is the agent scoring itself, so treat its scores as the agent's opinion and back the dimensions that matter with code checks or a separate grader. See Rubrics.

The types of evaluation

A runbook can carry four types of evaluation. They differ in who carries them out and in how far the result can be trusted, not in how much they count: each one lands in the run's validation report as an entry, and every entry counts toward the verdict.

TypeWhat it isWho runs it, and whenIn the fix-and-recheck loop?Can the agent skip or misreport it?
Agent checkA check that needs the agent's tools or live session: the issue exists in Linear, the server it started answers.The agent, before it writes its reportYes: a failure sends the agent back to fix the outputIt can leave one out, which is recorded as skipped
Jetty checkA command or a built-in check run against the outputs: the files exist, the JSON parses, the totals reconcile.Jetty, in the sandbox, after the agent has finishedNo: it runs after the agent has finishedNo
ChecklistPlain-language conditions the agent confirms by inspection: the summary names every flagged receipt.The agent, before it writes its reportYes: a failed item sends the agent back to fix the outputIt can leave one out, which is recorded as skipped
JudgeA model or agent handed the output and a criterion, returning a score or verdict with evidence: tone, completeness, relevance.The agent scoring itself against a rubric, a judge model the runbook calls, or a separate grader runYes for a self-scored rubric: a low score sends the agent back to rework it. A separate grader is outside the loopOnly a separate grader is out of the agent's reach

Agent checks and Jetty checks are the two kinds of code check, written under ## Code Checks and told apart by who runs them. Choosing between them is a choice between a result the agent can act on and a result that can be trusted.

Prefer an agent check to let the agent fix the output

Prefer an agent check when a failure should be fixed rather than only recorded. The agent runs it inside its fix-and-recheck loop, so when it fails the agent reworks the output and runs it again before it writes its report. An agent check is either an instruction the agent carries out or a shell command marked executor=agent, which the agent runs itself. The price is trust: the result is the agent's word, and a check it leaves out is recorded as skipped.

Prefer a Jetty check to trust the result

Prefer a Jetty check wherever a command can see what has to be checked: it is deterministic, costs no tokens, and does not depend on the agent under test. It runs outside the fix-and-recheck loop, after the agent has finished, so the agent cannot skip it or claim a result it did not earn. The same fact means a failure cannot be fixed in that run: the output stays as the agent left it, and the failure goes into the verdict.

A condition that matters can have both: an agent check, so the agent catches and fixes the problem in the loop, and a Jetty check with the same command, so the verdict does not rest on the agent's report.

How the report comes together

Every evaluation in a run ends up as an entry in one file, validation_report.json in the results directory. The agent writes it first, and Jetty completes it after the agent has finished.

  1. The agent works and runs its checks. Jetty appends a note to the runbook naming the checks the agent runs and the ones Jetty runs. The agent runs its agent checks and checklist items, fixing and rechecking within its iteration limit.
  2. The agent writes its report and finishes. The report holds one entry per step, checklist item, agent check and rubric criterion it scored. It has no entries for Jetty checks, and any verdict the agent writes is only a hint. Jetty stops every process the agent left behind, then collects the results directory with the report as the agent left it.
  3. Jetty runs its checks. It restores the uploaded assets from its own copy, clones the git sources fresh, and runs each Jetty check in turn against the outputs. Every result is also saved, with up to 16 KB of output, as code_checks.json.
  4. Jetty merges its results into the report.
    • Jetty adds its own entries after the agent's, one per Jetty check, each marked as run by Jetty.
    • It drops any entry the agent wrote for a Jetty check or for an id the runbook never declared, and any entry it cannot read, such as one missing its kind. The run log names each one dropped.
    • If the agent wrote no report, Jetty writes a fresh one. If the file is not a JSON object, Jetty sets it aside as validation_report.agent-invalid.json and writes a fresh one.
    • If the sandbox could not be prepared for the checks, every Jetty check becomes an error entry naming why, so a run whose checks could not run is never reported as passing. The agent's outputs are still saved.
  5. Jetty fills the gaps. It adds a skipped entry for every agent check and checklist item the report leaves out, so the saved report lists every declared check.
  6. Jetty computes the verdict from the merged report and records it on the run, alongside a summary of the counts and failed checks. It logs a mismatch if the agent's own verdict disagreed.

In a runbook with no Jetty checks, step 3 runs nothing and step 4 adds no entries of Jetty's. The agent's report is still cleaned and filled in the same way, and still decides the verdict.

Entry statuses

Each entry in the report has one of four statuses:

  • pass: the check held.
  • fail: the check ran and the outputs did not satisfy it. A judge entry also fails when its score is below its threshold.
  • error: the check could not be carried out: it timed out, its command could not run, it was malformed, or the sandbox could not be prepared for it.
  • skipped: an agent check or checklist item that the agent was to report and left out. A Jetty check is never skipped.

The Code Checks page lists exactly when a code check gets each one.

The verdict

From the finished report, Jetty computes one verdict for the run. The agent's own verdict is never used.

VerdictWhen
failAny check failed: a fail or error on a code check (agent or Jetty) or a checklist item, or a judge score under its threshold. Under strict evaluation, a skipped entry too.
passAt least one check passed, and none failed.
unknownNothing was decided: the runbook declares no checks, the agent wrote no report and Jetty ran no checks, or the report is the old, pre-v2 shape.
  • No partial credit, and no ranking between types. One failed checklist item fails the verdict as surely as a failed Jetty check. What differs between types is how far you can trust a pass, not how much a fail counts.
  • Step entries never count. The step entries that record the agent's progress through the runbook are shown but do not affect the verdict.

Strict evaluation

An agent can finish without reporting every check it was given: it ran out of turns, it forgot one, or it left out a check it was failing. Jetty records each one as skipped, with the message “Declared in the runbook but not reported by the agent”, so a declared check never disappears. What a skipped check does to the verdict is the runbook's choice:

  • By default (strict_evaluation: false), a skipped check is shown but does not count. The verdict is decided by the checks that did report.
  • Under strict evaluation (strict_evaluation: true), a skipped check counts as failed, so the verdict fails. A report that is missing or cannot be read leaves every declared check the agent was to report as skipped, and so fails it too.

Only agent checks and checklist items can be skipped. A Jetty check always produces a result, so strict evaluation changes nothing for a runbook with only Jetty checks and no checklist. Turn it on once a runbook's agent checks are settled, so that an agent cannot pass by leaving out the check it would fail.

YAML
---
strict_evaluation: true   # a skipped check fails the verdict
---

Like the code checks' frontmatter settings, it is copied into the task when the runbook is saved, and a single run can override it by passing strict_evaluation in its init_params. The run's evaluation records whether it was strict.

A failed run and a failed evaluation

Every run answers two separate questions. Its status says whether the job ran to the end. Its verdict says whether the work is good. A failed run is one where the job could not be carried out, so there is nothing to evaluate. A failed evaluation is a run that did the job and produced outputs that fell short of the bar. Jetty keeps them apart: a failing check never fails the run, and a failed run has no verdict.

RunVerdictWhat it means
completedpassThe job ran and every evaluation held.
completedfailThe job ran and its outputs are saved, but at least one evaluation failed. This is the run to investigate: the eval view lists the failed checks first.
completedunknown, or noneThe job ran but nothing was evaluated: a runbook with no checks, an old-style report, or a task saved before evals v2, which has no verdict at all.
failednoneThe job could not be carried out. The run's error says why, and the eval view says the run failed before it was evaluated.
cancellednoneThe run was stopped on request before it finished.

A run fails, rather than completing with a failed verdict, when:

  • a required input has no value, or the runbook has no instruction;
  • a git source for the code checks is unreachable with its credential or its ref does not exist, caught before the sandbox starts;
  • the sandbox cannot be created, or the agent cannot be installed or started;
  • the sandbox session runs past Jetty's hard session limit;
  • the agent writes nothing to /app/results. This is usually missing or invalid model-provider credentials: the agent could not run at all;
  • the platform itself hits an error running the step.

An agent that is stopped at the run's time limit after writing some outputs has not failed the run: the run completes, and the checks decide whether what it left is good enough.

Where to read them

  • In the app, the run list and the run viewer show the run's status, and the eval view shows the verdict with each check, failed ones first.
  • Through the API, a run's record carries status and error, and its verdict as attributes.verdict (pass, fail or unknown), with attributes.evaluation beside it: the counts per type, the failed checks, whether the run was strict, and the rubric's overall_score. The full list of entries is in the runbook step's outputs.evaluation.checks.
  • In the run's files, validation_report.json holds every entry, and code_checks.json the full record of each Jetty check.
  • In webhooks, a run event carries the run's status, not its verdict. Fetch the run to read the verdict.

One detail for API readers: a run that fails inside the runbook step can be stored with status: completed, with the step's outputs.success set to false and its outputs.error saying why. The app shows these runs as failed. To find every failed run, check both the status and the step's success.

Which runs are evaluated

Everything on this page applies to evals v2 tasks: a task saved from the runbook editor once evals v2 is on, from the current runbook templates. A task saved before that runs as it always did: Jetty runs none of its code checks and computes no verdict, and the agent's own report stands as written.

An evals v2 task whose runbook declares no ## Code Checks and no ## Checklist gives Jetty nothing to run, and an agent that writes an old-style report (no "version": 2 and no checks list) leaves the verdict resting on its own claim. The run still goes ahead in both cases, and the run log says which one happened.