Curtis FosterCurtis Foster
All posts

AI agent shadow mode: how to test agents before they touch customer workflows

Shadow mode lets an AI agent observe real work, produce recommendations, and prove itself before it can send, change, or approve anything.

August 22, 2026· 11 min read· Curtis Foster Team
Hero image for blog post: AI agent shadow mode: how to test agents before they touch customer workflows

At 9:17 on a Tuesday morning, Priya opened the support dashboard and found 184 refund requests waiting. Her new AI agent had already read every ticket and drafted a decision for each one. It had not sent a message, changed an order, or touched a customer record. That was the point.

AI agent shadow mode is the safest way to test an agent against real customer work without giving it control. The agent sees the same inputs as the production workflow, produces the action it would take, and records that action for review while the existing system stays in charge.

I use this approach because a clean demo tells you very little about production. Real queues contain missing fields, duplicate requests, angry customers, stale policy pages, and edge cases that never appear in a test script. Shadow mode gives you evidence without making customers pay for your learning curve.

A shadow-mode run should expose mistakes before customers have to experience them
Shadow mode lets your agent earn trust before a customer has to experience its mistakes.

What shadow mode actually does

Think of shadow mode as a second set of eyes standing beside an operator. The agent receives a copy of the live event, runs its normal reasoning and tool-selection process, then writes its proposed result to a separate log. The existing workflow completes the work as usual.

For a refund agent, the flow might look like this:

  • A customer submits a refund request through the normal support channel.
  • The production system sends a read-only copy of the request, order history, and applicable policy to the agent.
  • The agent proposes approve, deny, request more information, or escalate.
  • The production system makes the real decision.
  • A reviewer compares the proposal with the human or rules-based outcome.

The agent can still use tools in some shadow environments, but those tools need to be read-only or simulated. It can retrieve an order from Postgres. It can search a policy index with pgvector. It can draft an email. It should not issue a refund, edit a shipping address, close a support ticket, or send a message to a customer.

That boundary matters because testing AI agents in production is not the same as letting them operate in production. You want production inputs and production mess. You do not want production consequences.

When I put multi-model AI products in front of real users, this distinction has saved me from trusting an agent too early. A model can produce a persuasive answer while pulling from the wrong policy version, classify a request correctly but invoke a tool with the wrong arguments, and do both of those things only once every few hundred runs. Once every few hundred runs is enough to break a real workflow.

The mistake I keep watching teams make is treating shadow mode as a passive demo. They let the agent generate text, glance at a few examples, and call the test complete. A shadow run needs a comparison target, a review process, and a decision about what counts as failure.

Build an agent evaluation framework around real decisions

The model output is not the entire test. Your agent evaluation framework should measure whether the proposed action was correct, safe, useful, and supported by the available evidence.

Start by defining the unit of work. A single customer request may produce several decisions: Should the request be classified as a refund, replacement, billing question, or fraud concern? Should the agent ask for more information? Should it recommend approval or escalation? Should it cite a particular policy or order record? Should the response tone match the situation?

If you score only the final text, you can miss a serious failure. An agent might write a warm, polished response that promises a refund the customer does not qualify for. The prose is fine. The decision is wrong.

I like to separate the evaluation into four layers:

  • Decision accuracy: Did the agent select the same valid outcome as a trained reviewer?
  • Evidence quality: Did it use the correct order, account, policy, or conversation history?
  • Action safety: Did it stay inside the allowed workflow and avoid invented permissions?
  • Communication quality: Was the draft clear, respectful, and complete enough to use?

You do not need a perfect score from the start. You need a visible scorecard. A useful review row might include the request ID, production outcome, agent proposal, evidence used, reviewer judgment, failure category, and severity.

Then label failures by type instead of writing vague notes like "bad answer." Useful labels include:

  • Wrong intent
  • Missing context
  • Unsupported claim
  • Incorrect tool choice
  • Bad tool arguments
  • Policy conflict
  • Unsafe escalation
  • Tone or formatting issue

This creates a feedback loop your team can act on. If most failures are unsupported claims, improve retrieval and citation rules. If most are bad tool arguments, inspect the tool schema and validation layer. If the agent keeps escalating simple requests, the problem may be workflow design rather than model intelligence.

A small review set is enough to begin. Take 50 to 100 recent cases, remove private data where needed, and have a qualified reviewer label the expected action. Run the same cases through the agent, compare its proposal with the reference decision, then keep collecting live shadow cases so the evaluation reflects changing customer behavior and policy.

Here's the part most people miss: agreement with the current workflow is not always the same as correctness. The agent may expose inconsistent human decisions. That is useful, but it means you need a review path for disagreements rather than blindly treating the existing outcome as ground truth.

Make the shadow run safe, useful, and boring

Good AI workflow testing is mostly control design. The exciting part is watching the agent reason through a difficult case. The valuable part is making sure a bad result has a small blast radius.

Set the boundaries before you start the run:

  • Give the agent a separate service identity.
  • Allow read-only access wherever possible.
  • Route drafts and proposed actions to a separate database table or event stream.
  • Block outbound email, payment changes, account edits, and ticket closure.
  • Store the model name, model version, prompt version, retrieved documents, tool calls, latency, and cost.
  • Add a kill switch that stops shadow execution without changing the main workflow.

Do not hide the agent from your observability tools. If you use OpenTelemetry, give the shadow request its own trace or span attributes. If you use a queue, mark shadow events clearly so they cannot be consumed by a live action worker. If the agent calls a tool, record the proposed arguments even when the tool is simulated.

The system should answer simple questions after every run: What did the agent see? What did it decide? What evidence did it use? What would it have changed or sent? How long did it take? What did it cost? Who reviewed the result?

This is where cost telemetry becomes part of the test, not an accounting report you check later. A shadow agent that costs $0.04 per case may sound inexpensive until it reads 500,000 support events each month. A model that takes 20 seconds on a low-risk request may be accurate and still be a poor fit for the workflow. I've watched teams optimize prompt token cost to the third decimal and then quietly eat a 4x bill from a retry storm nobody instrumented. Cost telemetry would have caught it on day one.

Set thresholds before looking at the results. For example, you might require 98% accuracy on refund eligibility, zero critical safety errors across 1,000 cases, and a median response time below five seconds. Those numbers will vary by workflow, but writing them down prevents the team from moving the goalposts after a good-looking demo.

Keep a human review sample even when the agent appears strong. Review all high-risk cases, then review a random sample of ordinary ones. This catches silent failures, where the agent sounds confident and nobody notices that its evidence is stale.

And keep the operational version boring. The safest shadow runner is often a small worker that consumes an event, calls the agent, validates the output, stores the result, and exits. You do not need a grand autonomous architecture to learn whether a refund agent can identify policy exceptions.

Know when the agent is ready to graduate

Shadow mode is not a single green light. It is a sequence of smaller decisions.

Start with observation only. The agent reads the inputs and produces a proposal, but nobody uses that proposal in the live workflow. During this stage, focus on data access, missing context, failure categories, and cost.

Move to assisted use when the proposal is good enough to help a trained operator. The agent may prefill a response or recommend a queue, but a person must review and approve the result. Capture edits. A large edit rate tells you more than a high approval rate, because reviewers often approve weak drafts just to keep the queue moving.

Then consider limited automation for low-risk, reversible actions. Examples include assigning a ticket to a queue, adding an internal label, or requesting a standard missing document. Avoid starting with irreversible customer or financial actions.

A reasonable graduation checklist includes:

  • Stable performance across recent and historical cases.
  • No unresolved critical failures.
  • Clear evidence for decisions that need justification.
  • Validated tool arguments and read-only behavior during tests.
  • A human fallback for uncertainty and system failure.
  • Monitoring for drift in input patterns, policy content, and model behavior.
  • A rollback path that does not depend on the agent itself.

Drift deserves special attention. A support agent may perform well in January and degrade in March because a return policy changed, a product line expanded, or customers began using a new phrase. Re-run the evaluation set when policies change, not just when you change the model.

You can also compare models without putting either one in charge. Send the same shadow events to two models, Claude Sonnet and GPT-4.1 for example, then compare decision accuracy, citation quality, latency, and cost. This is a practical way to choose a model for a specific task instead of choosing based on a benchmark headline.

Once you frame it this way, shadow mode becomes more than a safety feature. It becomes a product discovery tool. You learn which parts of the workflow are predictable, which policies are unclear, where operators disagree, and where customers create work your original process never anticipated.

The emotional part matters too. If you're the person responsible for an AI launch, you may feel trapped between two bad choices: move quickly and risk customer harm, or wait for a level of certainty nobody can honestly promise. Shadow mode gives you a third option. You can move, observe, and learn without pretending the system is ready to act alone.

FAQ

What is AI agent shadow mode?

AI agent shadow mode runs an agent against live or replayed production inputs while preventing it from changing customer data or triggering real actions. It records what the agent would have done so your team can compare the proposal with the actual workflow outcome.

Is shadow mode the same as testing AI agents in production?

Shadow mode is one form of testing AI agents in production, but it limits the agent to observation and proposed actions. You get real inputs, timing, and operational conditions without giving the agent permission to send messages, change records, or complete customer transactions.

How long should an agent stay in shadow mode?

The right duration depends on workflow volume, risk, and how often inputs change. Run enough cases to cover normal traffic and rare high-impact cases, then require stable results across a defined evaluation set before assisted use or limited automation.

What should an AI workflow testing dashboard measure?

Track decision accuracy, critical error rate, human agreement, edit rate, evidence quality, latency, token usage, and cost per case. Also record model version, prompt version, retrieved sources, tool calls, and workflow type so failures can be traced to a specific change.

You do not have to trust an agent all at once. Give it a place to watch, a record of what it proposes, and a clear path to earn more responsibility. The model is only one part of the system. The safe boundary around it is what lets you keep building.

0 comments

Join the conversation

Subscribe to comment

Join Curtis Foster's newsletter to leave a comment and get new posts in your inbox.

Read next

Hero image for blog post: The AI production readiness review: 12 questions I ask before launch

The AI production readiness review: 12 questions I ask before launch

Oct 31, 2026
Hero image for blog post: How to design human handoffs for AI agents that cannot finish the job

How to design human handoffs for AI agents that cannot finish the job

Oct 23, 2026
Hero image for blog post: Streaming, queues, and background jobs: choosing the right runtime for AI workflows

Streaming, queues, and background jobs: choosing the right runtime for AI workflows

Oct 14, 2026
AI agent shadow mode for safer production testing