RED TEAM // TOOLCHAIN
← back to the map
the toolchainoffense

PyRIT

Microsoft AI Red Team · open source

PyRIT (Python Risk Identification Tool) is Microsoft's open-source framework for probing generative-AI systems for safety and security risks. Instead of hand-crafting prompts, you wire up an attacker LLM that drives adversarial conversations against a target model and an automated scorer that decides whether the attack landed — turning red teaming into a repeatable, automatable pipeline.

What it's good at

PyRIT's core abstraction is the orchestrator, which coordinates a target, a set of converters, and one or more scorers:

Where it falls short

The attacker-LLM-plus-scorer design means two model calls per turn (sometimes three with judge scoring) — cost and latency add up fast across a multi-turn campaign, and you're paying for both the offense and the grading. It's a framework, not a one-shot CLI: expect a steeper learning curve than a fuzzer. You configure targets, orchestrators, converters, and scorers in Python, and getting good signal depends on tuning your scorer — a sloppy judge produces noisy results that look like findings but aren't.

How to start

Requires Python 3.10–3.13. Install and point it at a target:

The official docs and runnable notebooks at microsoft.github.io/PyRIT ↗ walk each orchestrator end-to-end. Note: the old Azure/PyRIT repo was archived (March 2026) — microsoft/PyRIT is now canonical.