AI Agent Assurance for Your Agent Deployments

Agent Assurance Tests How Your Agent Actually Behaves across Workflows, Tools, and Actions to Catch Failures and Vulnerabilities.

npm install -g @testmuai/rook

AI Model Evaluation: How to Evaluate AI Models in 7 Steps

AI model evaluation in 7 steps: metrics for each model type, a scored worked example, how to compare two models, and how to gate a model release on the result.

Summarise with AI

Frontier models gained 30 percentage points in a single year on Humanity's Last Exam, "a benchmark built to be hard for AI and favorable to human experts", according to Stanford HAI's 2026 AI Index technical performance chapter. None of that tells you whether a model routes your customers' billing disputes to a human when it should. Answering that takes AI model evaluation on your own task.

That evaluation needs a held-out set of your inputs, metrics that match the error you can least afford, and a threshold agreed before the run. QA engineers already do most of this work under other names: an evaluation set works like a test suite, and a threshold works like an assertion that someone has to own.

Overview

AI model evaluation measures a trained model on held-out data it never saw, with metrics matched to the task and to the most expensive error. To evaluate an AI model, score the candidate and the current model on the same set, compare the scores with confidence intervals, and release only when a threshold agreed in advance holds.

Steps in AI Model Evaluation

  • Costliest error: A model evaluation starts by naming the release decision and the error that costs most, such as a support model failing to escalate an angry customer. That error picks the metric that gates the release.
  • Held-out evaluation set: The evaluation set holds real inputs the model never trained on, split by user intent and versioned apart from training data, because cases that leak into training inflate every score.
  • Metrics by task: Classifiers use precision, recall and F1, regression models use MAE, RMSE and R squared, ranking uses NDCG, detectors use IoU and mAP, and generated text uses reference overlap or a judged rubric.
  • Confidence intervals: On this article's 28-case sample set, recall of 0.750 on 12 positive cases has a 95% Wilson interval of 0.468 to 0.911, too wide to show that a 0.90 target is met.
  • Release gate and online checks: A CI job exits with a non-zero code when the gating metric misses its threshold. Shadow traffic, canary or A/B tests and drift monitoring then measure the model on live inputs.
  • Models that take actions: When a model drives an agent that calls tools or changes records, prediction scores no longer prove the action happened. For that case, TestMu AI's Agent Assurance (self-serve, with a 14-day free trial) runs the real agent before release and gives each criterion a Pass, Fail or Unable to Verify verdict.

What Is AI Model Evaluation?

AI model evaluation is the process of measuring a trained model's performance on data held out from training, using metrics chosen for the task. It returns numbers rather than a pass or fail, such as recall, error in the target's units or a judged quality score, and a person decides which number is good enough to ship.

Google Cloud's MLOps architecture guide separates two steps: in model evaluation, "the model is evaluated on a holdout test set to evaluate the model quality", and in model validation it is confirmed adequate for deployment, with performance better than a baseline.

Each neighboring term answers a different question:

  • Model testing - checks a specific expected behavior and returns pass or fail per case, such as a rule that malformed input is rejected. One failed case fails the run, and AI model testing covers those checks across the model lifecycle.
  • Model evaluation - scores aggregate behavior across a whole set and returns numbers, so one wrong prediction only lowers a metric.
  • Validation - means either the split used to tune a model before the final test (Step 2), or the confirmation that the model is fit for its intended use.

The NIST AI Risk Management Framework treats them as one discipline. It expects that, after completing the MEASURE function, "objective, repeatable, or scalable test, evaluation, verification, and validation (TEVV) processes including metrics, methods, and methodologies are in place, followed, and documented." It also asks for "performance assessment methodologies with associated measures of uncertainty", which is why Step 6 puts an interval beside every score.

Which TEVV tasks NIST assigns to each phase of the AI lifecycle is set out in the guide to the AI risk management framework.

Evaluations also split by scope. A model eval scores the model alone with the prompt held fixed, while a system eval scores the application built on it, including retrieval, tools and guardrails. A model can improve on its own eval while the system gets worse, so an AI feature needs both, and the guide to AI evals covers the pattern they share.

How to Evaluate AI Models in 7 Steps

Each step produces something a reviewer can read: a written decision, a versioned evaluation set, a metric list, a scoring method, two comparable runs, a threshold with an interval and a gate. Steps 1 to 6 run before release, and Step 7 continues after it.

Step 1: Write Down the Release Decision and the Costliest Error

Start with the decision the evaluation feeds: ship the candidate, keep the current model, or go back to training. Then name the error that costs most. For a support model that decides whether a conversation goes to a human, a missed escalation leaves an angry customer talking to a bot, while an unneeded escalation costs a few minutes of an agent's time.

Write both down with an owner before any run. The costliest error picks the gating metric in Step 3, and writing it first stops the team from choosing whichever metric looks best after the results arrive.

Step 2: Build a Held-Out Evaluation Set From Real Inputs

The evaluation set must hold inputs the model never saw in training. The scikit-learn cross-validation guide calls learning and testing on the same data "a methodological mistake", because a model that repeated the labels it had seen "would have a perfect score but would fail to predict anything useful on yet-unseen data". Draw the inputs from real traffic, so the set looks like what the model will meet.

  • Holdout split - set one test set aside, tune on a separate validation split, and score the test set once, at the end. A small test set gives a noisy score.
  • k-fold cross-validation - train on k-1 folds and score the remaining one, k times; the reported score is "the average of the values computed in the loop", in the scikit-learn guide's words. Use it to choose a model when data is scarce, and keep the final test set out of it.
  • Leakage - once knowledge of the test set reaches the model, through test cases copied into training data or through repeated tuning against the test set, the same guide warns that "evaluation metrics no longer report on generalization performance". Public RAG evaluation datasets carry the same risk: a model that saw their questions in pretraining can answer from memory, and the RAG score credits the retriever. The RAG evaluation tools in our comparison score the retriever on its own, showing whether the retrieved context held what the answer needed.

Then build the set the way you would design a test suite:

  • Partition by user intent - give "refund request", "plan change" and "outage report" each a score beside the headline number.
  • Size each partition for stability - if one flipped prediction moves the metric more than your gate margin, the partition is too small to decide a release.
  • Label the boundary cases first - ambiguous inputs are where model versions differ, and a set of clear cases scores high on every version.
  • Keep adversarial phrasing - angry, terse and misspelled inputs belong in the set beside the polished ones.
  • Freeze a subset - locked cases that must never regress give a stable reference across versions, as a smoke suite does across builds.
  • Record who labelled each case - when labellers disagree, the dispute is over the label itself, and only stored labeller identity shows that.

One labelled case from the sample set in the worked example below looks like this; the model's decision is added at scoring time:

{
  "id": "ESC-03",
  "intent": "billing dispute",
  "input": "You charged me twice for March. Fix it.",
  "label": "escalate",
  "labelled_by": "qa-1"
}

Step 3: Pick Metrics That Match the Task and the Error Cost

Use the task type to shortlist metrics, then use the costliest error from Step 1 to choose the one that gates. When a missed positive is expensive, recall gates the release; when a false alarm is expensive, such as blocking a legitimate payment as fraud, precision does.

Accuracy rarely gates on its own, since it counts a missed positive the same as a false alarm. Keep one gating metric and report the rest, because when every metric can block a release, a small wobble in a minor metric blocks it too.

Step 4: Decide How Each Model Output Gets Scored

Every output needs a scorer chosen before the run. The options trade cost against what they can judge:

  • Code check - an exact or rule-based comparison, such as a matching label, parseable JSON or a number within tolerance. It is cheap and repeatable, and it sees only what the rule encodes.
  • Reference metric - a formula that compares the output with a reference answer, such as BLEU or ROUGE for text. It scales cheaply and rewards wording close to the reference.
  • LLM judge - a second model applies a rubric to each output. It handles open-ended answers at scale, and its own biases mean people must check a sample of its verdicts.
  • Human review - trained raters apply the same rubric. It is the reference for checking every other scorer, and the slowest option.

Use the cheapest scorer that judges the output correctly, and keep a human-labelled sample to check every automated scorer against.

Step 5: Run the Baseline and the Candidate Under Identical Conditions

Score the baseline, which is the current production model, and the candidate in the same job: same evaluation set, same prompt template and settings, same scorer version. A candidate scored this week against a baseline scored last month mixes the model change with every other change in between.

Google Cloud's MLOps guide makes this comparison part of offline validation: you make sure "the new model produces better performance than the current model before promoting it to production". The same guide asks for consistent performance across segments of the data, with the example of a churn model whose overall accuracy improves while its accuracy per customer region varies widely.

For generative models, fix the sampling settings and run each case more than once, because one input can yield different outputs and different scores. Record the model, prompt and scorer versions beside every result. A candidate built on a new decoding method, such as next-concept modeling, belongs in the same job, scored on your evaluation set rather than on its paper's metrics.

Step 6: Set Thresholds and Compare Scores With Confidence Intervals

Set the threshold on the gating metric before the run, with a reason and an owner, for example: recall at or above 0.90, owned by the support quality lead, reviewed every quarter. Then attach an interval to each score, because a score from a few dozen or a few hundred cases is an estimate of how the model will do on the next thousand.

For a rate such as recall, precision or a win rate, the Wilson score interval is a sound default. The NIST/SEMATECH e-Handbook of Statistical Methods notes that the Wilson method was recommended by Agresti and Coull "for virtually all combinations of n and p". The function fits in a few lines:

// Wilson score interval for k successes in n cases
function wilson(k, n, z = 1.959964) {
  const p = k / n;
  const z2 = z * z;
  const den = 1 + z2 / n;
  const mid = (p + z2 / (2 * n)) / den;
  const half = (z / den) * Math.sqrt(
    p * (1 - p) / n + z2 / (4 * n * n)
  );
  return [mid - half, mid + half];
}

wilson(9, 12); // about [0.468, 0.911]

Treat a score as clearing its threshold only when the interval's lower bound is above the threshold. Two models scored on the same cases are compared on the cases where they disagree, because overlapping intervals can still hide a real difference.

For conversational agents, TestMu AI's Agent Testing, built for chat, voice, phone, video and image agents, keeps the threshold in the tool. Chat and voice agents get 9 quality metrics, each scored from 0 to 100%, and the Agent Testing metrics documentation shows a minimum acceptable score from 0.0 to 1.0 per metric, a higher-or-lower-is-better setting for each, and named configurations such as "Strict" and "Default".

Step 7: Gate the Release, Then Keep Evaluating Online

Turn the threshold into a gate: a pipeline job scores the evaluation set and fails the build when the gating metric misses its threshold, as the GitHub Actions job in the CI section below shows.

Live inputs drift away from the evaluation set after release, so evaluation continues on live traffic with the methods in the offline and online section below.

AI Model Evaluation Metrics for Each Type of Model

Choose metrics by the kind of output the model produces. Most classification metrics come from four counts: true positives, false positives, false negatives and true negatives.

The formulas follow the scikit-learn model evaluation guide for classification, regression and ranking, the COCO detection evaluation page for IoU and mAP, the 2002 BLEU paper by Papineni and colleagues, and the 2004 ROUGE paper by Chin-Yew Lin. Read each row by its last column, the failure the metric hides.

Task typeMetricsFormulaWhat it hides
ClassificationAccuracy, precision, recall, F1, AUC-ROCprecision = tp / (tp + fp); recall = tp / (tp + fn); F1 = 2tp / (2tp + fp + fn)Accuracy hides rare positives: a model that never escalates still scores well when few cases need escalation. F1 hides which side is weak.
RegressionMAE, RMSE, R squaredMAE = mean of |actual - predicted|; RMSE = square root of the mean squared error; R squared = 1 - (sum of squared errors / sum of squared deviations from the mean)MAE hides a few large misses, which RMSE punishes, so a wide gap between them flags outliers. R squared hides error size in the target's units, and always predicting the mean scores 0.0.
Ranking and retrievalPrecision at k, recall at k, NDCG at kprecision@k = relevant results in the top k / k; NDCG@k = DCG@k / DCG of the ideal order, where DCG divides each result's relevance by log(1 + rank)Everything ranked below position k. For retrieval inside an LLM application, see RAG evaluation metrics.
Detection and segmentationIoU, mAPIoU = area of overlap / area of union of the predicted and true regions; AP = area under the precision-recall curve, which COCO averages over IoU thresholds from 0.50 to 0.95 and over all categoriesWhich classes and object sizes fail. COCO also reports AP for small, medium and large objects.
Text generationExact match, BLEU, ROUGEexact match = outputs identical to the reference / all outputs; BLEU = geometric mean of modified n-gram precisions times a brevity penalty; ROUGE-N = n-gram recall against reference textsMeaning: a correct answer worded differently from the reference scores low, and a wrong answer that reuses the reference's words can score high.
LLM and chatFaithfulness to sources, answer relevance, task successA rubric score per output from a person or an LLM judge, averaged over the setThe judge's own errors. See LLM evaluation for metric choice and judge setup.
AgentsTask completion, tool-call accuracy, cost per tasktask completion = runs whose end state is correct / all runsThe gap between what the agent reported and what changed, when the score is read from final messages. See AI agent evaluation metrics.

AUC-ROC sits apart: the scikit-learn guide says roc_auc_score summarizes the ROC curve "in one number", and that curve spans every threshold, including ones you will never ship, so report it beside the metric at your chosen threshold.

Worked Example: Scoring a Support Model Before Release

The run below is real and the data is a sample. A Node script scored a 28-case evaluation set for a support model that decides whether a conversation should go to a human, so the positive class is "escalate". The cases and the model's decisions in them were written for this article across four intents; the script and its console output are exactly as run on 2026-10-16.

$ node score-eval-set.mjs support-eval-v1.jsonl
cases scored      : 28 (sample set)
confusion matrix  : tp=9 fp=4 fn=3 tn=12
accuracy          : 0.750
precision         : 0.692
recall            : 0.750
f1                : 0.720
recall 95% CI     : 0.468 to 0.911 (Wilson)

intent           n pos  recall       95% CI   prec
billing dispute  7   4   0.250  0.046-0.699  1.000
refund request   7   3   1.000  0.439-1.000  0.750
plan change      7   2   1.000  0.342-1.000  0.500
outage report    7   3   1.000  0.439-1.000  0.750

gate recall>=0.90 : FAIL
missed escalations: ESC-03, ESC-06, ESC-10
false alarms      : SLF-05, SLF-09, SLF-10, SLF-14
positives to show recall>=0.90 at 0 misses: 35
$ echo $?
1

Accuracy of 0.750 reads as tolerable. Recall of 0.750 means 3 of the 12 conversations that needed a human never reached one, and the script names them: ESC-03, ESC-06 and ESC-10. The gate was written as recall at or above 0.90, so the script exits with code 1.

With 12 positive cases, the 95% Wilson interval on recall runs from 0.468 to 0.911, so any true recall in that range is consistent with these results. The "positives to show" line gives the evidence a pass would need: with zero misses, it takes 35 positive cases before the lower bound reaches 0.90.

The per-intent table shows the defect the headline hides. All three misses are billing disputes, where recall is 0.250 on 4 positive cases, while the other intents caught every escalation. Each per-intent interval is wide because each intent has 2 to 4 positive cases, which is the argument for sizing partitions before trusting them.

Two of the four false alarms, SLF-09 and SLF-10, are plan-change questions with angry or urgent wording, a sign that the model escalates on tone.

The decision is to hold the release. Recall misses the gate, the misses cluster in one intent, and the set is too small to show the target is met even after a fix. The next run needs a fix for billing disputes and a set with at least 35 positive cases.

Model evaluation has no pass or fail of its own: the FAIL in that output comes from the threshold a person wrote into the script. A functional test such as assertEquals(200, response.status) carries its standard inside the assertion, while a recall of 0.750 carries no verdict until someone writes down the number it has to beat, the reason and the owner.

Evaluating Generative Models and LLMs

Generative output is scored in one of two ways: reference-based metrics such as exact match, BLEU or ROUGE compare it with a known good answer, and reference-free scoring applies a rubric, such as faithfulness to the source, through a person or an LLM judge. In G-Eval, a method of the second kind, the judge model follows evaluation steps it wrote itself and weights each possible rating by its token probability.

Check a judge's verdicts against a human-labelled sample before trusting its scores, because judge models carry biases of their own: Zheng and colleagues document position, verbosity and self-enhancement biases in Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena (2023). Rubric design and bias controls are covered in the LLM-as-a-judge guide. For chatbots, the guide to chatbot evaluation shows how to check a judge against human verdicts on a shared sample, step by step.

How to Compare Two AI Models on Your Own Task

Compare two AI models by scoring both on the same held-out set with the same settings and scorer, then reading the difference on the cases where they disagree. A gap in aggregate scores means little without its interval, and a model that ties on quality can still win on cost and latency.

  • Paired reading - for outputs with a right answer, count the cases only one model gets right. Cases both models get right, or both get wrong, carry no information about which one is better.
  • Both orders for judged pairs - a person or a judge picks the better of two open-ended answers. Zheng and colleagues define position bias as "a propensity to favor certain positions over others"; their conservative fix judges each pair twice with the order swapped and counts a win only when both orders agree, otherwise a tie.
  • Win rate with an interval - report wins, losses and ties, then the win rate over decided pairs with a Wilson interval. A lower bound above 0.5 means the candidate is preferred, and an interval that spans 0.5 means there is no winner yet.
  • Cost and latency per successful task - divide total spend by the number of cases that passed rather than the number attempted, and report latency for the passing cases, so a cheap model that fails often does not look cheap.

The script below applies that protocol to sample verdicts written for this article, one per answer order for each of 60 prompts:

$ node compare-models.mjs judgments.jsonl
prompts judged     : 60 (both orders each)
candidate wins     : 31
baseline wins      : 17
ties               : 12 (7 flipped with order)
candidate win rate : 0.646 (ties excluded)
95% CI (Wilson)    : 0.504 to 0.766
verdict            : candidate preferred

Seven of the 12 ties came from verdicts that flipped with the order. The win rate over the 48 decided pairs is 0.646, and its lower bound clears 0.5 by only 0.004, so the candidate is preferred by a narrow margin.

Public leaderboards answer a different question, which model does best on someone else's tasks. The Stanford HAI chapter cited above also notes that "Arena leaderboard standing may partly reflect adaptation to the platform rather than general capability". Use LLM benchmarks to build a shortlist, then decide with the protocol above on your own set.

For agents, function-calling leaderboards have the same limit, and a tool calling benchmark built from your own tools answers the question for your agent.

Public scores need intervals too: on the MMLU benchmark, several leading models differ by less than the test's margin of error.

Offline vs Online Model Evaluation: Which One Can Block a Release?

Offline evaluation can block a release before any user sees the model. Online evaluation measures the model on live inputs, catches inputs the evaluation set never contained, and can stop a rollout or trigger a rollback.

Google Cloud's MLOps guide puts both in its pipeline: offline validation before deployment, then online model validation, in a canary deployment or an A/B testing setup, before the model serves online traffic.

MethodWhen it runsWho sees the candidateWhat it can stop
Held-out evaluation setBefore release, in CINo oneThe release
Shadow trafficBefore promotion, on copies of live requestsNo one: callers get the current model's responsesPromotion to production
Canary releaseDuring rolloutA small slice of trafficThe rest of the rollout, through a rollback
A/B testDuring rolloutThe users in the candidate's armSwitching all traffic to the candidate
Drift monitoringAfter full rolloutAll usersNothing directly; it triggers a rollback or retraining

Shadow traffic is the online method with no user exposure. In Amazon SageMaker AI shadow tests, for example, the endpoint routes a copy of each inference request to the candidate, returns only the production model's responses to the caller, and can log the candidate's responses for offline comparison.

Drift monitoring covers the time after full rollout. Google Cloud's guide recommends tracking summary statistics of your data and the model's online performance, so you can send notifications or roll back when values deviate. Label the drifted cases and add them to the next version of the evaluation set.

Model Evaluation Terms in QA Language

Capgemini's World Quality Report 2025 found that 50% of respondents report their organizations lack AI/ML expertise, unchanged from 2024. Part of what feels unfamiliar is vocabulary: most ML evaluation terms have a testing counterpart, and the third column marks where each pairing breaks.

ML termClosest QA conceptWhere the analogy breaks
Test setTest suiteA suite fails when one case fails. A test set produces one aggregate score, so a wrong answer moves a number instead of failing the run.
Ground truth labelExpected resultExpected results come from the test author. Labels often come from another team, and disagreement between labellers adds noise to the score.
InferenceTest executionExecution is deterministic given the same build and input. Inference on a generative model is not, so two identical runs can produce two different scores.
Held-out / validation splitTest data isolated from fixturesFixture reuse is a tidiness issue. Reusing evaluation data during training is data leakage, and it inflates every score in the report.
ThresholdAssertionAn assertion ships with the test. A threshold is a separate human decision, and the evaluation run does not make it for you.
Regression (metric drop)Regression failureA regression failure names the broken case. A metric drop names nothing, so triage means diffing per-example results between two runs.
BenchmarkSmoke suiteA smoke suite covers your product. A public benchmark covers someone else's task, and a model can be tuned to it without getting better at yours.
LLM-as-judgeAutomated oracleAn oracle is trusted by construction. A judge model is itself a model under evaluation, so it needs its own agreement check against human labels.
DriftFlaky testFlakiness is noise you suppress. Drift is signal that the world changed, and suppressing it hides a real production regression.

The threshold and LLM-as-judge rows need the most care. The first explains why evaluation work stalls when nobody owns the number; the second explains how a score can be wrong with no visible symptom, a risk that grows as teams move from testing AI applications by hand to automated judges.

Running Model Evaluation in a CI Pipeline

The scoring script from the worked example already behaves like a test runner: it exits with code 1 when recall falls below 0.90, and CI platforms treat a non-zero exit as a failed step. A GitHub Actions job needs no plugin:

name: model-evaluation

on: [pull_request]

jobs:
  evaluate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20

      # Your inference step: run the candidate model
      # over the evaluation set, one JSON line per case.
      - name: Run the candidate on the evaluation set
        run: node run-model.mjs > results.jsonl
        env:
          MODEL_API_KEY: ${{ secrets.MODEL_API_KEY }}

      - name: Score the set and gate on recall
        run: node score-eval-set.mjs results.jsonl

      - name: Keep per-case results for triage
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: evaluation-results
          path: results.jsonl

The inference step is yours to write: it runs the candidate model over the evaluation set and writes one JSON line per case with the model's decision. The scoring step is the gate, and the artifact step runs even when the gate fails, so a failed build arrives with the per-case results that explain it.

When the model sits behind a chat agent or a phone caller that you test on TestMu AI, the Agent Testing CLI runs those agents' Chat and Phone Caller evaluations in the same pipeline. It installs with pip install agent-testing-cli, reads credentials from LT_USERNAME and LT_ACCESS_KEY, and starts a suite with agent-testing-cli --project PROJECT_ID run --suite SUITE_ID --yes; a Chat run also needs a workflow ID.

Its exit codes separate a completed test that failed (1) from invalid input (2), an authentication failure (3), an API or TUI dependency error (4) and a polling timeout (5). A Phone Caller run started with --wait polls until the suite finishes, so its exit code can fail the job on a failed test. Chat evaluations run asynchronously and take no --wait, so a Chat step only starts the run; the Agent Testing CLI guide gives that CI command.

Comparing Model Versions When Answers Change Between Runs

Regression testing assumes a stable baseline: run the suite on the old build and the new one, and any case that flips from pass to fail is the regression. Generative models break that assumption, because a repeated prompt can come back with different text on two consecutive calls, so a string diff between versions is mostly noise.

Assertion styles for single outputs are covered in testing non-deterministic AI outputs, and release gates for an LLM upgrade in LLM regression testing. Comparing two versions needs distributions instead:

  • Compare aggregate scores - run the same evaluation set against both versions, compare aggregate metrics, and treat a drop beyond an agreed margin as the regression signal.
  • Set the margin from observed variance - run the current model against the set several times first and set the margin wider than the spread you measure, or run-to-run noise fails builds by itself.
  • Segment before you conclude - a provider's version bump can raise the headline score and still break one intent, the way the billing-dispute partition hid its defect inside a 0.750 recall in the worked example, so compare per-partition scores before signing off a version.
  • Guard the frozen subset - the locked cases get a zero-tolerance gate, the one check with the binary behavior a regression suite is supposed to have.

Evaluating a Model That Takes Actions With Agent Assurance

Every metric above grades an output: a label, a number, a ranking or a block of text. Connect the support model to tools so it opens the escalation ticket itself, and a correct decision no longer proves the ticket exists, because the check has to look in the ticketing system.

TestMu AI's Agent Assurance does that checking, and it is not a model benchmark: it tests your agent, meaning the model with its tools, permissions and data, not the model on its own. Agent Assurance is self-serve, with a 14-day free trial; start by installing Rook CLI from npm and checking the version:

npm install -g @testmuai/rook@latest
rook --version

Rook CLI works on macOS and Linux, and 64-bit Windows through npm or WSL. The npm route needs Node.js 20 or newer, and on macOS and Linux, Homebrew and a shell installer are the other routes, both described in the Rook CLI installation guide. Agent Assurance then works like this:

  • Scenarios derived from the agent - in place of a hand-labelled set, Agent Assurance writes the scenarios itself from the agent's code or its spec. Functional and adversarial scenarios come by default and non-functional ones on request, and the Rook CLI README says the adversarial scenarios are mapped to the OWASP Top 10 for LLM Applications (2025), the OWASP Top 10 for Agentic Applications (2026) and MITRE ATLAS.
  • Runs against staging or CI - it invokes the real agent before release, so a missed escalation shows up as a ticket that was never opened rather than as a wrong label.
  • Evidence where labels used to be - a criterion passes or fails on what the run left behind: the files it changed, the artifacts it produced, its tool calls compared with the tools the agent declares, and records read back with a read-only tool you have approved. The agent's own report of an action is never taken as proof.
  • Unable to Verify kept apart - every criterion is marked Pass, Fail or Unable to Verify. The pass rate leaves out the Unable to Verify results, so it covers only what was checked.
  • Newly failing and fixed - rerunning a suite lists the scenarios that newly fail and the ones that were fixed since the last run.

Unlike the scoring script, a rook run that finishes can exit with code 0 even when scenarios fail, so in CI the exit code only says the run happened, and the gate reads the verdicts from rook report --json.

In Claude Code, an optional skill lets you describe the test in plain language with /rook. The Claude Code setup guide asks for Rook CLI to be installed where Claude Code runs commands; the skill installer needs Node.js 22 or newer and adds only the skill:

npx @testmuai/rook-skill@latest install \
  --agent claude-code

For the support model from the worked example, wired to an escalation tool, a first request with tight bounds might read as below. Claude Code still asks for its usual approvals, and loading /rook grants no permission to run shell commands or write to the target.

/rook Test the support agent in this repository
that hands tickets to a human through an
escalation tool. Use the staging profile, propose
up to three scenarios where escalation is required,
and show me the possible writes before invoking
the target.
Start a 14-day free trial of Agent Assurance by TestMu AI, with 4,000 credits, to test how your AI agents behave across workflows, tools, and actions

Start AI Model Evaluation With One Release Gate

Write down one release decision this week: the costliest error, the metric that punishes it, and a threshold with an owner. Then score the current model and the candidate, with intervals, on a frozen held-out set built from real inputs, and put that scoring job in CI so the next model change has to pass it. The guide to building a golden dataset covers sizing that set for the decision it gates and versioning it like code.

When the model starts acting through tools, run Rook CLI against a staging copy of the agent before it ships, starting from the Agent Assurance quickstart.

Testing an AI agent? TestMu AI's Agent Testing validates chat, voice and IVR agents before your customers talk to them.

To run your first test, start free, or
for a full walkthrough of the product.

Was this helpful?

Authors

Anubhav Singhmaar

Anubhav Singhmaar

Author · 71 posts

Anubhav Singhmaar is an AI Product Manager at TestMu AI driving Kane CLI, the command-line tool that brings browser automation to the terminal, turning natural-language flows into runs in a real Chrome browser that return pass or fail with shareable proof. He owns the roadmap and prioritization and works with engineering to ship developer-facing features. Before TestMu AI, he spent over four years at Sprinklr owning enterprise voice AI across APAC and EMEA. A mechanical engineer turned product manager, he grounds guidance in real QA workflows.

Sandeep Yadav

Sandeep Yadav

Reviewer

Sandeep Yadav is a Senior Software Engineer at TestMu AI, where he builds the platform's test intelligence and AI-native engineering systems. He has architected autonomous GitHub Apps, vector-search code intelligence, and self-diagnosing QA workflows, and designed distributed platforms that process 2M+ daily test executions and 1B+ events, turning high-volume test, log, and code data into intelligent, self-optimizing systems. He works on embedding reasoning models into production infrastructure to power autonomous review, root-cause analysis, and analytics workflows. He brings over four years of engineering experience with deep expertise in the Elastic Stack, Apache Kafka, and Redis. Earlier he engineered a GDPR-compliant, end-to-end-encrypted secure web-chat application at Mithi. A Facebook Hackercup 2021 Round 2 qualifier and merit-scholarship recipient, Sandeep holds a B.Tech in Electrical Engineering from Delhi Technological University.

AI Model Evaluation FAQs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests