Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

microsoft/PyRIT

Security & Privacy

Open-source toolkit for red-teaming generative AI systems via automated scans, adaptive attacks, and a Python framework.

4,828
1,055
Python
MIT
2 years old

What PyRIT does

PyRIT (Python Risk Identification Tool for generative AI) is an open-source toolkit from the Microsoft AI Red Team for finding security and safety weaknesses in generative AI systems. It combines three entry points in one project: a command-line scanner for repeatable assessments, a browser-based GUI called CoPyRIT for interactive exploration, and an extensible Python framework for composing custom red-teaming workflows. It is aimed at security researchers, AI engineers, and safety teams who need to test models and full applications rather than only chat interfaces.

PyRIT connects to hosted providers including OpenAI, Anthropic, Azure OpenAI, Google Gemini, AWS Bedrock, Hugging Face, Ollama, Groq, OpenRouter, Cohere, and GitHub Copilot. Beyond model providers, it can test applications through HTTP, WebSockets, Playwright browser automation, or custom targets, so the same workflows can exercise real product endpoints. An optional LiteLLM adapter broadens provider coverage.

Get started

The official entry point is the project website, which hosts installation, configuration, demos, and version-matched documentation. The README does not include a pip install command or a minimal code sample, so start from the site rather than guessing a package name or invocation.

  1. Use the website's version picker to select the documentation matching the version you install, then follow the installation and configuration guide there.
  2. Configure credentials for the model provider or application endpoint you want to test; the provider configuration guide covers where secrets are populated. Available features depend on the target and model.
  3. Choose an entry point: the Scanner for command-line assessments, the CoPyRIT GUI for interactive browser-based review, or the Python framework to build custom workflows.
  4. If your target is an application rather than a model API, follow the target guides for HTTP, WebSockets, Playwright, or custom targets.

Usage constraints

The scanner and GUI run against live model providers or application endpoints, so testing requires valid credentials and may incur provider usage costs. Feature coverage varies by target and model; the LiteLLM adapter is optional and needed only for providers not covered by the built-in targets. The project is MIT-licensed, and the documentation set distinguishes the latest development version from released versions, so the guides to follow depend on your installed version. This tool is intended for authorized security and safety testing; ensure you have permission to probe the systems you point it at.

HotRepo's take

The repository has recorded a single Python daily-list snapshot on 2026-11-14, with 4,825 stars, 1,055 forks, 22 stars gained that day, and a best position of 9 on that list. That single record supports only that day's standing, not a growth trend. The more useful signal for evaluators is the project's scope: rather than a prompt-injection demo, it ships a scanner, a GUI, and a framework with targets for HTTP, WebSockets, and browser automation, which is the kind of coverage teams need to test deployed applications rather than just model APIs. The absence of an all-language daily rank record and of longer time series means its broader popularity is not established by the data here.

Written by AI from the project's README, updated . The project's own docs are the source of truth.