Skip to content
microsoftPublic

Latest commit

 

History

2,644 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyRIT: AI red teaming for models and applications

Code contributors PRs merged Issues closed

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.

Releases

Packages

Used by

Contributors

Languages