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@latest
AI Agent Evaluation: Grade the State, Bound the Path
AI agent evaluation fails when you grade only the answer or script the path. Use the SBE model: assert end state, bound tool calls, keep evidence.
Published on:
Two agent failures this month illustrate the gap in most AI agent evaluation systems.
On 4th November 2026, Datadog published an experiment comparing two versions of the agent. The quality scores were almost identical (3.84 vs 3.86).
The traces showed that the new model was more likely to pass invalid tool parameters. The judge score didn't tell you how often the calls actually failed.
On 12th November, a developer reported on GitHub that a coding agent had dropped a legacy database schema which it had deemed to be empty. It had only checked that the tables had zero rows in them, not that the API layer still exposed the schema. The user had approved the drop.
According to the user, every REST request then returned a 503, and the app was down for two hours. No data was lost.
Neither failure shows up in the agent's final score. The obvious solution (scripting out the exact path the agent must take) has its own failure mode. This article is about the middle ground.
TL;DR
AI agent evaluation should assess the end state that the agent has produced, constrain the path that it is allowed to take and maintain evidence such that someone other than the agent can re-check. Grading just the final answer allows lucky or cheating runs to go unimpeded. Scripting the exact tool call sequence will fail good agents. We refer to the solution as the SBE model (State, Boundary, Evidence).
What Does an AI Agent Run Need to Pass?
- Deterministic end-state check: Required: Yes. The State, Boundary, Evidence (SBE) model asserts the environment after every run, such as DB rows, tickets, files and API state, instead of grading the agent's reply.
- Exact-order trajectory script: Required: No. Agent trajectory evaluation under the SBE model bounds the path with never-call, must-precede, parameter, tool-surface and budget rules, so a valid shorter route still passes.
- Self-grading by the agent's model: Allowed: No. Fuzzy criteria such as tone go to a grader from a different model than the agent under test, and deterministic checks cover state and tool calls.
- "Unable to verify" counted as a pass: No. A run that leaves no evidence is not a pass, and each scenario runs several times with every run required to pass.
How Does the SBE Model Relate to Agent Evals, Observability and Assurance?
- Agent evals: Agent evals for AI agent testing in CI run each State, Boundary, Evidence (SBE) test card several times, fail the build on any State or Boundary failure, and report fuzzy rubric scores separately.
- AI evals: AI evals that grade only the final answer reward agents that say the right thing. Agent evaluation also grades the environment the agent changed and the tool calls it made along the way.
- AI agent evaluation framework: The AI agent evaluation framework scores readiness across task success, conversation quality, safety and resilience. The SBE model adds the pass rule a single run must meet.
- AI observability: AI observability records what an agent did in production. Evaluation decides before release whether that behavior is acceptable, and each new production failure becomes a new test card.
- AI audit: An AI audit needs a record someone else can re-check. The SBE model keeps the trace, the state diff and the verdict for every agent run in a human-readable form.
- Agent harness: An agent harness runs the agent against seeded state and fixed criteria. An in-house harness meets the SBE model's independence rule when its grader shares neither the agent's model nor its prompt.
- AI assurance: AI assurance is proof that comes from outside the agent. TestMu AI's Agent Assurance grades each criterion as Pass, Fail or Unable to Verify against what the run changed, not what the agent reported.
What Is AI Agent Evaluation?
AI agent evaluation is the process of assessing whether an agent did the right thing to the world, remained within its allowed actions as it did so and left behind some kind of evidence that an independent party could go and verify.
That definition is intentionally narrower than "measuring how good the agent is". It explicitly excludes three things which teams very often confuse with agent evaluation:
- Answer grading only. A transcript that states "your refund is processed" is a claim, not a result.
- Benchmarks. A leaderboard score is a measure of a model on some other people's tasks, not of your agent on your own systems.
- Observability only. Traces tell you what actually happened in production. Evaluation is what determines whether that is acceptable prior to release. (That's the split we looked at in our recent piece on agent observability.)
Anthropic's engineering team draws the same line between a transcript and an outcome.
In 'Demystifying evals for AI agents' (Jan 9, 2026), the outcome is the final state of the environment at the end of the trial. Their example is: did the reservation exist in the database? Not did the agent say it had booked it.
Why Does Marking the Final Answer Fail to Pick Up on Agent Failures?
Final answer grading does not capture agent failures, as an agent can arrive at a plausible answer by luck, by a shortcut or by an unsafe action and in all three cases the response is the same.

The research on coding and tool-use benchmarks makes this concrete:
- The SWE-Bench+ study (2024) found that 32.67% of the 'successful' patches were in fact cheating - the fix was already present in the issue itself or in the comments to the issue. Another 31.08% of the patches that passed were suspicious because the tests were too weak to catch a wrong fix.
- The Agentic Benchmark Checklist paper (2025) notes that benchmark design flaws can lead to under- or overestimation of agent performance by as much as 100% in relative terms. They give the example of TAU-bench, which counted empty responses as successful.
These are public benchmarks which have been carefully created by researchers. Our internal eval suite, which was put together in a sprint, will have the same flaws and will be reviewed by far fewer people.
The point isn't that benchmarks are useless. The point is that a pass is only as good as the check that goes with it. If the check is simply the agent's words, then you've only really tested the agent's words.
Should You Be Looking at the Agent's Path or the Agent's Result?
Grade the outcome, constrain the trajectory. Don't script it. Those are two different jobs, and most eval suites tend to blur the two.
Here's the trap on the other side. In the very same Anthropic post, Claude Opus 4.5 solved a τ2-bench flight booking task by discovering a loophole in the policy. It 'failed' the eval as written but came up with a better solution for the user.
Anthropic's take is that it's often better to judge on what the agent actually produced rather than on the path it took (i.e., the sequence of tool calls) because the latter is so rigid and leads to brittle tests.
We think exact trajectory matching is the XPath locator for agent testing. It'll pass on the day you write it, and the first time the agent finds a shorter route it'll break; the first time a new model re-orders the two calls it'll break; the first time a tool gets renamed it'll break.
The tooling already supports looser matching. LangSmith's trajectory evaluators have four modes: strict, unordered, subset (only the tools from the reference, no extras) and superset (at least the tools from the reference, extras allowed).
The AWS AgentCore evaluation playbook (10 Nov 2026) has exact order, in-order and any-order trajectory checks (all of which require ground truth), plus separate checks for tool selection and tool parameters.
The modes do exist. What most teams are missing is a rule as to which mode you use where.
| Approach | What it checks | What it catches | What it misses | Maintenance cost |
|---|---|---|---|---|
| Final-answer grading (LLM judge or string match) | The agent's response text | Wrong or rude answers | Side effects, false claims of success, unsafe paths | Low |
| Exact trajectory match | The precise ordered tool-call sequence | Any deviation from the script | Nothing on-script, but fails valid alternative routes | High |
| Outcome state assertion | The environment after the run (DB rows, tickets, files, API state) | False success claims, partial work | Unsafe or costly paths that still end in the right state | Low |
| Boundary checks (invariants) | Forbidden calls, required preconditions, parameter validity, budgets | Policy breaches, invalid arguments, runaway loops | Wrong end state if the path stayed in bounds | Low to medium |
| SBE (state + boundary + independent evidence) | All of the above, graded outside the agent | Most of the above, with a re-checkable record | Scenarios you never wrote; needs real scenario coverage | Low to medium |
The SBE Model: State, Boundary, Evidence
The SBE model is a three-part rule for AI agent evaluation: state the end state, enforce boundaries on the path and keep evidence that is independent of the agent under test. A run only passes if all three of those are satisfied.

State: Grade What Changed, Not What Was Said
The state check looks at the environment before and after the run. You seed a known starting state, run the agent and then assert on the result with deterministic checks.
- A returns agent: return record does exist, amount is equal to policy amount, customer has received one confirmation (not two).
- A schema cleanup agent: the target schema is gone, and every API route which was serving traffic previously still returns a 200.
That second point is the one the GitHub incident was missing. "Zero rows" was a stand-in for "unused". A State check actually tests the thing you care about.
Boundary: Write Invariants, Not Scripts
A Boundary is a rule about the path that must be held regardless of the route the agent takes. It allows the agent to find a better way (e.g., the τ2-bench loophole) whilst still failing it for crossing the line.
Five boundary types cover most agents:
- Never-call rules. Tools or arguments the agent must not use in this scenario (no refund above the policy cap, no DROP in a read-only task).
- Must precede rules. Preconditions to a risky action: check the order before you refund it, check what's still dependent on a schema before you drop it.
- Parameter validity. All the parameters in every tool call conform to the tool's schema and business rules. That's the failure that Datadog's traces revealed and which its quality score effectively masked.
- Declared tool surface. The agent will only call tools that it has been granted. That maps to a superset or subset mode rather than strict order.
- Budgets. Caps on steps, retries, cost and wall clock time so a loop fails the test rather than the invoice.
Boundaries are where the deployer's authority becomes testable. It's the company that decides what the agent is allowed to access and do. A boundary check is how you prove that the agent has respected that boundary prior to it being deployed.
Evidence: Keep a Record Someone Else Can Re-Check
The Evidence section asks: if a reviewer, auditor or customer disputes this pass, can they verify it without having to trust the agent?
- Keep the trace. The state diff and the verdict all together per run in a format that a human can read.
- Grade outside the agent under test. The model doesn't check its own work. If you need an LLM to judge on a fuzzy criterion (tone, helpfulness, etc.), then use a different model from the one under test and stick to deterministic checks for anything that can be deterministic.
- Allow "unable to verify" as a verdict. A run where there's no evidence is not a pass. If you count that as a pass, your pass rate will be quietly inflated.
- Repeat the run. One green run is just an anecdote. Run each scenario multiple times and require all runs to pass: the pass^k idea that Sierra introduced for τ-bench, which we discussed in our piece on AI reliability.
- Store the evidence. Where the deploying company has control of it rather than within a vendor's dashboard.
Edge Cases We Stress-Tested
- In-house builds. A team that builds their own evaluation harness can satisfy SBE. Independence means the grader doesn't share the agent's model or prompt; it doesn't mean the grader is from another company.
- Agents should be able to improvise. SBE deliberately leaves the route open. If a team ends up with ten must-precede rules for one task, then the task probably just needs a tighter tool surface rather than a tighter test.
- Fuzzy outcomes. Some of the outcomes are going to be judgments (was the response empathetic?). Those should be treated as rubric scores, reported separately and absolutely never be allowed to override a failed State or Boundary check.
How Do You Write an Agent Test Case With SBE?
Write each agent test case as a card with seven fields. If any field is blank, the test is incomplete (not optional).
The SBE Agent Test Card
- Scenario and persona. The user goal, the persona and any adversarial twist (prompt injection, contradictory instructions).
- Seed state. The precise starting data: accounts, orders, files, feature flags.
- State assertions. Deterministic checks on the final state, i.e., "nothing else has changed".
- Boundaries. Never-call rules, must-precede rules, parameter rules, allowed tool surface, budgets.
- Fuzzy criteria (optional). Rubric items assessed by a grader who is not the model under test.
- Repeat count. How many runs must all pass before the scenario is deemed to have passed?
- Evidence bundle. What gets stored per run: transcript, tool calls (with args), state diff, verdict, grader identity.
Worked Example: A Returns Agent for an Online Store
- Scenario: customer wants to return a jacket they bought 40 days ago. The window for returns is 30 days, with the exception of loyalty members.
- Seed state: customer is a loyalty member; order exists; one return this year.
- State: one return record created (refund amount equal to item price less shipping), one email sent.
- Boundaries:
lookup_orderandcheck_membershipmust come beforeissue_refund; the refund amount must never be greater than the order total; no call toapply_discount; 12 steps max. - Fuzzy: the reply simply explains the exception in plain English.
- Repeat: 5 of 5 must pass.
- Evidence: all of the above stored with the run ID.

If the agent finds a shorter route (e.g., it checks membership first), it still passes. If it refunds prior to looking up the order, it fails, even if the amount is correct.
Where Does Trajectory Checking Pick Up Its Cost?
Check the path only where the path itself is a risk. Everywhere else, grade the state.
Path checks earn their cost in four places:
| Risk area | Examples | Path check |
|---|---|---|
| Irreversible actions | Deleting data, sending payments, emailing customers | Must-precede checks plus an approval step |
| Regulated or audited steps | Identity checks, consent capture, disclosures | Must-call rules with evidence of the call |
| External cost | Paid APIs, compute, third-party bookings | Step, retry and cost budgets |
| Security surface | Tools with write access, credentials, outbound network | Declared tool surface and never-call rules |

Outside of those four, path checks pretty much just add maintenance. That's where you end up with teams rewriting the tests every time the model changes and then just quietly stop running them.
How Does Agent Evaluation Fit In With Release Gates and Observability?
Agent evaluation has to be a gate prior to release, and the production traces should be feeding those new scenarios back into that gate. Observability tells you what happened; the gate tells you what can go live.
The governance gap is huge. In a Gartner survey of 298 I&O leaders (published November 16, 2026), 95% said they'd had at least one agent-related incident over the past 12 months, and only 15% had automatic circuit breakers. Gartner predicts that by 2028, 40% of I&O organizations scaling AI will have a business-critical service disruption if governance doesn't improve.
A practical loop:
- Pre-production - Run the SBE suite on every agent change (prompt, model, tool or policy). Fail the build on any State or Boundary failure.
- Release - Ship behind a containment control: an authorized person can pause or stop the agent mid-task.
- Production - When a trace shows a new failure, write it up as a new test card with its seed state and then add it to the suite.
- Model change - Re-run the full suite when a vendor updates the underlying model even if your code hasn't changed.
Our prediction - The major platforms shipped trajectory, tool selection and tool parameter evaluators this year (as the AWS and LangSmith documentation above confirms).
We expect that by the end of 2027 teams running agents in production will be reporting outcome checks and boundary checks as separate release gates and that exact trajectory match will be used almost exclusively as a debugging tool rather than a pass/fail gate. That's a forecast, not a finding, and we'll come back to it.
Where TestMu AI Fits
TestMu AI builds the independent verification layer that this model needs, across the three ways software is now used.
- Agent ↔ Agent. Agent Assurance (run from the rook CLI) is based on the same principle as the State check: "Grade the effect, not the account". It checks tool calls against the agent's declared tool surface and checks the files, APIs, as well as artifacts that the agent has interacted with. The result is a pass, a fail or Unable to Verify, and teams gate their CI on the JSON report.
- Human ↔ Agent. Agent Testing runs full conversations against chat, voice and phone agents, applies custom, evidence-based pass/fail rules and keeps a recording and transcript of each session.
- Human ↔ Software. Kane CLI checks what coding agents ship in the browser and on mobile. A separate verification stage decides the verdict, and every run leaves an evidence file.
- Scale. HyperExecute runs the browser and mobile suites in parallel, so a more stringent release gate doesn't necessarily mean a slower pipeline.
Does TestMu AI pass its own test? The grader isn't the agent being tested; the checks on state and tool calls are deterministic; 'Unable to Verify' is a first-class verdict and the evidence goes into the files that the customer retains. The setup guides are in the TestMu AI docs.

Conclusion: Make AI Agent Evaluation Prove Something
AI agent evaluation has two easy ways to fail. If you only grade the answer, you're going to reward agents that just say the right thing. If you script the entire path, then you're going to penalize agents that do the right thing in a different way.
The SBE model does neither of those two things: it asserts the State, enforces the Boundaries and keeps the Evidence. Start with your riskiest agent, write five test cards this week and see how many of your current passes survive them.
Shipping agents that other agents use? Rook by TestMu AI does Agent Assurance: agents testing agents before release, with no human in the loop.
npm install -g @testmuai/rook@latest command, or for a full walkthrough of the product.Author
Mayank Bhola is Co-Founder and Head of Products at TestMu AI, where he leads the entire product portfolio across KaneAI, Kane CLI, HyperExecute, SmartUI, the Real Device Cloud, Accessibility, and other software testing product lines. As an early Lead Architect he designed and built the company's flagship Tunnel technology from scratch, created the React-based automation platform, and architected the data-intensive pipelines and FAAS services that scale it. He brings more than 10 years of experience in software development and product engineering, with earlier roles as Head of Technology at Juggernaut Books and Senior Software Engineer at PressPlay TV and Zomato. Mayank holds a B.Tech in Computer Engineering from JIIT Noida.
Reviewer
Maneesh Sharma is Chief Operating Officer at TestMu AI, where he leads the company's revenue functions across go-to-market, sales, RevOps, customer success, and the partner ecosystem, driving its global expansion. He brings over 28 years of experience across product, go-to-market, and business operations. Before TestMu AI he was Managing Director and General Manager for GitHub across India and APAC, Head of Partner Sales and Ecosystem at Adobe, Chief Revenue Officer at WizIQ, and Head of Products and Solutions at SAP India. Maneesh holds an MBA from IIM Bangalore and a B.E. in Electronics and Communications from NIT Surat.
AI Agent Evaluation FAQs
Did you find this page helpful?
More Related Blogs
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
















