microsoft /PyRIT
Open-source AI red teaming toolkit from Microsoft. Test generative AI systems with automated scans, adaptive multi-turn attacks, and a web UI.
★ 4,871⑂ 1,063👁 53⑃ 3,450● 846▤ 25
ai-red-teamgenerative-aired-team-toolsresponsible-aiai-attacksai-evalsai-evaluationai-evaluation-tools
More from this author
+22
Daily
4,871
stars
1,063
forks
53
watchers
3,450
prs
846
issues
25
releases
README
PyRIT: AI red teaming for models and applications PyRIT (Python Risk Identification Tool for generative AI) is an open-source toolkit for finding security and safety weaknesses in generative AI systems through automated scans, adaptive multi-turn attacks, and human-led testing. Built by the Microsoft AI Red Team and an open-source community of contributors, PyRIT brings a command-line scanner, a graphical interface, and an extensible Python framework together in one toolkit. You do not need to be a Microsoft employee or an experienced red teamer to get involved. Join our Discord community to ask questions, exchange techniques, share what you are building, and connect with maintainers and other users. Contributions include code, documentation, examples, bug reports, testing, and feedback from real-world use. Read the contributor guide and explore issues labeled "help wanted". Get started | Join Discord | Read the whitepaper Explore PyRIT - Scanner: Run repeatable assessments from the command line. - CoPyRIT GUI: Explore AI systems interactively and review results in your browser. - Python framework: Compose and extend components to build custom red teaming workflows. Visit our website for installation, configuration, demos, and documentation. Use the version picker to match the docs to your installation; the guides above follow the latest development version. Models and systems Connect to OpenAI, Anthropic, Azure OpenAI, Microsoft Foundry, Azure Machine Learning, Google Gemini, Google Vertex AI, AWS Bedrock, Hugging Face, Ollama, Groq, OpenRouter, Cohere, and GitHub Copilot. Use OpenAI-compatible APIs or built-in targets, or install the optional LiteLLM adapter for additional provider integrations. See the provider configuration guide and LiteLLM provider directory for setup and more providers. Available features depend on the target and model. Test complete applications and other endpoints through HTTP, WebSockets, browser automation with Playwright, or custom targets. Research and citation Read PyRIT: Democratizing AI Red Teaming Through Open-Source Tooling for the design principles and real-world experience behind the toolkit. If you use PyRIT in your research, please cite the paper using CITATION.cff. Security To report vulnerabilities in PyRIT privately through the Microsoft Security Response Center, follow our security policy. Trademarks This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
Top issues
#3166Python 3.11 adoption opportunities: claim one improvement at a time205 comments · 2026-10-13#266FEAT Add adaptive jailbreaking13 comments · 2024-06-28#2241FEAT: MaliciousToolCallInjection attack strategy for agentic pipeline red teaming12 comments · 2026-07-21#4216MAINT: Reduce the keyword-only baseline, starting with private helpers11 comments · 2026-11-11#2475Labelled responses from remote datasets can't reach `HumanLabeledDataset`11 comments · 2026-08-24#791DOC Adversarial model doc page11 comments · 2025-03-14#2489FEAT Add generic GCG model adapters and an open-weight SLM compatibility matrix10 comments · 2026-08-25#3579FEAT: Report confidence intervals and scorer specificity alongside attack success rates in analytics8 comments · 2026-10-27
Discussions
#586Using LM Studio0 comments · 2024-12-03#370Finetuning OpenAI model with prompt injections, to act as the attacker LLM0 comments · 2024-09-12#348Tutorial on PyRIT on AWS1 comments · 2024-08-23#346Can we use PyRIT on local HF models?1 comments · 2024-08-23#326A little confused on merged code (such as EndTokenRedTeamingOrchestrator)1 comments · 2024-08-14#311pyrit with OpenAI key1 comments · 2024-08-01#295Support Custom API endpoint2 comments · 2024-07-24#250When is the next release?1 comments · 2024-06-20
Latest release
v1.2.0 v1.2.0 2026-11-13PyRIT v1.2.0 What's changed? PyRIT v1.2.0 delivers a major upgrade to the CoPyRIT GUI, making it easier to launch, monitor, compare, and report on security assessments. Reusable scenario configurations, grouped launches, persistent engagements and findings, and richer result analytics turn individual scans into repeatable, reviewable workflows. The release also expands attack techniques, targets, converters, datasets, and scoring options. Python support is now =3.11, <3.15. 🌟 Highlights - A major CoPyRIT GUI update brings scan launch, live progress, history, scoring, compariso