PyRIT red teaming for EU AI Act adversarial testing

PyRIT can generate repeatable adversarial test evidence for EU AI Act reviews, but it does not establish legal conformity. This page maps the requirements to what PyRIT produces and what you still need.

On this page

Where PyRIT red teaming helps with EU AI Act adversarial testing

If you are a compliance or security lead who must show adversarial testing for a general-purpose AI model or a high-risk system, PyRIT helps you evidence risk identification and robustness testing. It does not establish conformity assessment, legal classification of your system or certification, and no scan result should be presented as any of those. Regulation (EU) 2024/1689 has applied in stages. Chapters I and II have applied since 2 February 2025, and the general-purpose AI, governance, notified body and penalty chapters have applied since 2 August 2025, with the rest of the Act applying from 2 August 2026. The 2026 amendment in Regulation (EU) 2026/1744 moved the high-risk rules in Chapter III, Sections 1 to 3, to 2 December 2027 for Annex III systems and to 2 August 2028 for Annex I product systems. Confirm which of these dates governs your system before you set a test calendar, and confirm with counsel which obligations apply to you as provider or deployer.

PyRIT's role is to produce repeatable attack runs, scored responses and stored conversations that your team can review. Its targets, multi-turn strategies and scorers can exercise a model or application against harm categories you define, and its memory records what was sent and returned. Those records are the raw material for risk identification and robustness evidence. The classification of your system, the choice of harms that matter for it and the decision that residual risk is acceptable remain human decisions that your documentation must record. Confirm with your legal team which provisions apply to your system, and confirm which AI Office or national market surveillance authority would supervise it, since the Commission's AI Office handles the general-purpose model rules and certain AI systems, while national authorities handle most AI systems.

DeployOpen plans, configures and runs PyRIT in your infrastructure, and prepares the systems, controls and evidence your assessors will ask about. DeployOpen does not issue audit reports, attestations or certifications, and independent auditors or certification bodies make those determinations. Where an assessment depends on conformity routes, such as the internal-control route for most Annex III systems described in Article 43, your own quality management and technical documentation carry that weight. The first harmonised standard, EN 18286:2026 on quality management, was cited in the Official Journal on 14 October 2026, so confirm its status and the harmonised standards that apply to your system before you map PyRIT outputs to them.

How PyRIT maps to each EU AI Act testing requirement

This table compares each EU AI Act testing requirement in the supplied scope with the PyRIT capability that supports it, the configuration it needs, and the point where a person must still review the result. Read it as a map of what a scan can contribute to, not as proof of compliance. The main takeaway is that PyRIT produces adversarial test evidence, while legal applicability, conformity assessment and the final judgment on adequacy stay with the provider and its assessors.

RequirementPyRIT support and configurationHuman review still required
Article 88 general-purpose AI model rules (AI Office enforcement)Run pyrit_scan or a custom attack set against the model endpoint, using targets for the hosted or self-hosted model and retaining the memory database as the run recordConfirm with counsel which obligations apply to your organization as a model provider or downstream provider, and interpret results against the AI Office's expectations
Robustness expectations for high-risk systems (Chapter III, applying from 2 December 2027 for Annex III systems)Target the full application, not only the model, using custom HTTP or WebSocket targets; add multi-turn attacks such as Crescendo, TAP and Skeleton Key; score with LLM judges and Azure AI Content SafetyDecide which failures are unacceptable for the intended purpose, and confirm the robustness metrics your quality management system requires
Custom attack coverage for use-case-specific risksWrite custom attacks in Python against your system's prompts, tools and data sources, storing each run in SQLite or Azure SQL memoryScope the threat model and justify why the chosen objectives represent foreseeable misuse in your context
Scorer validity for pass or fail decisionsPair each scorer with a recorded identity and version in memory; use custom logic where a criterion is deterministicMeasure scorer accuracy on labeled samples before relying on attack success rates in an assessment
Annex VI internal control (most Annex III systems)Store scenario configs, PyRIT version, scorer identities and results so the internal control file can reproduce each test cycleThe provider decides whether the internal control file is complete; PyRIT does not establish conformity
Article 43 notified body involvement (some biometric systems and Annex I products)Keep test artifacts in a form an external notified body can review, including exported conversations with access restrictions appliedConfirm early with the notified body what test evidence it accepts, since requirements vary by product and notified body
Article 113 application dates (2 August 2026 and amended high-risk dates)Schedule scans against the dates that apply to your system, and set a retest cadence tied to each releaseConfirm current applicability after Regulation (EU) 2026/1744 with legal advisers, since dates depend on system category

What PyRIT evidence an auditor can follow

An auditor reviewing PyRIT red teaming against EU AI Act adversarial testing expectations will ask whether each result can be traced back to the exact setup that produced it. The six items below connect a finding to its conversation, configuration, software version, scorer and reviewer, and each needs restricted access and a retention period that your organization sets.

Memory database with conversations

PyRIT stores conversations and results in SQLite or Azure SQL, so this database is the primary record of what was sent to the target and what came back. Decide where the file or database lives, who can query it, and how it is backed up before the first run. Because it holds harmful model output, restrict it to named red team staff and confirm that copies in backups follow the same rules.

PyRIT documentation

Scenario and attack configuration

Keep the scenario definition, attack strategy, dataset and converter settings used for each run as files under version control. An auditor needs to see that the same adversarial test can be repeated and that changes between cycles are visible. Store these configs alongside the memory records so that a finding links to the exact attack that produced it.

Pinned PyRIT version at test time

Record the exact PyRIT release and Python version used for each assessment, for example through a pinned requirements file. The project's own release history shows that behavior changes between versions, so a result from one release may not reproduce on another. Confirm that the version is captured in the run record and in the environment that produced it.

Scorer identity and settings

Each score depends on the scorer that produced it, whether that is an LLM judge, Azure AI Content Safety or custom logic. Record the scorer name, model or service version, prompt or threshold settings and any scale used, because a harm score cannot be compared across runs if the judge changed. Ask whether scorer accuracy was measured, since an auditor will ask how much the judgments can be trusted.

Run labels and operator records

Labels tie each run to a system under test, an operator, a date and a purpose, which lets you filter the memory database to one AI system during an assessment. Define a labeling convention before testing starts and write down who may create runs. Without consistent labels, a reviewer cannot separate evidence for one product from another.

Exported conversations for review

Export the conversations behind each finding into a review package that a named reviewer can read without direct database access. Limit exports to the findings in scope, mark them as containing harmful content, and log who received them. Retention for exports is often shorter than for the memory database, so set both periods explicitly and document them as organizational decisions.

What a PyRIT scan cannot show on its own

A PyRIT attack success rate measures outcomes against the objectives, datasets, converters and scorers you chose for a run. It does not show that the system meets the Act's requirements. A low rate means the chosen attacks did not succeed against the chosen target under the chosen scorer. It says nothing about harms outside that set, and an assessor will ask how the objectives were selected and why. Scorer accuracy is the first limit to check. An LLM judge, Azure AI Content Safety or custom logic can mislabel responses, so measure scorer accuracy against human-labeled samples before you cite any rate as evidence, and record which scorer produced each result.

Coverage is the second limit. Seed datasets reflect the harms their authors anticipated, and many were written in English. Multilingual prompts, audio, image and document inputs, and multimodal workflows need their own converters, datasets and scorers, or the gap should be stated in the evidence file. Application context matters as well: a scan of a model endpoint does not exercise retrieval sources, tools, permissions or user roles in the deployed product unless those are part of the target you built. The Act's high-risk obligations also cover data governance, technical documentation, post-market monitoring and human oversight. PyRIT produces none of these. Your evidence pack needs separate records for training data governance, the technical file, monitoring plans and the oversight design for each system.

Finally, a result is tied to a specific model version, system prompt and configuration. Any change to the underlying model, a prompt, a filter, a retrieval source or a converter can change the outcome, so earlier results do not carry over to the current system. Set retest triggers in your change process and store the scenario configuration and PyRIT version with each run, so an auditor can see which system a result describes. Confirm with your legal and compliance teams which Article 9 risk management and Article 15 robustness obligations apply to each system, and which application dates in the 2026 amendment affect your timeline.

Gaps PyRIT does not cover for the AI Act

A PyRIT run produces attack results, scores and conversation records. The AI Act asks for considerably more than that: a classification decision, a documented quality system, lifecycle records and a set of governance decisions made by people. The cards below mark where those obligations sit outside PyRIT, so you can assign each one before an assessor asks.

Legal risk classification

PyRIT tests a system but does not decide which risk tier the system falls under. Whether a use case is prohibited, high risk, subject to transparency duties or outside the Act depends on the intended purpose, the deployment context and the Annex III categories. Record the classification decision and its reasoning before scoping any red team run, and have counsel confirm it. Re-check it whenever the intended purpose changes.

Annex III high-risk date
2 December 2027
AI Act overview

Conformity assessment and quality management

For most Annex III high-risk systems, the provider runs an internal-control conformity assessment, and notified bodies take part only in some biometric and Annex I cases. A PyRIT report is one input to that work, not the assessment itself. Confirm with your notified body or standard owner how EN 18286:2026 on quality management, cited in the Official Journal on 14 October 2026, applies to your organization.

Technical documentation and logging outside memory

The Act requires technical documentation and automatic event logging across the system lifecycle. PyRIT memory holds attack conversations and scores, but it does not hold design specifications, training data provenance, change history or production logs. Map each documentation and logging obligation to a named source, such as a repository, an observability stack or a ticketing system, and confirm the retention periods with counsel.

Serious incident reporting

PyRIT can surface a failure mode in testing, but it does not detect or report serious incidents in production. The Act expects providers and deployers to identify, assess and report serious incidents to the relevant authorities within defined timeframes. Build an incident process that takes production signals, customer reports and retest findings as inputs, and confirm reporting duties and recipients with counsel.

Human oversight design

Human oversight is a property of how the system is designed and operated, including who can override outputs, stop the system and interpret its results. A red team scan can show that a safeguard fails under attack, but it cannot show that the oversight role is staffed, trained or effective. Document the oversight roles, the stop conditions and the training records, and validate the design with the people who will hold those roles.

Certificates and validation

PyRIT does not issue, validate or sign any certificate, attestation or conformity statement. Its scores and reports are not an audit opinion, and a clean scan does not establish compliance. Confirm with the notified body or the relevant authority which evidence they will accept, and treat PyRIT output as supporting material within that package.

Regulation text

How to configure PyRIT red teaming for AI Act evidence

This sequence turns a PyRIT installation into repeatable adversarial test runs whose settings, scorers, versions and results can be shown to a reviewer. It starts with scoping the system and ends with a retest schedule tied to material changes.

  1. Confirm the system's role and risk level

    Before installing anything, the compliance lead and the system owner record whether the organization is a provider or deployer, which AI system or general-purpose model is in scope, and which risk category the Act's four-level structure places it in. The testing scope follows from that record, since general-purpose AI model rules, high-risk system robustness and other obligations point to different evidence. Confirm the Article 2 applicability and the enforcing authority with counsel. The step is done when a signed scope note names the system, its version, its role and its target dates.

  2. Install PyRIT on a supported Python version

    The platform engineer installs PyRIT from PyPI in an isolated virtual environment on a Python version from 3.10 up to but not including 3.15. The PyRIT documentation recommends Python 3.13, so use that unless your standard image requires otherwise. Record the interpreter version and the installed PyRIT package version in the test record. The step is done when the scanner runs and reports its version without errors.

  3. Set credentials and configuration files

    The platform engineer places model endpoint credentials in ~/.pyrit/.env and general settings in ~/.pyrit/.pyrit_conf, keeping secrets out of shared repositories and out of scan output. Restrict file permissions to the test operator account and confirm which target endpoints the configuration reaches, so that tests cannot silently hit a production service. The step is done when a dry run connects to the intended test target and the configuration files are checksummed for the evidence folder.

  4. Choose and document the memory backend

    Select SQLite for a single-operator setup or Azure SQL for shared, centrally managed records, and decide where the database file lives. Auditors will rely on this database to reconstruct conversations, scores and labels, so the location, backup method and access list must be written down before the first run. Confirm with your records team how long the database must be kept. The step is done when a test run writes to the chosen backend and the team can query one stored conversation.

  5. Define objectives and select scorers

    The red team lead writes the test objectives from the harms the system is expected to resist, drawing on the packaged datasets for content harms, psychosocial risks and data leakage where they fit. For each objective, pair an attack strategy with a scorer, such as an LLM judge, Azure AI Content Safety or custom logic, and record the scorer identity and its rubric. Scorer choice affects what counts as a finding, so validate scorers against a sample of human-labeled responses before relying on them. The step is done when every objective maps to a documented attack and scorer.

  6. Run scenarios with pyrit_scan or custom attacks

    The red team lead runs the packaged scenarios with pyrit_scan or runs a Python-built attack where the system needs custom logic, such as multi-turn strategies or a web application target. Each run should carry a label identifying the system version, the date and the operator. Keep concurrency and retry settings fixed across runs so results remain comparable. The step is done when each run completes and its conversations, scores and labels are present in memory.

  7. Pin versions and store results

    Pin the PyRIT version, the Python version, the scorer and the dataset versions in a lock file or environment manifest, and store that manifest alongside the scenario configuration and exported results in your evidence repository. Export the conversations needed for review under the access restrictions you set in step three. The step is done when someone outside the test team can reproduce the environment from the stored manifest and locate each finding in the export.

  8. Schedule retests after material changes

    Set a retest trigger list covering model swaps, prompt or system message changes, new tools or data sources, PyRIT upgrades and scorer changes, and define who decides when a change is material. The retest reruns the same objectives and scorers so results can be compared against the baseline. No retest interval is given here because none has been established for your system, so confirm the cadence with your compliance team. The step is done when the trigger list and owner are approved and the next retest is recorded.

How PyRIT test runs become AI Act evidence

The flow starts with the risk classification decision, which sets the objectives and datasets a test run must cover. PyRIT attacks and converters then send those prompts to the target inside the test environment, and scorers judge each response. Results land in PyRIT memory, where human review in CoPyRIT or exports turns them into an evidence file. Check that the memory store and exports are held inside a restricted boundary, because they contain harmful content that the auditor will ask you to control.

Flow from risk classification to the evidence file, with the test environment and stored harmful content marked as restricted.

Questions buyers ask about PyRIT and the EU AI Act

Does PyRIT red teaming alone satisfy EU AI Act adversarial testing?

No. PyRIT produces attack results and scores, which can serve as one piece of evidence for adversarial testing, but the Act expects a provider to show how testing fits a documented risk management and quality process. A scan shows that specific prompts produced specific outcomes against a specific system version on a specific day. It does not show that the risks were identified completely, that mitigations work across real usage, or that the system is monitored after release. Confirm with your legal and compliance team which obligations apply to your role as provider or deployer and which system or model is in scope, since the answer changes with the Act's amended application dates.

What drives the effort and cost of a PyRIT assessment?

Cost follows the written scope. The main drivers are the number of systems and model endpoints, how many harm categories and attack strategies are in scope, how the scorers are designed and validated, how much human review of harmful output is needed, and how often the assessment is repeated. Setup of the target connections and datasets is usually one-time work, while retests and continuous testing recur. Ask any provider, including DeployOpen, to separate one-time setup, the test run, analysis and reporting, and the retest cadence in a quote, and to state who pays for model API usage, since that cost lands on your account. DeployOpen fixes scope, deliverables and timelines in writing before work starts and quotes from that scope.

How long does PyRIT setup typically take?

No supplied fact gives a setup duration, so treat any number you hear as unverified. Setup time depends on how many targets must be connected, whether authentication for each target is already available, whether the datasets and objectives are agreed, and whether scoring needs calibration against human labels. Ask for a fixed-scope timeline that lists these milestones separately. For version planning, the current documentation covers PyRIT 1.1.0, released on 4 September 2026, and the package supports Python 3.10 up to but not including 3.15, with Python 3.13 recommended. Confirm the version your team pins before setup starts.

Can our team run PyRIT ourselves?

Yes, if you have engineers who can write Python, manage credentials and maintain a test environment. PyRIT installs with pip and can be run as a scanner with the pyrit_scan command, through CoPyRIT for human-led testing, or as a Python framework for custom attacks. Your team will also need to own the parts an auditor will ask about: the objectives and datasets, scorer choices and their accuracy, who reviews harmful output, how results are stored in memory and who can access them. Most teams find the scoring and evidence decisions harder than the tooling. DeployOpen can plan, implement or run the assessment with your team, or hand over a documented setup for you to operate.

What does our team need to provide for an assessment?

The assessment depends on access and decisions from your side. Expect to provide: access to each target, including endpoints, test accounts with the roles your users hold, and any non-production environment that matches production; the datasets or harm categories your risk owners want tested; named decision owners who approve scope, accept or reject findings, and sign off on mitigations; and the system documentation that describes intended use, model versions and data flows. Agree in advance who may view harmful output, where test results are stored and how long they are kept, because those rules shape the evidence record.

Which parts of EU AI Act conformity need an external auditor or notified body?

Most high-risk Annex III systems use internal-control conformity assessment under Annex VI, so the provider carries out the assessment itself, though it must keep documentation for market surveillance authorities. Notified bodies are involved for some biometric systems and Annex I products under Article 43. Conformity assessment and any certificates are issued by these bodies or by the provider under the Act, not by a red team vendor. DeployOpen does not issue audit reports, attestations or certifications. It can prepare systems, controls and evidence for an assessment, but the assessor decides whether the evidence is sufficient. Confirm with your notified body or legal counsel which route applies to your system.

How DeployOpen scopes and delivers AI red teaming evidence

DeployOpen plans and runs PyRIT red teaming as a scoped piece of work, with the scan results, memory records and written findings organized so your compliance and security teams can review them. We cover the self-hosted setup, the test plan and the handover, and we do not present a scan as a conformity assessment.

How we scope

  • Written scope names the AI systems, the general-purpose model or features under test, and the adversarial test categories.
  • The scope states which EU AI Act obligations the evidence is meant to support, and which it will not cover.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before any testing starts.

How we build

  • PyRIT is configured in your infrastructure with targets, scorers and memory storage that you control.
  • Attack strategies, datasets and scorers are chosen per test objective and recorded with their versions.
  • Scorer behavior is checked against reviewed samples so that attack success rates can be explained to an auditor.

How we hand over

  • You receive the run configurations, scenario results, exported conversations and a findings report with reproduction steps.
  • Memory retention, access restrictions for harmful content and the list of what the evidence does not show are documented.
  • Your team receives a walkthrough so the records can be reviewed and reproduced without DeployOpen present.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after the initial engagement.
  • Retests after fixes confirm whether findings are closed, with results added to the same evidence record.
  • Upgrades to new PyRIT releases are planned and tested so earlier scenario results remain comparable.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.