What is AI red teaming?
It is an organized attack exercise, run by authorized testers, to find the flaws in an AI system before an adversary does. NIST defines it this way in its generative AI profile:
A structured testing exercise used to probe an AI system to find flaws and vulnerabilities such as inaccurate, harmful, or discriminatory outputs, often in a controlled environment and in collaboration with system developers.NIST AI 600-1, July 2024, Appendix A.1.5
The definition centers on outputs: inaccurate, harmful, discriminatory. That is the tradition of model red teaming, born in the labs. It says nothing about what matters to a company deploying an agent: what the system does once it has been hijacked. In its section on the subject, NIST also specifies that it focuses on red teaming in the pre-deployment phase. An agent also goes wrong after deployment, when it reads a document no tester has seen.
The rest of this page reads red teaming for that second case: an agent that receives instructions, calls tools and changes systems.
Red teaming a model, red teaming an agent
The difference fits in one line: a model produces text, an agent produces effects. The table sets out the gaps that change the method.
| Test question | Model | Agent |
|---|---|---|
| What you look for | A forbidden or false output. | An unwanted action: send, write, delete, pay, call a tool. |
| How the attack gets in | The user's message. | Everything the agent reads: pages, emails, files, tool responses, memory. See indirect prompt injection. |
| Unit of testing | One request and its response. | A multi-step trajectory in which no single step is forbidden. See multi-step attacks. |
| Where the risk sits | In the model. | In the assembly: model, tools, rights, tool servers, service accounts. |
| What proves failure | The text produced. | The trace of the action and the state of the system afterward. |
Microsoft drew eight lessons from testing more than 100 generative AI products. The first is a sentence every agent program should post on the wall:
Understand what the system can do and where it is appliedBullwinkel et al. (Microsoft), "Lessons From Red Teaming 100 Generative AI Products", arXiv:2501.07238, January 13, 2025, lesson 1
For an agent, "what the system can do" is a list of tools and rights. A test without that inventory measures the model's politeness, not the agent's risk. Another of the eight lessons in the paper states that AI red teaming is not safety benchmarking: you are not looking for a score, you are looking for a path.
What the rules and guides require
No text says "test your agents" in those words. Several require or describe red teaming, for different audiences.
| Reference | What it says about red teaming | Who it addresses |
|---|---|---|
| AI Act, Article 55(1)(a) | Requires adversarial testing of the model to be conducted and documented. | Providers of general-purpose AI models with systemic risk. |
| AI Act, Article 9(6) to (8) | Requires testing, at any point during development and before placing on the market or putting into service, against metrics and thresholds defined in advance. | High-risk AI systems; deadline of December 2, 2027 for Annex III. |
| NIST AI 600-1 (July 2024) | Defines red teaming and distinguishes three forms: general public, expert, and a combination. | Any organization managing the risk of a generative AI system. |
| OWASP, GenAI Red Teaming Guide (January 22, 2025) | Covers four areas: model evaluation, implementation testing, infrastructure assessment, runtime behavior analysis. | Security practitioners, AI engineers, CISOs, architecture teams. |
| MITRE ATLAS | A public knowledge base of adversary tactics and techniques against AI systems. | Public access: the data is distributed in an open repository. |
The AI Act says the exact thing in Article 55. It targets the provider of the model, not the company building an agent on top of it:
perform model evaluation in accordance with standardised protocols and tools reflecting the state of the art, including conducting and documenting adversarial testing of the model with a view to identifying and mitigating systemic risksAI Act, Article 55(1)(a)
The obligations of providers of general-purpose AI models have applied since August 2, 2025. The deployer of an agent is outside the scope of Article 55. Its requirement comes from elsewhere: if the agent is high-risk, Article 9 requires testing before it goes into service, and Article 15 requires cybersecurity measures, for which testing supplies the evidence. The full reading is in agentic AI and the AI Act and in Article 15 read for agents.
On the government side, the UK AI Security Institute published its first report on frontier AI trends on December 18, 2025. Its team writes that it found universal jailbreaks in every system tested. NIST, through its Center for AI Standards and Innovation (CAISI), tested agent hijacking on the open AgentDojo framework: working with the UK AISI, it raised the success rate of the strongest baseline attack from 11% to 81% on AgentDojo Workspace tasks held out from tuning. It writes: "Currently, many AI agents are vulnerable to agent hijacking". The result to keep is this one: a defense that looks solid against known attacks gives way to an attack adapted to it.
Open tools
Three open source projects automate these tests. They automate volume; they do not replace a scenario written by someone who knows the agent.
| Tool | Description from its repository | License |
|---|---|---|
| PyRIT (Microsoft) | "Open-source AI red teaming toolkit from Microsoft. Test generative AI systems with automated scans, adaptive multi-turn attacks, and a web UI." The Azure/PyRIT repository, archived on March 27, 2026, points to github.com/microsoft/PyRIT. | MIT |
| garak (NVIDIA) | "the LLM vulnerability scanner"; the README adds that garak checks whether an LLM-backed application can be made to fail in a way we don't want. "Probes" generate the interactions, "detectors" spot the failure. | Apache-2.0 |
| promptfoo | "Test your prompts, agents, and RAGs. Red teaming/pentesting/vulnerability scanning for AI." The README states that the project is now part of OpenAI and remains open source and MIT licensed. | MIT |
Two remarks on use. First, these tools query an application through its interface; for an agent, the value comes from the test bench you give them, an environment where the tools exist but their effects are harmless. Second, a scanner produces a list of passes and failures on known families; it does not tell you whether your agent can chain three permitted steps to reach a forbidden outcome. That reading stays human.
Public challenges: what they showed
Open competitions provide large-scale data on how humans attack agents. Their organizers publish the figures.
- October 24, 2023HackAPrompt (Schulhoff et al.). A worldwide prompt hijacking competition collects more than 600,000 adversarial prompts against three language models and derives a taxonomy of attacks from them. The authors conclude that current models can be manipulated into ignoring their instructions.
- January 14, 2025Gandalf (Lakera). Lakera's public game feeds the paper "Gandalf the Red": 279,000 attacks published as a dataset. Its authors show that defenses placed in the model, such as the system prompt, can degrade legitimate use even when they block nothing. They show that restricted application domains, defense in depth and adaptive defenses are effective strategies.
- March 8 to April 6, 2025Gray Swan agent challenge with the UK AISI. 1.8 million attempts against 22 models and 44 harmful agent behaviors, 62,000 breaks recorded, $171,800 in prizes paid to 161 testers.
- July 28, 2025Paper "Security Challenges in AI Agent Deployment" (Zou et al.). Across 22 agents and 44 scenarios, more than 60,000 attacks cause a policy violation: unauthorized data access, illicit financial actions, regulatory non-compliance. Almost all agents violate their policy on most behaviors within 10 to 100 queries; attacks transfer from one model to another; an agent's resistance is only weakly correlated with the model's size, capability or inference-time compute.
- March 16, 2026Paper on indirect injection (Dziemian et al.). 464 participants submit 272,000 attempts against 13 frontier models, 8,648 of them successful across 41 scenarios, covering tools, code and computer use. Every model is vulnerable; the success rate ranges from 0.5% to 8.5% depending on the model; some universal strategies succeed on 21 of the 41 behaviors.
- March 23, 2026NIST's CAISI publishes its joint analysis with Gray Swan and the UK AISI: more than 250,000 attempts by more than 400 participants, and at least one successful attack against every targeted model.
Given enough attempts, motivated humans broke every targeted model at least once.
Two practical lessons follow. The first is statistical: a success rate of a few percent per attempt becomes near-certainty for an attacker who tries a hundred times. CAISI measured it: when each attack was repeated 25 times, the average rate across five injection tasks rose from 57% to 80%. The second concerns rankings: a model's capability predicts its resistance only weakly. Choosing the most capable model is therefore no substitute for a defense. Eris attacks your system every night with the strongest models, learns from what gives way, and inoculates. These attacks appear in context, alongside the other public cases, in the incident timeline.
How to run a red team on your own agents
The method comes down to six decisions made before the first test.
- Write the scope. Which agents, tools, data and actions are in the test, and which are off limits. The scope rests on the inventory of each agent's rights, not on the description of its role.
- Build a separate environment. Same tools, same connectors, same data formats, but dummy accounts, test mailboxes and fabricated datasets. The effects of a successful attack must be real for the system and harmless for the company.
- Start from the attacker's objectives, not from a list of techniques. Get data out, trigger a payment, install lasting access, get a command run. Each objective becomes a scenario that crosses several steps, because no single step is forbidden on its own.
- Attack through what the agent reads. Documents, incoming emails, web pages, tool responses and memory are the inputs the test team controls and the agent treats as trusted. This is the vector measured by the March 2026 paper on indirect injection.
- Measure the action, not the answer. A test succeeds when the state of the system has changed in an unauthorized way. The text shown to the user proves neither failure nor success: the March 2026 paper measures precisely the attacks whose final response shows nothing.
- Replay at every change. A new model, a new tool, a new source of documents: the scope has moved, so the test has too. Microsoft's eight lessons end on the same observation: the work of securing an AI system is never finished.
The legal framework in France
Red teaming is a controlled intrusion, and French criminal law only knows intrusion. Article 323-1 of the Criminal Code punishes "the act of accessing or remaining, fraudulently, in all or part of an automated data processing system" (our translation) with three years' imprisonment and a fine of 100,000 euros, rising to five years and 150,000 euros if the act deletes or modifies data or alters the operation of the system. The word that separates a test from an offense is "fraudulently": access without the consent of the system's holder. A written agreement keeps the proof.
Three rules of conduct follow. Test only systems the company holds, or for which the holder has given written, bounded consent. Never aim a test attack at the service of a third party that the agent uses, such as an email or CRM provider: you test the agent against a test environment, not the provider. And keep the authorization letter with the report. For tools, Article 323-3-1 punishes importing, holding, transferring or making available programs designed to commit these offenses "without legitimate reason, notably research or computer security" (our translation).
When the test touches real personal data, the GDPR applies to the test as to everything else: prefer fabricated data.
From findings to defenses
A red team report that stops at the finding has not done its job. Every successful trajectory must end in one of four changes, in this order of preference: remove the right the attack exploited, add a deterministic control at the point of action, require validation by a person when the action matters, or, last, add a detection rule. Fixing the prompt does not count: Gandalf the Red shows that defenses placed in the model, such as the system prompt, can degrade legitimate use without blocking anything.
A useful report contains, for each finding, the full trace of the action, the input that triggered it, the right that allowed it and the remediation decision. The same log then serves as evidence for the auditor; see tamper-proof logs.
SentinelOS sits between your agents and everything they touch: it judges every action before it leaves, including when the order comes from a document the agent read. Its listening mode observes and records everything without blocking anything, before switching to enforcement.
What teams ahead of the curve schedule now
- They test trajectories, not prompts. Each scenario starts from an attacker objective and crosses several permitted steps.
- They separate test from production. Twin environment, dummy accounts, fabricated data, signed authorization letter.
- They start from what the agent reads. Every source of external content becomes a test input channel.
- They measure success rate per volume of attempts. A result over ten attempts says nothing about the risk at a thousand.
- They replay after every model or tool change. A more capable model is not a more resistant model.
- They turn every finding into a right removed or a control added. The fix lives outside the prompt.
- They keep the evidence. Scope, authorization, traces and fixes fit in a file an auditor can read alone. See also autonomous attacker agents: tomorrow's adversary already automates what you test by hand.
SentinelOS judges every action of your agents before it leaves, holds the ones that matter for a person, and signs every decision. Installed on your premises.
Discover SentinelOSSources
- NIST, "Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile" (NIST AI 600-1), July 2024. doi.org/10.6028/NIST.AI.600-1
- Regulation (EU) 2024/1689 (AI Act), Articles 9 and 55, and Regulation (EU) 2026/1744. eur-lex.europa.eu
- OWASP GenAI Security Project, "GenAI Red Teaming Guide", January 22, 2025. genai.owasp.org
- MITRE ATLAS, knowledge base. github.com/mitre-atlas/atlas-data
- UK AI Security Institute, "5 key findings from our first Frontier AI Trends Report", December 18, 2025. aisi.gov.uk
- NIST CAISI, "Technical Blog: Strengthening AI Agent Hijacking Evaluations", January 17, 2025 (updated December 19, 2025). nist.gov
- NIST CAISI, "Insights into AI Agent Security from a Large-Scale Red-Teaming Competition", March 23, 2026. nist.gov
- Microsoft, Bullwinkel et al., "Lessons From Red Teaming 100 Generative AI Products", arXiv:2501.07238, January 13, 2025. arxiv.org
- Microsoft, PyRIT. github.com/microsoft/PyRIT; NVIDIA, garak. github.com/NVIDIA/garak; promptfoo. github.com/promptfoo/promptfoo
- Schulhoff et al., "Ignore This Title and HackAPrompt", arXiv:2311.16119, October 24, 2023. arxiv.org
- Pfister et al., "Gandalf the Red: Adaptive Security for LLMs", arXiv:2501.07927, January 14, 2025. arxiv.org
- Gray Swan AI, "UK AISI × Gray Swan Agent Red-Teaming Challenge: Results Snapshot", May 9, 2025. grayswan.ai
- Zou et al., "Security Challenges in AI Agent Deployment: Insights from a Large Scale Public Competition", arXiv:2507.20526, July 28, 2025. arxiv.org
- Dziemian et al., "How Vulnerable Are AI Agents to Indirect Prompt Injections? Insights from a Large-Scale Public Competition", arXiv:2603.15714, March 16, 2026. arxiv.org
- Code pénal (French Criminal Code), Articles 323-1 and 323-3-1. legifrance.gouv.fr
