PyRIT

microsoft.github.io

Microsoft's open-source AI red-teaming toolkit: automated scans, adaptive multi-turn attacks and a web UI for testing generative AI.

GitHub stars
5,038
License
MIT
Language
Python
Pricing
Open source
Published
Nov 15, 2026

Next steps

What it does

PyRIT (Python Risk Identification Tool for generative AI) is built by the Microsoft AI Red Team and open-source contributors to find security and safety weaknesses in models and AI applications. It combines a command-line scanner for repeatable assessments, the CoPyRIT GUI for exploring a system interactively in the browser, and an extensible Python framework for composing custom red-teaming workflows, covering automated scans, adaptive multi-turn attacks and human-led testing. MIT licensed.

Use cases

  • Run repeatable security and safety scans against a generative AI app from the command line
  • Probe a chatbot with adaptive multi-turn attacks before release
  • Build custom red-teaming workflows in Python and review results in the CoPyRIT web UI

Frequently asked questions

What is PyRIT?
PyRIT (Python Risk Identification Tool for generative AI) is Microsoft's open-source toolkit for finding security and safety weaknesses in generative AI systems.
Who builds it?
It is built by the Microsoft AI Red Team together with open-source contributors.
What does it include?
A command-line scanner for repeatable assessments, the CoPyRIT browser GUI for interactive testing, and an extensible Python framework.
Is it free?
Yes, PyRIT is MIT licensed.
Log in to join the discussion