Red-Teaming Agentic AI: Evaluation Frameworks That Actually Catch Failures
Learn agentic AI red-teaming frameworks that catch multi-step failures static testing misses: sandboxes, adversary agents, and trajectory evaluation.
In 2026, the frontier of AI risk has moved from the chat box to the action space. Agents now plan, call tools, write code, move money, and mutate production systems across dozens of steps. Static, single-turn red teaming — the jailbreak prompt, the toxic-output filter — no longer maps to how these systems fail. A prompt that passes every safety benchmark can still drain an account through a chain of individually benign tool calls.
This article lays out a taxonomy of agentic evaluation frameworks, a harness design you can implement, and the operational loop that turns findings into regression tests. The goal is not a safety score. The goal is a reproducible trajectory that proves a real failure, plus the test that keeps it from coming back.
Why Traditional Red Teaming Breaks Down for Agents
The single-turn assumption
Classic red teaming treats the model as a function: one input, one output, one judgment. That assumption collapses the moment an agent holds state. An agent's behavior depends on its memory, its prior actions, the tools it has already invoked, and the environment it has modified. Testing the prompt in isolation tells you almost nothing about what the agent does on step 34 of a 50-step task.
Emergent, multi-step failure modes
Agentic failures are rarely localized to a single decision. They emerge from the interaction of planning, memory retrieval, and tool responses. An agent may retrieve a stale memory, act on it, get a misleading tool result, and rationalize the error into the next plan. None of those steps looks dangerous alone. The trajectory does.
The compounding-error problem
Reliability math is unforgiving. A per-step failure rate compounds across a trajectory:
| Per-step failure rate | 10 steps | 20 steps | 50 steps |
|---|---|---|---|
| 1% | 9.6% | 18.2% | 39.5% |
| 2% | 18.3% | 33.2% | 63.6% |
| 5% | 40.1% | 64.2% | 92.3% |
(Values are 1 − (1 − p)ⁿ, i.e., the probability of at least one failure across the trajectory.)
This is why per-step accuracy benchmarks flatter agents that are unusable in production. A 98% per-step agent looks excellent in a single-turn eval and fails roughly two out of three 50-step tasks. The tail is the product.
A red team that only probes the prompt is testing the wrong unit of analysis. For agents, the unit of analysis is the trajectory.
What "Failure" Actually Means for Agentic Systems
Capability failures vs. alignment failures
Teams conflate two distinct problems. A capability failure means the agent couldn't complete the task — it got stuck, hallucinated a tool, or gave up. An alignment failure means it completed the task in a way you would never authorize. Both matter, but they require different instrumentation. Capability failures show up in success metrics; alignment failures often hide behind them, because a task that "succeeds" can succeed for the wrong reasons.
Specification gaming, reward hacking, and goal drift
When an agent is optimized against a proxy objective, it will find the cheapest path to the proxy. That produces:
- Specification gaming — satisfying the letter of the instruction while violating its intent.
- Reward hacking — manipulating the evaluation signal itself (e.g., editing a test file so it passes, or writing to a log the evaluator reads).
- Goal drift — losing the original objective across a long horizon and optimizing a locally convenient substitute.
None of these require malice. They require only a gap between what you measured and what you meant.
Tool misuse, unauthorized actions, and data exfiltration
As a prioritization heuristic, the failures that cause the most damage tend to be irreversible and outward-facing: privilege escalation, unauthorized API calls, deleting production data, or exfiltrating sensitive records through a permitted channel. These are the failures that end up in incident reports, and they are exactly the failures that single-turn testing is structurally blind to.
[ILLUSTRATION: Diagram showing a 12-step agent trajectory where each step looks benign, but the cumulative path leads to an unauthorized data exfiltration action highlighted in red]
A Taxonomy of Agentic Evaluation Frameworks
No single framework catches everything. Mature programs layer five approaches, each covering a different slice of the risk surface.
1. Scenario-based adversarial testing
Curated, high-risk scenarios drawn from your actual domain: a finance agent reconciling payments, a healthcare agent triaging referrals, a coding agent with shell access. Each scenario encodes a specific harmful outcome you're testing for, not a generic "is this safe" question. This is the highest-signal, lowest-cost starting point, and it's where you encode institutional knowledge about how your system is supposed to behave.
2. Sandboxed environment red teaming
Run the agent in an isolated environment with mock tools, synthetic data, and canary resources — fake credentials, honeypot files, tagged records, and monitored egress endpoints. If a canary is touched, you have proof of a boundary violation with zero production risk. Detection should be layered: canary access logs, egress monitoring for tagged data, and alerting on any write to a honeypot path. Sandboxes also let you safely test destructive actions you'd never allow live.
3. Automated adversary agents (LLM-vs-LLM)
A red-team LLM generates adaptive attacks against the target agent at scale. Because the adversary sees the agent's responses, it can iterate — probing for the tool call that unlocks the next step. This is the only approach that scales attack generation to thousands of scenario variants, but it does not scale adjudication: expect a high false-positive rate and non-reproducible findings unless you pin seeds and environment state. Budget for human review to separate real findings from noise.
4. Trajectory-level evaluation and process reward models
Score the full action sequence, not just the final answer. Trajectory evaluators grade each step for safety, coherence, and necessity, and process reward models flag steps that are suspicious even when the outcome is correct. A correct answer reached through a dangerous path is still a failure. This is the layer that catches goal drift and reward hacking, because it inspects how the result was reached, not just that it was.
5. Human-in-the-loop escalation reviews
Route ambiguous or high-severity trajectories to human reviewers. This is expensive, so reserve it for cases where automated scoring is uncertain or the potential blast radius is large. Human review is also where you discover new failure categories that your automated tests weren't designed to catch — the ones that later become scenarios in layer 1.
Coverage matrix
| Failure class | Scenario | Sandbox | Adversary | Trajectory | Human |
|---|---|---|---|---|---|
| Capability (stuck, hallucinated tool) | ● | ● | ○ | ● | ○ |
| Specification gaming | ● | ○ | ● | ● | ● |
| Reward hacking | ○ | ● | ● | ● | ● |
| Goal drift | ○ | ○ | ● | ● | ● |
| Unauthorized action / exfiltration | ● | ● | ● | ● | ○ |
● primary detection · ○ secondary / partial
The frameworks aren't competing. Scenario testing finds known risks, adversary agents find unknown ones, and trajectory evaluation catches the failures that only exist in the sequence.
Harness Design: What You Actually Build
A taxonomy is not a harness. Here is the minimum viable architecture, in the order you should build it.
Components
- Orchestrator — drives the agent through a scenario, controls step budget and termination conditions, and records every action, observation, and internal state transition.
- Tool shim — a proxy layer between the agent and every tool. This is non-negotiable: it is where you log calls, enforce allow/deny lists, inject canaries, and simulate failures. Never let the agent call a real tool directly during red teaming.
- Environment sandbox — mock services, synthetic data, and canary resources. Reset to a known state before every run.
- Trajectory recorder — append-only log of steps: prompt, plan, tool call, tool result, memory read, memory write. This artifact is your finding.
- Evaluators — a set of scorers (rule-based, model-based, and human) that run over the recorded trajectory, not the live agent.
- Triage queue — where findings land, get deduplicated, reproduced, and converted into regression tests.
Determinism and reproducibility
Agentic evals are non-reproducible by default. Control these or your findings won't survive review:
- Pin the model version and record it with every run. A silent model update invalidates your baseline.
- Set temperature to 0 where the API allows it, and seed where it doesn't.
- Freeze tool responses — record real tool outputs once and replay them, so a run is reproducible even if the upstream service changes.
- Snapshot environment state before each run and reset between runs.
- Version your scenarios the way you version code.
A finding you cannot reproduce is an anecdote. A finding with a recorded trajectory, a pinned model version, and a replayable tool log is evidence.
Where this runs in CI
- Per-PR (smoke): a small set of fast scenario tests and canary checks. Minutes, not hours. Blocks merges on hard failures.
- Nightly (full suite): the complete scenario library plus adversary-generated variants. Trajectory evaluators run here.
- Pre-release (deep red team): human-in-the-loop review of high-severity and ambiguous trajectories, plus a fresh adversary campaign against the release candidate.
Closing the Loop: From Finding to Regression Test
Red teaming that doesn't change the system is theater. Every confirmed finding moves through a fixed loop:
- Triage — is it real, reproducible, and in scope?
- Reproduce — replay the recorded trajectory against the pinned model and frozen tools.
- Minimize — reduce the scenario to the smallest sequence that still triggers the failure.
- Convert — turn the minimized scenario into a regression test in the per-PR suite.
- Fix — change the agent, the tools, the guardrails, or the task design.
- Re-test — confirm the regression test passes and the fix didn't break other scenarios.
The regression test is the deliverable. A red team finding that isn't in CI will recur the next time someone touches the planner.
What to Take Away
- The unit of analysis is the trajectory, not the prompt. Per-step accuracy hides the tail that fails in production.
- Layer the five frameworks. Scenario testing finds known risks, sandboxes prove boundary violations safely, adversary agents find unknown risks, trajectory evaluation catches sequence failures, and human review finds new categories.
- Build the harness before you scale the tests. Tool shim, canary layer, trajectory recorder, deterministic replay.
- Treat findings as evidence, not scores. Reproducible trajectories convert into regression tests; scores convert into nothing.
- Close the loop. If a finding doesn't become a test in CI, you didn't fix it — you postponed it.