Skip to main content
An evaluation grades calls your agent has already had. Judges check each call, and a scorecard turns their verdicts into a score. zeroruntime evals runs evaluations from your terminal, on live calls or on the conversations of a simulation run. Judges, scorecards, and runs are the same ones you see in the dashboard. See Evaluations to work with them there.

Quick start

Run these from your project folder, the one with zeroruntime.yaml:
evals init fills in agent from agent.id in zeroruntime.yaml. If the project isn’t deployed yet, set agent in evals/evals.yaml or pass --agent.

How a call is graded

Each judge answers one question about a call and gives a verdict: There are three kinds of judge: Every judge has a category:
  • Accuracy: did the agent do the right thing, such as reaching the caller’s goal or quoting the right price.
  • Experience: how the call felt, such as tone, pace, and response time.
  • Diagnostic: signals to look into, such as speech recognition errors. They’re never scored; a failed diagnostic judge shows up as a flag.
Each graded call gets a status: A run’s accuracy is the share of graded calls in which every accuracy judge passed, and experience is the same for experience judges.

The evals/ folder

Judges and scorecards live in your repo as YAML, so you can review and version them like code. The CLI reads evals/ from the folder you run it in.
Each judge and scorecard file has an id, which is also its file name. Use lowercase letters, numbers, and _, up to 64 characters. judges and scorecards can’t be used as ids.

Settings

evals/evals.yaml sets what evals run grades and the bar a run must clear.
evals/evals.yaml
evals init copies judges and scorecard from the agent’s automatic grading settings when it has them. Quote values that start with * in YAML, such as ["*"].

Judge

evals/judges/pricing.yaml
session gives the judge the call’s start time and duration, and scenario gives it the simulated caller’s scenario. Use scenario only for judges that grade simulation runs. To grade on a scale, give a judge 2 to 6 levels, each with a score from 0 to 1. The judge picks a level, and the call passes when that level’s score reaches pass_at, or the highest level’s score if you leave pass_at out:

Metric judge

A metric judge passes when every condition it can measure holds, and answers can’t tell when it can measure none of them. op is <=, >=, <, >, or between (with max):
evals/judges/fast_replies.yaml
With a curve, the judge’s score follows the curve instead of being all or nothing: here a call scores 1 at 800 ms or less, 0 at 3000 ms or more, and in between in proportion. A judge has up to 20 conditions, and a curve 2 to 20 points. Run zeroruntime evals metrics to list every metric with its unit. Metrics marked needs the recording only work on recorded calls.

Scorecard

evals/scorecards/sales_qa.yaml
A call’s score is worked out like this:
  1. Each judge gives a score from 0 to 1: 1 for a pass and 0 for a fail, or its level or curve score.
  2. Each group’s score is the weighted average of its judges’ scores.
  3. The call’s score is the average of the group scores, weighted by groups, times out_of. A group with no graded judges is left out.
  4. If a knockout judge failed, the score is capped at its cap. With more than one, the lowest cap applies.
Diagnostic judges are never part of the score. Every account has a built-in scorecard, default, with the values above and no judge weights. It can’t be changed or deleted.

Create files

new asks for each field and checks every answer as you type it. With -y it writes a template with empty values instead, which evals validate reports until you fill it in. Then run evals validate and evals push.

Run an evaluation

Pick the calls to grade with one of --session, --since or --from, or --simulation:
Flags override evals.yaml. evals run:
  1. Finds the calls, and shows how many will be graded, how many are skipped and why, the judges, the scorecard, and the estimated cost.
  2. Asks you to confirm (--yes skips it).
  3. Starts the run and prints each call’s status, score, and the reason as it’s graded.
  4. Prints a summary with the gates from evals.yaml, the top failing judges, and exits with a status code.
Press Ctrl-C during a run to stop it, keep watching, or detach and leave it running. Stopping keeps the results of calls already graded. --judge takes judge ids or globs, separated by spaces or commas, and --category keeps only judges of that category. A judge must be on the dashboard to be used, so push new judges first. To grade calls to an agent you ran on your machine with zeroruntime run, pass the agent id it ran under (ZERORUNTIME_AGENT_ID in your .env) with --agent.

Skip rules

Skip rules leave out calls that aren’t worth grading. Skipped calls aren’t charged. Set them under skip in evals.yaml, or override one for a run with --skip:

Cost

AI and audio judges are charged for the tokens the judge model uses on each call. Metric judges, skipped calls, dry runs, and rescoring cost nothing. The estimate is based on what this agent’s recent graded calls cost, so the first run of an agent has no estimate.

Grade calls automatically

Grade an agent’s calls as they happen, without running anything:
Flags you don’t pass keep their current value. Skip rules use their defaults. Automatic runs show up with zeroruntime evals runs list --trigger auto.
Automatic grading needs an agent that exists on your account: deployed with zeroruntime up, built in Agent Builder, or self-hosted with a registered worker. To grade a local agent’s calls, use evals run.

Run in CI

  • --yes skips the confirmation prompt.
  • gates in evals.yaml set the accuracy, experience, and score a run must reach.
  • evals diff --fail-on-drop fails when accuracy, experience, or any judge’s pass rate drops by more than that many percentage points.
To test a change end to end, run a simulation, then grade its run with evals run --simulation.

Exit codes

evals diff exits 1 when a rate dropped past --fail-on-drop, and 0 otherwise.

Review results

evals show with a run id prints the run’s summary and a row per call: its status, score, band, and the reason. The A, X, and D columns count the call’s accuracy, experience, and diagnostic verdicts: With a call id, evals show prints the call’s score and band, any knockout, and every judge’s verdict with its reason and quote, grouped by category. Each scored judge shows the points it gained and lost. Add --transcript for the conversation and --json for the raw response. For a simulation conversation (sims_…), pass the run with --run.

Stop, rescore, and compare

Stopping keeps the results of calls already graded. rescore scores a finished run’s verdicts with another scorecard without calling any judge again, so you can try weights and bands for free. diff compares two runs’ accuracy, experience, each judge’s pass rate, and average score. Each run keeps a copy of the judges and scorecard it was graded with, so editing or deleting a judge later doesn’t change past runs.

Sync with the dashboard

evals init writes every judge and scorecard on your account, including the standard judges and the default scorecard. To sync after that:
Files are matched to dashboard items by id. push creates the ones that don’t exist yet and updates the ones that changed. pull writes the ones you don’t have and keeps files that differ from the dashboard unless you pass --overwrite. Standard judges and the default scorecard are read-only: push skips them, and delete refuses them. To change one, copy its file to a new id. Deleting a scorecard that an agent grades with automatically moves that agent to default; delete tells you which agents first and asks before deleting. See the CLI Reference for every command and flag.