AI Agent Evaluation Moves from Vibes to Quality Gates: A Three-Layer Framework That Actually Ships
Your AI agent passes demos but fails in production? Motorway's three-layer evaluation framework cut their error rate from 1-in-8 to 1-in-50. Here's the pattern that actually ships.

Motorway, a UK car marketplace running daily auctions where 8,000 dealers bid on 2,500 vehicles, had a problem that will sound familiar to anyone shipping AI agents: the agent gave confident answers, but nobody could prove it worked reliably when real money was on the line. Tool selection errors eroded dealer trust. Semantic search misinterpretations returned irrelevant results. Multi-turn conversations drifted, losing refinements dealers had carefully specified. And the non-deterministic nature of LLM outputs made single-trial testing essentially useless.
In Brief
AWS and Motorway published a production blueprint this week demonstrating how to evaluate AI agents using a three-layer framework (tool usage, reasoning, output quality) combined with the pass^k metric for measuring consistency across repeated trials. The approach reduced incorrect results from 1 in 8 queries to 1 in 50 and cut issue detection time from hours to minutes. For Bulgarian teams building agentic systems, this pattern offers a concrete alternative to the “ship it and pray” approach that dominates most agent deployments.
If these evaluation patterns resonate with your current agent work, ISTA 2026 in September is where Bulgarian engineers compare notes on what actually survives production.
Pattern Name: Three-Layer Agent Evaluation with Quality Gates
Why This Is Important: Adoptable. The pattern has production evidence from a high-stakes financial use case (real-time auctions with dealer money), open-source tooling (strands-agents-evals), and managed infrastructure (Amazon Bedrock AgentCore Evaluations). Teams can implement the framework today without waiting for ecosystem maturity.
Domain: AI / DevOps
Who Should Care: DevOps/SRE, Backend, QA, Manager
Level: Intermediate
Evidence Type: Case Study
The Problem
Most teams evaluate AI agents the same way they evaluate language models: run a few tasks, inspect the final output, assume everything works. This approach misses the failures that matter most.
An agent can reason correctly about what to do and then call the right tool with malformed arguments. It can select the correct tool, pass valid arguments, and still produce a plausible-sounding response that is factually wrong. It can succeed on a single trial and fail three out of four times when you actually need it to work reliably.
The Motorway case study published by AWS quantifies this gap: their dealer stock search agent initially returned incorrect results on 1 in 8 queries. For a system where dealers make purchasing decisions based on search results, that error rate was unacceptable.
Research from τ-bench found that agents achieving 60% pass@1 on benchmarks may exhibit only 25% consistency across multiple trials. The agent that succeeds more than half the time on a single run might fail three out of four times when you actually need it to work reliably.
What Changed
The Strands Agents SDK now includes strands-agents-evals, an open-source evaluation library that implements a three-layer assessment framework. Amazon Bedrock AgentCore Evaluations provides production monitoring with both on-demand and online evaluation modes. Together, they enable a five-stage deployment pipeline with quality gates that block releases when metrics fall below thresholds.
The three layers assess distinct failure surfaces:
Layer 1: Tool Usage (threshold >95%) checks whether the agent selected the correct tool and passed well-formed arguments. This layer uses code-based deterministic graders because tool selection is objectively verifiable.
Layer 2: Reasoning (threshold >85%) evaluates whether the agent’s chain of thought was coherent and whether intermediate steps made sense. This layer uses LLM-as-judge graders because reasoning quality is subjective.
Layer 3: Output Quality (threshold >90%) measures whether the final response actually answered the user’s question correctly. This layer combines LLM-as-judge for quality assessment with human review for calibration.
Why Now
Three factors converged to make this pattern viable:
First, agent deployments hit a wall. A March 2026 survey of 650 enterprise technology leaders found that 78% of enterprises have AI agent pilots, but fewer than 15% have reached production scale. The gap is evaluation infrastructure, not model capability.
Second, the tooling matured. The Strands Agents SDK provides the agent harness (the orchestration loop that calls the model, decides which tool to invoke, passes results back, manages the context window, and handles failures). AgentCore provides the infrastructure layer (compute, code sandbox, secure tool connections, persistent storage, memory, identity, and observability). The evaluation library bridges both.
Third, the cost of getting it wrong became concrete. Motorway’s auction system processes real money daily. A dealer who receives wrong search results loses trust in the platform. The business case for rigorous evaluation became obvious when the alternative was watching dealers leave.
The New Practice
The pattern introduces a five-stage deployment pipeline:
Stage 1: Build-time evaluation runs strands-agents-evals against a test suite during CI. The suite includes single-turn tests for basic functionality and multi-turn conversation tests that catch context drift and filter accumulation errors.

Stage 2: Staging validation deploys to a staging environment and runs the full evaluation suite against production-like data. Quality gates block promotion if any layer falls below its threshold.
Stage 3: Shadow mode deploys the new agent version alongside the current production version. Both receive the same traffic; only the current version returns responses to users. The evaluation pipeline compares results.
Stage 4: A/B testing routes a percentage of traffic to the new version and measures real-world performance against the evaluation metrics.
Stage 5: Production rollout promotes the new version to full production traffic with continuous monitoring via AgentCore Evaluations.
The critical innovation is the pass^k metric for handling non-determinism. Instead of measuring whether an agent passes a single trial (pass@1), pass^k measures whether the agent passes k consecutive trials. An agent with 90% pass@1 might have only 73% pass^3 (0.9³). The metric exposes reliability gaps that single-trial testing misses.
Tooling Implications
Strands Agents SDK provides the agent harness with explicit tool management, conversation management via SlidingWindowConversationManager, and streaming for responsiveness. The SDK supports deployment to AgentCore Runtime, which provides session isolation via dedicated microVMs.
strands-agents-evals implements the three-layer evaluation framework with support for code-based graders, LLM-as-judge graders, and human review integration. The library is framework-agnostic; the core principles work with LangChain, CrewAI, or custom implementations.
Amazon Bedrock AgentCore Evaluations provides production monitoring with built-in evaluators for common metrics and custom evaluator support for domain-specific checks. The service supports both on-demand evaluation (batch assessment of historical data) and online evaluation (real-time assessment of production traffic).
For teams not on AWS, the three-layer framework and pass^k metric are portable concepts. The evaluation library’s architecture separates the evaluation logic from the infrastructure, making it adaptable to other cloud providers or self-hosted deployments.
Evidence
Motorway’s results after implementing the pattern:
- Incorrect results dropped from 1 in 8 queries to 1 in 50
- Tool selection accuracy improved from 87% to 98%
- Task completion rate reached 96%
- Context retention in multi-turn conversations reached 94%
- Monthly incidents dropped from 12 to 2
- Issue detection time dropped from hours to minutes
The companion repository provides a deployable blueprint that teams can adapt for their own agents.
Failure Modes
Over-reliance on LLM-as-judge graders introduces its own variance. Model-based graders can disagree with themselves across runs. Calibration against human review is essential, not optional.
Insufficient test coverage for multi-turn conversations misses context drift failures. Single-turn tests pass while the agent loses track of refinements across a conversation. The Motorway team specifically called out filter accumulation errors (where the agent forgets constraints the user specified earlier) as a failure mode that single-turn tests never catch.
Quality gate thresholds set too low create false confidence. A 70% tool selection accuracy threshold might seem reasonable until you realize that means 3 in 10 queries return wrong results.
Ignoring the pass^k metric masks reliability problems. An agent that passes 90% of single trials might fail 27% of three-trial sequences. For high-stakes applications, the three-trial failure rate is the number that matters.
Metrics to Track
| Metric | Target | Measurement Method |
|---|---|---|
| Tool selection accuracy | >95% | Code-based grader comparing selected tool against expected tool |
| Reasoning coherence | >85% | LLM-as-judge with rubric scoring |
| Output quality | >90% | LLM-as-judge with human calibration |
| pass^3 consistency | >80% | Three consecutive successful trials |
| Context retention (multi-turn) | >90% | Comparison of accumulated constraints against expected state |
| Issue detection latency | <15 minutes | Time from failure occurrence to alert |
Do This Next Sprint
- Audit your current agent evaluation. If you are only checking final outputs, you are missing tool selection and reasoning failures. Document which failure modes your current tests would catch and which they would miss.
- Implement Layer 1 (tool usage) evaluation first. This layer uses deterministic graders and provides immediate signal. Check whether the agent selected the correct tool and passed valid arguments.
- Add multi-turn conversation tests. Create test cases where the user refines their query across multiple turns. Verify that the agent retains constraints from earlier in the conversation.
- Calculate pass^3 for your critical paths. Run your most important test cases three times each. If pass^3 is significantly lower than pass@1, you have a reliability problem that single-trial testing is hiding.
- Set quality gates that block deployment. Pick thresholds for each layer and enforce them in CI. A failing evaluation should prevent promotion to staging, not just generate a warning.
What This Means for Bulgaria
Bulgarian teams building AI agents face the same evaluation gap as everyone else, but with additional constraints. Most Bulgarian engineering organizations lack dedicated ML platform teams, which means agent evaluation infrastructure competes for attention with other DevOps priorities.
Practical actions for Sofia-based teams:
- The strands-agents-evals library runs locally without AWS dependencies for build-time evaluation. Teams can implement the three-layer framework without committing to AgentCore for production monitoring.
- For teams already on AWS, AgentCore Runtime is available in eu-central-1 (Frankfurt), which provides acceptable latency from Bulgaria. Check whether your data residency requirements allow EU region deployment before architecting around AgentCore.
- Bulgarian engineers interviewing at companies building agentic systems should ask about evaluation infrastructure. “How do you measure agent reliability across repeated trials?” separates teams that have thought about production from teams that are still in demo mode.
- If your organization is subject to the EU AI Act’s requirements for high-risk AI systems, agent evaluation infrastructure becomes a compliance requirement, not an optional nice-to-have. The three-layer framework provides documentation of testing methodology that auditors will expect.
Dig Deeper
- Evaluating AI Agents: A production blueprint with Strands and AgentCore (AWS Machine Learning Blog, July 2026)
- sample-evaluating-agents-on-aws-with-strands-and-agentcore (GitHub repository with deployable blueprint)
- Strands Agents SDK documentation: Operating Agents in Production
- AI agent evaluation: frameworks, metrics & testing strategies (Algolia, June 2026)
- The Non-Determinism Problem: What It Takes to Evaluate Agents Reliably (The Context Lab, February 2026)


