PyRIT

Microsoft's free, open-source framework for automated red teaming of generative AI.

Verified by our editorsAI Security Tools
Visit microsoft.github.io ↗︎Last verified: 2026-11-29
FreePrice
MITLicense
MicrosoftBuilt by
PythonLanguage
The short version

What is PyRIT?

PyRIT is Microsoft's open-source toolkit for red teaming generative AI. The name stands for Python Risk Identification Tool. It automates attacks against models and AI apps, scores the answers and keeps a memory of every conversation for review.

It was built by the Microsoft AI Red Team, which has used it on more than 100 generative AI products. It's a Python library, so it suits security engineers who want to script their own tests.

What it actually does

Key features

Automated attacks

Run multi-turn attacks against a model or app instead of typing prompts by hand.

Scoring

Score each answer to flag where the target broke its rules.

Memory

Every conversation is stored so you can review and share what happened.

Any target

Model- and platform-agnostic, with support for many modalities and non-English attacks.

Free and open source

MIT license. Current home: github.com/microsoft/PyRIT.

What it costs

PyRIT pricing (2026)

PyRIT is free and open source.

PlanPriceWhat you get
Open sourceFreeEverything, under the MIT license.

Checked 29 Nov 2026.

Honest fit

Who it's for, who it isn't

Pick PyRIT if

  • You want to script repeatable red-team tests in Python
  • You test AI agents or multi-turn chat flows

Look elsewhere if

  • You want a point-and-click tool
  • You need protection running in production
What people ask

PyRIT FAQ

What is PyRIT?

Microsoft's open-source framework for red teaming generative AI.

Is PyRIT free?

Yes. It's open source under the MIT license.

Where is the PyRIT code?

At github.com/microsoft/PyRIT. The old Azure/PyRIT repository is archived.
Keep comparing

PyRIT alternatives