---
title: "Shadow Deployment for AI Agents: Evidence Before Permission"
description: "Shadow deployment runs a candidate on live traffic while the incumbent still answers. Why it breaks the approval deadlock for AI agents — and what changes when the shadowed thing acts."
author: "MDflow"
date: 2026-12-04
reading_time: "25 min"
canonical_url: https://mdflow.cz/blog/shadow-deployment-ai-agents
md_url: https://mdflow.cz/blog/shadow-deployment-ai-agents.md
---

# Shadow Deployment for AI Agents: Evidence Before Permission

*Published December 4, 2026 · 25 min read*


Most advice about shipping AI agents is about building them. The hard-won lesson from teams that have actually put one in front of customers is that building was the cheap part, and the expensive part has no code in it at all: convincing someone with the authority to say no that the thing is safe.

That creates a deadlock peculiar to regulated industries. You cannot go live without approval. But to grant approval, a model risk function increasingly wants to see how the system behaves on real production data — which you cannot have until you go live. There is a well-established release pattern that cuts the knot.

> **TL;DR** — Shadow deployment runs a candidate system on a copy of live production traffic while the incumbent still serves every user, so you collect real-world evidence at close to zero customer risk. It is how NatWest is attacking the approve-before-production deadlock on the routing path for its Cora assistant — a rollout still in progress at the time of the talk, not a reported result. But shadowing an *agent* is not shadowing a *model*: side effects have to be suppressed in the tool layer, free-text output cannot be diffed against the incumbent, and the incumbent is usually not ground truth — so the shadow produces scored evidence, not matched evidence, and the scoring rubric has to exist first. That evidence is a set of written claims and thresholds that both reviewers and agents read, which is what [MDflow](https://mdflow.cz) stores.

## What is shadow deployment?

Shadow deployment is a release strategy in which a candidate system receives a copy of real production traffic, processes it, and has its output thrown away. The incumbent system alone responds to the user.

It is boring enough to be a product feature. Amazon SageMaker calls it [shadow tests](https://docs.aws.amazon.com/sagemaker/latest/dg/shadow-tests.html): you nominate a shadow variant alongside the production variant, and the endpoint mirrors a configurable share of live inference requests to it in real time while returning only the production variant's responses. AWS [introduced it](https://aws.amazon.com/blogs/aws/new-for-amazon-sagemaker-perform-shadow-tests-to-compare-inference-performance-between-ml-model-variants) explicitly as a way to validate not just new models but changes to serving infrastructure, against the traffic you actually get rather than the traffic you kept in a test set.

The economics are the whole trade. You pay to run two systems in order to serve one, and in exchange you get behaviour on the real input distribution — the malformed requests, the seasonal skew, the 3 a.m. edge cases, the users who do things nobody wrote a test for — with the blast radius of a log file. For a classical model the comparison is mechanical: same input, two predictions, diff them, aggregate.

Note what shadow mode is *not*. It is not a canary. A canary routes a slice of real users to the new system and those users see its output; a shadow routes a copy of everybody's traffic and nobody sees its output. A canary is a test of consequences, a shadow is a test of behaviour, and they answer different questions. It is also not the first rung of an autonomy ladder — [that rung](/blog/agent-autonomy-ladder) is about how much a live agent is permitted to do inside a real task, which is a permissions question. Shadow deployment is a release mechanic about where output goes: the agent may be doing the most consequential thing it knows how to do, and it still touches nothing, because nothing downstream is listening.

## The deadlock it breaks

Jonathan Osborne, a lead AI engineer at NatWest Group, gave a talk at AI Engineer in November 2026 titled [Building the AI Agent Is Easy. Proving It's Safe Isn't](https://www.youtube.com/watch?v=5UgnatzpZ9E). The framing is in the title, and the reason is blunt: with the coding assistants available today, producing the agent is the part they can just do. The approval is the project.

The stakes described set the tone. Osborne put NatWest as the second-largest retail bank in the UK with something in the range of 19 million retail customers, and its digital assistant, [Cora](https://www.natwestgroup.com/news-and-insights/news-room/press-releases/data-and-technology/2024/jun/natwest-launches-cora-plus-the-latest-generative-ai-upgrade-to-t.html), at roughly 100,000 conversations a day — until now answered overwhelmingly from scripts. The work described brings about a third of Cora's journeys to AI-generated answers grounded in internal knowledge bases, plus agents that can act for a customer: make a payment, change an address.

The point about risk is not about model quality. It is about arithmetic. At that customer count, a small error rate is not a bug ticket and not an amusing screenshot — it is real people and real money, an uncomfortable conversation with a regulator, and reputational damage. And an agent that can answer any question can also answer any question wrong.

Which produces the deadlock. Osborne names shadow mode as, in that talk's words, one of the more transferable parts of the project, precisely because it breaks a specific institutional stalemate: in a regulated industry you cannot go live and get production data without approval, but to grant that approval, model risk colleagues increasingly want to see how the model reacts to actual production data. Shadow mode separates *observe safely* from *answer the customer*. Those two things look inseparable until someone points out that they aren't.

The second-order benefit matters as much as the first. Without it, going live is one enormous decision made on the strength of offline evals — a single point of failure in the governance process, which is exactly the kind of thing a risk committee is built to refuse. Shadow mode converts that into a sequence of smaller decisions, each with evidence behind it. After the shadow, NatWest's rollout proceeds brand by brand with percentage-based traffic and KPI-driven go/no-go gates, some automated and some requiring manual approval, underpinned by feature flags: a global flag that sends everything back to the scripted solution, and the ability to isolate any individual backend globally or along a dimension such as brand, in seconds.

## What they shadowed, and what they didn't

This distinction is worth being precise about, because it is the part most likely to be over-claimed.

The customer-facing AI version of Cora was **not live** when Osborne spoke. Osborne closed the talk by saying that next month would reveal how much of it was actually true, when they go live. What the shadow deployment covered was the routing and classification path: the system went live classifying real customer utterances while the existing scripted solution continued to produce every answer the customer saw. In Osborne's description they put it live to start classifying utterances, which gives them the real input space for customer queries at almost zero risk.

The project that *was* live, since February, is a different and internal one: a colleague-facing complaints agent that takes a customer complaint, pulls from a set of tools, and writes an investigation summary explaining why this customer complained and how to help them. That system is the source of the production judge data, with around 14,000 cases scored by both a human validator and an LLM judge.

Separating these two matters because the shadowed component was read-only by construction. A router emits a destination. It does not move money. That is not a limitation of the technique so much as the technique showing you where its natural boundary is — a point worth returning to.

## Shrink the surface before you harden it

Before any of the evaluation machinery, NatWest did something unglamorous: they reduced how much of the problem needs a model at all. Osborne calls it the routing funnel, and it runs in order.

Every conversation enters at the top. A contextual filter strips out common non-questions like button clicks — about 20% of the volume. Then deterministic pre-classification rules route on the customer's utterance plus metadata, with no ML or AI involved whatsoever. Only what survives both gates reaches a model. Then a gated relevancy and rephrasing step handles detailed multi-context questions, feeding an intent classifier that is a neural network over embeddings — not generative AI. Finally, policy rules confirm this particular customer should be reaching that particular backend at all.

The four reasons Osborne gives for building it this way are all recognisably bank-shaped, and all generalise:

- **Access control** — enforce that this customer is entitled to this backend.
- **Auditability** — every decision carries a code and must be fully reproducible. The regulator requires it.
- **Resilience** — if a model or the generative path is unavailable, the customer still gets an answer.
- **Governance** — the whole funnel is version-controlled config, changeable without a full redeployment, so the system can react quickly to changing conditions.

Osborne's summary of the design is the sentence to keep: they did not take a language model, slap some context into it, and point it at 19 million customers. They first thought hard about what actually needed a model to solve. Every utterance filtered out deterministically is an utterance that cannot be prompt-injected, cannot be hallucinated at, and does not need to appear in anyone's eval set.

## One accuracy number is the wrong instrument

Here is Osborne's illustration, and it is worth flagging as an illustration rather than a result: if you are told an intent router is 94% accurate, that sounds good. But it does not answer the questions that matter. Was the answer grounded in a real source? Did the customer's problem actually get resolved? Did the system know when it was out of its depth and hand over to a human? No single score carries all of that.

So NatWest stopped treating quality as a score and started treating it as a vector. Every answer is scored across three categories, each monitored and alarmed independently:

| Dimension | The question it asks |
| --- | --- |
| **Safety** | Could this harm the customer? |
| **Task** | Did it actually do its job? |
| **Experience** | How did it feel to deal with? |

The separation is the point: it lets you distinguish *hallucinating* from *correct but insufferable*. Both are failures. They have completely different fixes, and a single blended number hides which one you have. And to finish the illustration — a router that is 94% accurate but 100% confident on the 6% it gets wrong is far more dangerous than one that is 85% accurate and knows it.

The human validation that preceded any automation makes the case concretely. In a June validation of their payment agent: 111 conversations across 37 payment journeys and four brands, with three independent human scorers per conversation. The headline was an 83% pass rate. Underneath it:

- **97%** on happy-path scenarios
- **76%** on edge cases
- **43%** on topic changes

That last row is the digression case, of the kind the talk illustrates earlier with a mortgage question: a customer asks whether they can overpay their mortgage without a charge, gets a good grounded answer — and then does the entirely normal human thing of switching topic mid-conversation to ask about closing the account instead. Decision trees are notoriously bad at that kind of digression. It turns out agents can be too. One 83% headline was concealing a 54-point spread, and the worst cell was the behaviour most characteristic of real conversation.

Two further findings from that exercise deserve more attention than they usually get. First, the two biggest causes of failure turned out to be engineering issues rather than model problems at all — which is a strong argument for doing human validation even when you intend to automate it, because it catches things your judge rubric was never pointed at. Second, the humans did not agree with each other. Inter-rater agreement was 95% on something relatively objective like bias and fairness, but only 64% on intent understanding — did the system actually grasp what the user wanted.

That second number quietly destroys the default plan for automating evaluation. The usual goal when introducing an LLM judge is to make it match your human validators. Match *which* ones? On the dimension that matters most, the humans agree with each other about two-thirds of the time. Human agreement is a ceiling to be measured, not a target to be hit — a problem we have written about from the [rubric](/blog/eval-rubrics-for-ai-agents) and [domain expert](/blog/domain-expert-evals) angles.

## The judge is part of your configuration

The complaints agent's 14,000 dual-scored cases produce the most load-bearing finding in the talk, and it is a warning about instruments.

On faithfulness, the LLM judge's mean sat around 0.97 with very little spread. The human mean was around 0.83 with a much wider one. The average gap between them is small enough that you might conclude the judge is doing fine. The correlation between them was close to zero.

A judge pinned near the top of its range is not a lenient judge. It is a broken instrument. It is not discriminating between the good cases and the bad ones at all, which makes it worthless for the only job it has — and leniency is the direction LLM judges drift by default, so this is the failure mode to go looking for rather than the one to be surprised by. The diagnostic is the one Osborne gives: compare the spread, not just the averages. Two distributions can have nearly identical means and no relationship whatsoever. We have made the same argument about [judges scoring the vibe](/blog/pairwise-evals-vs-absolute-scores) and about [when evals need an agent of their own](/blog/agent-as-a-judge-evals).

Then the part that should change how you manage your eval stack. They changed the judge model — nothing else. Same inputs, same agent outputs, same rubric, same threshold. The scores moved sharply down toward the alert threshold they had set.

The conclusion follows directly: **the judge model is part of your configuration**, and swapping it can introduce a breaking change in your quality metrics without touching the system under test. If your judge model is a floating dependency, your thresholds mean nothing across a version bump. Separately, they moved the judge to a different model family from the agent's, so that judge and judged have different blind spots — a change Osborne credits with pinning the two scores closer together.

The rest of the evaluation spine is conventional in the good sense. Live conversations and guardrail decisions are captured using open standards — OpenTelemetry and [OpenInference](https://arize.com/glossary/openinference/) — then sampled: 5% at random, plus everything interesting, where interesting means handoffs, failures, unusually long conversations, and angry users. Those get scored across the three-dimension vector, and traces, scores and experiments all land in Comet, whose [Opik](https://github.com/comet-ml/opik) covers the generative side while its model production monitoring covers the classical ML. Two problems, two instruments, deliberately one platform.

Two bank constraints shape it. The environment is air-gapped with no internet access, so the judge model is reached over a private path through an internal generative AI gateway, and Comet — a SaaS product — is consumed as a partner application via AWS. And there is a zero-tolerance policy on personally identifiable information leaving the network, which means much of the evaluation has to run with the PII absent.

The cadences are worth copying: traces captured as they happen, offline scoring every four hours, and regression checks wired into CI/CD with a hard gate, because a change to a prompt or to retrieved context can have an outsized effect on behaviour. Continuous evaluation, as Osborne puts it, is part of your production infrastructure — not a notebook you run a couple of times when the model goes live.

The classical half ages differently. The embeddings-based intent classifier drifts, because human language moves on from the day the model was trained, so it gets classical monitoring: input feature drift, F1 against human labels, and defined thresholds that trigger retraining. The tip is a good one — input feature drift is an early canary that turns before your F1 does, which is the difference between scheduling a retrain and explaining a regression. (We have written separately about [what happens when the baseline itself moves](/blog/agent-drift-detection).)

## What changes when the shadowed thing is an agent

Everything above is NatWest's. This section is our argument, because shadow deployment arrived from a world of classifiers, and four of its load-bearing assumptions quietly break when the candidate is an agent.

**1. Suppressing the response is not enough — you have to suppress the effects.** A shadowed classifier is safe by construction. It consumes a request and emits a label; discarding the label discards the entire consequence. An agent's defining property is that it acts, which means "don't return the output" leaves the dangerous half running. Shadow mode for an agent is therefore implemented in the tool layer, not the serving layer: the model reasons, selects a tool, and the tool boundary returns a plausible result without performing the action. This is the same problem as deciding an agent's [blast radius](/blog/ai-agent-sandboxing-blast-radius), arriving from the other direction. It also explains NatWest's scoping decision: the path they put in shadow was the routing one, where the output is a destination. Shadowing the payment agent is a materially harder engineering problem than shadowing the router, and the honest move is to notice that and shadow the read-only part first.

**2. There is nothing to diff.** Classical shadow testing compares champion and challenger on identical input, which works because predictions are commensurable — same label or not, same ranking or not. Two free-text answers to the same question can both be entirely correct and share barely a token. Worse, the incumbent is frequently not ground truth: in NatWest's own example the scripted system's response to the mortgage question was a menu that did not contain the answer and a likely dead end. So the comparison that makes classical shadow mode cheap is unavailable. Shadow mode for generative systems yields **scored** evidence rather than **matched** evidence, and that inverts the build order: you need a calibrated judge and an agreed rubric *before* the shadow run is worth paying for. A shadow deployment with no rubric is an expensive way to fill a disk.

**3. One shadow observation is one sample, not a measurement.** Shadow testing a deterministic model gives you the answer that model will give. Run a non-deterministic agent on the same utterance twice and you may get two different behaviours, so a single pass over a day's traffic tells you what it did once, not what it does. Any threshold you set on shadow data needs to account for that variance — which in practice means re-running interesting slices rather than only sampling more of the tail.

**4. The by-product is worth more than the comparison.** In classical shadow deployment the output is a verdict and the traffic copy is waste. For an agent, the shadow run produces a corpus of real production inputs paired with what a candidate system did about them — which is precisely the dataset you cannot buy and usually cannot synthesise. The leverage comes from labelling it, and NatWest's complaints project shows the most quietly effective trick in the talk: **human feedback as a gate rather than a thumbs-up.** If a complaint handler wants to rerun their investigation, they cannot until they have said why. The team wanted to understand the reason for the rerun — and the by-product is 14,000 labelled cases, when Osborne says many projects struggle to get a tenth of that. Feedback attached to a moment where the user already wants something costs them nothing extra. A thumbs-up icon floating in the corner of a UI collects noise from the people with the strongest opinions.

Which leads to Osborne's closing observation, and the reason this is a durable topic rather than a release-engineering footnote: the agent was the cheap part — code written to solve a business problem. The evaluation spine is the thing they reuse again and again.

## Which teams benefit most from shadow mode

1. **Regulated industries** — banking, insurance, healthcare, anything with a model risk function and a pre-implementation validation expectation. The UK's own framework, the PRA's [SS1/23 model risk management principles for banks](https://www.bankofengland.co.uk/prudential-regulation/publication/2023/may/model-risk-management-principles-for-banks-ss), has independent validation as one of its five principles. Shadow evidence is how you satisfy a validator who wants production behaviour before production.
2. **Teams replacing a working incumbent.** Shadow mode shines when there is already a system in place to keep answering. If nothing exists to serve traffic, you have a prototype problem, not a rollout problem.
3. **Anyone whose edge cases live in the traffic.** If your failure modes are the long tail — topic changes, unusual phrasings, bad input — no curated eval set will contain them in the right proportions. Shadow mode is how you find out what the real distribution looks like.
4. **Agents facing a hostile input space.** Prompt injection is an input-distribution problem, and shadowing surfaces real attempts rather than the ones you thought to write.
5. **Classical ML systems being replaced by generative ones.** The two drift differently and need different instruments; a shadow run is the cheapest way to compare their behaviour on the same week of traffic.
6. **Teams who need labelled production data and cannot get it.** Treat the shadow corpus as the deliverable rather than the exhaust.

## How MDflow fits

The thing that unblocks a go-live decision is not a dashboard. It is a written claim, the evidence behind it, and a record of who accepted it — and that is a document problem.

**What lines up today.** A shadow deployment generates a specific set of prose artifacts, and every one of them gets argued over and revised: the hypothesis the shadow is testing, the sampling policy and why those slices count as interesting, each metric's threshold and the reasoning behind the number, the judge model and rubric currently in force, and the decision record of who signed off on what evidence. [MDflow](https://mdflow.cz) stores those as plain markdown in folders whose descriptions are themselves the context — [folder descriptions](/blog/folder-descriptions-agent-context) rank as the primary retrieval signal for `mdflow_get_context`, so an agent asking about go-live criteria gets the live documents rather than a keyword match.

Three features map unusually directly onto the problem this post describes:

- **Version history** (a Pro feature) captures the previous version on every saved change, through every write path — the editor, the HTTP API and the MCP server alike — with a line-by-line markdown diff and a non-destructive restore. When a threshold moves, the question is always *which criterion changed and when*, and that is only answerable if the answer was recorded without anyone having to remember to record it.
- **The Document Log** at `/log` is a cross-document activity feed built to answer "what did agents and integrations do to my documents?" — the actor on every row, `you` for browser actions and `automated · <token name>` for anything arriving over the API or MCP, with a side-panel diff of exactly what each edit changed. If an agent is maintaining your thresholds document, that is the audit trail for it.
- **The empty-body write guard** refuses to replace a document's body with an empty one unless the caller passes `confirmEmpty: true`. It is a small thing, and it is the same principle as the routing funnel: a deterministic check in front of a probabilistic writer, so a client with an unloaded buffer cannot silently erase the record.

Agents reach the documents themselves the same way people do, over the [MCP server](/docs/mcp) or the [HTTP API](/docs/api) with a personal access token, and every shared document has a raw `.md` twin with YAML frontmatter so a reviewer's tool can cite it in one request. Version history is deliberately outside that surface: it is private to the document owner and exposed through neither the API nor MCP, so the record of who changed a threshold is not editable by the thing being measured.

**Where we are headed.** Direction, not dated commitments: richer structure on the log so a run of agent edits reads as one episode rather than a list of rows; stronger provenance on agent-written documents, so a threshold's justification carries where it came from; and continuing to make the whole workspace legible to the next tool that needs to read it, whatever protocol it speaks.

## The bottom line

Shadow deployment is a release pattern that turns out to solve a governance problem nobody designed it for: it separates observing a system safely from letting it answer. That is what converts one terrifying go-live decision into a sequence of defensible small ones, and it is why a bank can gather production evidence for a customer-facing assistant without a customer ever seeing its output.

Carry it across to agents with your eyes open. Suppress the effects and not merely the response, which puts the work in the tool layer. Accept that you cannot diff free text and that the system you are replacing is not ground truth, which means the rubric and a calibrated judge come first. Watch the spread rather than the averages, pin your judge model like the dependency it is, and put the judge in a different model family from the agent. Then treat the labelled corpus you accumulate as the real asset.

And write it all down where both your reviewers and your agents can read it. [Start free](/login), [connect an AI agent](/docs/mcp), or [read the API docs](/docs/api).

## Frequently asked questions

### What is shadow deployment?

Shadow deployment is a release strategy in which a candidate system receives a copy of real production traffic, runs on it, and has its output discarded. The incumbent system alone answers the user. Amazon SageMaker ships it as a first-class feature called shadow tests, which mirrors live inference requests to a shadow variant whose predictions are never returned. The point is to observe behaviour on real input distributions without exposing anyone to the result, and the main cost is that you are paying to run two systems to serve one.

### How is shadow deployment different from a canary release?

A canary sends a small slice of real users to the new system and they see its output; a shadow sends a copy of everyone's traffic to the new system and nobody sees its output. That makes a canary a test of consequences and a shadow a test of behaviour. Canaries measure the thing you actually care about but expose real users to risk; shadows expose nobody but can only tell you what the system would have done. Most regulated rollouts use both, in that order: shadow to earn the approval, canary to spend it.

### Can you shadow-deploy an AI agent, not just a model?

Only the part of it that does not act. A shadowed classifier is read-only by construction — it emits a label and the label is thrown away. An agent's defining feature is that it takes actions, so running one in shadow means executing its reasoning while refusing its tool calls, which puts shadow mode in the tool layer rather than the model layer. In practice teams shadow the decision and stub the effect: NatWest put its routing and intent-classification path in shadow, where the output is a destination rather than a payment.

### Why can't you just diff the shadow's output against the incumbent's?

Because two free-text answers to the same question can both be correct and share almost no tokens, so there is no diff to take, and because the incumbent is usually not ground truth. In NatWest's own example the scripted system's answer to a mortgage overpayment question was a menu that did not contain the answer. Shadow mode for generative systems therefore produces scored evidence rather than matched evidence, which means you need a working judge and rubric before the shadow is worth running at all.

### What should a shadow deployment actually produce?

A written claim, the evidence behind it, and a record of who accepted it. The dashboard is not the deliverable: approval to go live is granted against a stated hypothesis, named thresholds, a sampling policy, and an argument about what the spread in the numbers means. Those are prose artifacts that get revised and argued over, so they need to live somewhere versioned and readable by both the humans who sign off and the agents that enforce the thresholds — which is what a markdown workspace like MDflow is for.

## Further reading

- [Building the AI Agent Is Easy. Proving It's Safe Isn't](https://www.youtube.com/watch?v=5UgnatzpZ9E) — Jonathan Osborne, NatWest Group, at AI Engineer, November 2026. The routing funnel, the quality vector, the judge-calibration data and the shadow rollout.
- [Shadow tests](https://docs.aws.amazon.com/sagemaker/latest/dg/shadow-tests.html) — Amazon SageMaker documentation for the mechanic itself: mirrored live requests, a shadow variant, discarded responses.
- [SS1/23 — Model risk management principles for banks](https://www.bankofengland.co.uk/prudential-regulation/publication/2023/may/model-risk-management-principles-for-banks-ss) — the Bank of England's Prudential Regulation Authority supervisory statement, effective May 2024, whose five principles include independent model validation.
- [Opik](https://github.com/comet-ml/opik) — Comet's open-source LLM observability and evaluation platform, the generative half of NatWest's evaluation stack.
- [The Agent Autonomy Ladder](/blog/agent-autonomy-ladder) — the permissions question that shadow mode is often confused with, and how agents earn their way up it.
- [Eval Rubrics for AI Agents](/blog/eval-rubrics-for-ai-agents) — golden sets, judges, and what to do when your human raters disagree.
- [Pairwise Evals: Your Judge Is Scoring the Vibe](/blog/pairwise-evals-vs-absolute-scores) — why absolute scores compress and what to use instead.
- [Quality Gates for AI Agents: The Swiss Cheese Model](/blog/quality-gates-for-ai-agents) — the gate stack that sits downstream of all this scoring.
- [Connect an AI agent to MDflow](/docs/mcp) — the MCP server, the HTTP API and personal access tokens.

