PyRIT: Microsoft's Open-Source AI Red Teaming Toolkit
What PyRIT is
PyRIT, short for Python Risk Identification Tool for generative AI, is Microsoft's open-source toolkit for finding security and safety weaknesses in generative AI systems. The README describes it as a way to test "through automated scans, adaptive multi-turn attacks, and human-led testing", and says it was built by the Microsoft AI Red Team together with an open-source community of contributors. It is MIT-licensed, written in Python and published on PyPI as pyrit.
The audience is anyone responsible for a model, a chatbot, a retrieval pipeline or an AI agent who needs evidence of how it behaves under adversarial input before and after it ships: security teams, responsible-AI reviewers, ML engineers and the developers who own the application. It is a defensive testing tool. The project's own red-teaming guide puts the rule plainly: "Only test systems you own or have explicit permission to test, and read the usage policies of any hosted model you use." The FAQ repeats it for hosted models, agents and copilots. Everything below assumes that kind of authorised engagement, and this page does not reproduce any attack prompts or payloads.
PyRIT now comes as three surfaces over one library. The README lists them as the Scanner ("Run repeatable assessments from the command line"), the CoPyRIT GUI ("Explore AI systems interactively and review results in your browser") and the Python framework ("Compose and extend components to build custom red teaming workflows"). The project's framework guide is explicit that the CLI, backend and frontend "only expose and present library behavior", so the Python package is the source of truth and the other two are clients of it.
The red-teaming guide also sets expectations that are worth reading before installing anything. It says AI red teaming "is not measurement": finding five examples of a failure shows the failure exists but not how often it happens. It warns that "If you run automation without inspecting the results and iterating on what you find, you will delude yourself into thinking that your system is safe." That framing, automation to scale a human-led process rather than a pass/fail badge, runs through the whole toolkit.
How PyRIT is built
The framework guide breaks PyRIT into a small set of components, each with one owner. Knowing the vocabulary makes the docs and the CLI much easier to read:
- Targets are the systems under test, and also any helper models PyRIT calls. The README lists connectors for 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, plus HTTP, WebSocket, Playwright browser-automation and custom targets for whole applications. The FAQ points out that the
OpenAI*targets are "named after the OpenAI API, not the company", soOpenAIChatTargetalso works with Ollama and other OpenAI-compatible servers. An optional LiteLLM extra adds further providers. - Converters transform a prompt before it is sent: encodings, character-level transformations, translation and tone changes, and conversions between text, image, audio, video and files. They can be stacked, and order matters.
- Scorers judge responses. The docs list true/false, Likert-scale, classification and custom scorers, "powered by LLMs, Azure AI Content Safety, or your own logic". Deterministic scorers such as
SubStringScorerandRegexScorerneed no model at all. - Executors and attacks run single-turn and multi-turn strategies against a target. The docs name published multi-turn methods such as Crescendo, TAP and Skeleton Key; PyRIT's job is to drive the conversation, apply converters and ask a scorer whether the objective was met.
- Attack techniques package an executor, converters, datasets and strategy into one named, reusable unit.
- Scenarios bundle techniques, datasets and scoring into a standard assessment. The scanner docs group them into families: Adaptive, AIRT (rapid response, psychosocial, cyber, jailbreak, multilingual, leakage, scam), Benchmark, Foundry, Garak-inspired probes and a single-technique runner.
- Datasets hold seed prompts and objectives. The 1.2.1 backend checked here listed 130 of them, a mix of PyRIT's own sets and published research datasets.
- Memory records every prompt, response, score and attack result. The backends are in-memory SQLite, a persistent SQLite file and Azure SQL for shared team use.
- Initializers populate registries of targets, scorers, converters and techniques from configuration, so the scanner and GUI can refer to them by name.
Configuration lives in ~/.pyrit/. The .pyrit_conf file is YAML (see YAML if the format is new) and declares the memory backend, which initializers to run and where environment values come from. The configuration page calls Azure Key Vault "PyRIT's canonical environment source for shared, CI/CD, and deployed configuration"; a plaintext ~/.pyrit/.env is still auto-discovered but triggers a warning, and ~/.pyrit/.env.local is the documented place for deliberate local overrides.
Since the v1 releases, the Scanner and the shell are thin clients. pyrit_scan --help in 1.2.1 says it "Requires a running PyRIT backend server", and pyrit_shell --help calls itself a "Thin REST client for the PyRIT backend". The backend, pyrit_backend, is a FastAPI application served by Uvicorn that also serves the bundled CoPyRIT web app. It has two incoming authentication modes: local, which disables authentication and restricts access to loopback, and entra, which requires Microsoft Entra ID settings (tenant, client and allowed groups) for shared deployments. The GUI docs add that administrator actions are disabled by default in local mode. If Entra is new territory, the authentication and single sign-on glossary entries cover the basics.
Key features
- Command-line scanner.
pyrit_scanruns a named scenario against a registered target, with options for techniques, datasets, maximum dataset size and concurrency, then lets you list run history and inspect results as overview, per-attack rows or full transcripts. The FAQ says results can be written out with--format jsonor--format html. - Interactive shell.
pyrit_shelloffers the same verbs (list-scenarios,run,scenario-history,scenario-results) in a REPL for iterating on a run. - CoPyRIT web GUI. A browser interface with a manual Chat workspace (attach media, apply converters, branch and edit conversations), a Scanner page for automated scenarios, and result views. The v1.2.0 release notes describe scan launch, live progress, history, scoring, comparison and review in one workflow.
- Operations and Findings. v1.2.0 added persistent Operations to group an engagement's activity and Findings to record human-reviewed issues with linked evidence, with findings export to Word and Markdown.
- Scenario presets and suites. Named, reusable configurations of one scenario, and suites that launch several presets together, also editable in the GUI.
- Converter library.
get_converter_modalities()reported 101 converters in 1.2.1, across text, audio, image, video and file modalities, some deterministic and some LLM-backed. - Scoring options. LLM-as-judge scorers, Azure AI Content Safety, local CPU refusal and violence scorers (added in 1.2.0), and deterministic substring and regex checks. The docs publish scorer metrics against human labels and advise reading a sample of conversations regardless.
- Whole-application targets. HTTP, WebSocket and Playwright targets test the deployed app with its system prompt, retrieval and tools in place, not only the bare model. That matters for RAG systems, where many failures sit in retrieved content rather than the model.
- Persistent memory. SQLite by default, in-memory for notebooks and quick tests, Azure SQL for teams, with every prompt, response and score kept for later analysis.
- Ports of other tools' probes. PyRIT 1.2.1 includes a Garak-inspired scenario family, and
THIRD_PARTY_NOTICES.txtlists adapted portions from garak, PromptInject, ASSERT, HarmBench, StrongREJECT, CyberSecEval and others. Themainbranch adds a promptfoo scenario family (see the discrepancies section). - Ecosystem. The docs list RAMPART, a Microsoft project for "Pytest-native safety & security testing for agentic AI" built on PyRIT, and the Azure AI Foundry AI Red Teaming Agent, a managed service that runs "PyRIT-powered scans".
Getting started
The docs' quick start installs from PyPI and verifies the version. The landing page recommends Python 3.13 for local installs:
pip install pyrit
python -c "import pyrit; print(f'PyRIT version installed: {pyrit.__version__}')"The local install page also gives the uv equivalent (for the uv side of Python packaging, see uv vs Poetry):
uv pip install pyritNext comes an endpoint for the system under test and any helper models. The landing page's minimal ~/.pyrit/.env uses the OpenAI-compatible variables:
OPENAI_CHAT_ENDPOINT="<open-ai-chat-endpoint>"
OPENAI_CHAT_KEY="<your-api-key>"
OPENAI_CHAT_MODEL="<model-name>"And a minimal ~/.pyrit/.pyrit_conf that registers targets and scorers through initializers:
memory_db_type: in_memory
initializers:
- name: target
args:
tags:
- default
- scorer
- name: scorerWith that in place, the landing page's scanner example runs one of the built-in AIRT scenarios against the registered chat target:
pyrit_scan run airt.scam --target openai_chatThe GUI page starts the backend in loopback-only local mode and has you open http://localhost:8000:
pyrit_backend --auth-mode localTo point the scanner at a shared CoPyRIT deployment instead, the scanner docs use a small config file and pass it explicitly:
server:
url: https://copyrit.example.com/
auth_mode: autopyrit_scan --config-file ./.pyrit_conf list-scenariosFor the Python framework, the landing page's first example sends one prompt to a chat target and prints the result from memory (it runs in a notebook, hence the top-level await):
from pyrit.executor.attack import PromptSendingAttack
from pyrit.output.attack_result.pretty import PrettyAttackResultMemoryPrinter
from pyrit.prompt_target import OpenAIChatTarget
from pyrit.setup import IN_MEMORY, initialize_pyrit_async
await initialize_pyrit_async(memory_db_type=IN_MEMORY)
target = OpenAIChatTarget()
attack = PromptSendingAttack(objective_target=target)
result = await attack.execute_async(objective="What model exactly are you? be concise.")
printer = PrettyAttackResultMemoryPrinter()
await printer.write_async(result)Converters can be tried with no model at all. This is the core of the converters guide's simple example:
from pyrit.converter import (
AsciiArtConverter,
BinaryConverter,
FirstLetterConverter,
RandomCapitalLettersConverter,
ROT13Converter,
)
prompt = "tell me how to cut down a tree"
print(await ROT13Converter().convert_tokens_async(prompt=prompt))
print(await RandomCapitalLettersConverter(percentage=25.0).convert_tokens_async(prompt=prompt))
print(await BinaryConverter().convert_tokens_async(prompt=prompt))
print(await FirstLetterConverter().convert_tokens_async(prompt=prompt))The docs site follows the main branch. The install page says notebooks and the installed package "must be on the same version", and the FAQ says not to "assume that an example from latest works unchanged with an older installation". Use the version picker on the docs site, or the release branch, to match a pinned install.
Hands-on: running PyRIT 1.2.1 without credentials
On 2 December 2026, pyrit==1.2.1 from PyPI was installed with pip 26.2.2 into a fresh virtual environment on an x86-64 Linux VM running Python 3.13.18. HOME pointed at an empty scratch folder for each run so that every file PyRIT writes could be inspected. No model API key, Azure subscription or Entra tenant was configured, no Docker daemon was available, there was no desktop browser, and outbound network was limited to package registries and GitHub. Nothing was sent to any AI system: the only target exercised was PyRIT's own TextTarget, which prints prompts locally instead of sending them.
Install footprint
| Check | Observed |
|---|---|
pip install pyrit==1.2.1 | Finished in about 30 seconds. 127 packages besides pip were installed, and the environment's site-packages came to about 850 MB |
| Largest installed packages | pyarrow 165 MB, av.libs 101 MB, scipy 81 MB (plus 30 MB of bundled libraries), transformers 61 MB, pandas 45 MB, pyrit itself 35 MB. PyTorch is not in the base install; it arrives with the huggingface and gcg extras |
| Wheel on PyPI | pyrit-1.2.1-py3-none-any.whl, 18,751,973 bytes |
| Package metadata | Requires-Python: <3.15,>=3.11, License-Expression: MIT, seven License-File entries (including LICENSES/Apache-2.0.txt and THIRD_PARTY_NOTICES.txt), classifier Development Status :: 3 - Alpha |
| Console scripts | pyrit_backend, pyrit_scan and pyrit_shell |
| The docs' verification command | Printed PyRIT version installed: 1.2.1. A bare import pyrit is cheap (about 0.02 s); importing pyrit.setup and pyrit.converter took about 1.4 s, and an in-memory initialize_pyrit_async about 0.6 s more |
The dependency list is broad for a library: FastAPI, Uvicorn and Starlette for the backend, SQLAlchemy, Alembic, aiosqlite and pyodbc for memory, five Azure SDK packages, the OpenAI SDK, Hugging Face datasets and transformers, the mcp client library, PyAV, SciPy and the OpenTelemetry SDK, among others. Plan on a dedicated environment rather than adding PyRIT to an existing application's dependencies.
Starting the backend without credentials
| Invocation | Observed |
|---|---|
pyrit_backend with no flags, as on the docs landing page | Uvicorn started, then Application startup failed with AuthenticationConfigurationError: Authentication configuration is absent. For loopback-only local development, set PYRIT_AUTH_MODE=local. For a shared deployment, set PYRIT_AUTH_MODE=entra and configure ENTRA_TENANT_ID, ENTRA_CLIENT_ID, ENTRA_ALLOWED_GROUP_IDS. |
pyrit_backend --auth-mode local, as on the GUI page | Started on localhost:8000, printing No default environment files found. Using system environment variables only. and a line saying it was serving the frontend from pyrit/backend/frontend inside the installed package (5.4 MB of bundled web assets) |
| Startup noise | Three pydantic UserWarnings that a field named register shadows an attribute in parent BaseModel, and a SyntaxWarning from the confusables dependency. Harmless, but they appear on every CLI start |
GET / | 200, an HTML page titled Co-PyRIT |
GET /api/health | "status":"healthy", "service":"pyrit-backend", "ready":true |
GET /api/version | "version":"1.2.1", a compatibility id of 1.2.1+gc7b5789d… and database_info naming SQLiteMemory with its file path |
Other /api/… routes from plain curl | 400 with "Supply exactly one valid PyRIT-Compatibility-ID header." and the expected id in the body. This is the v1.2.0 rule that clients and backend must come from the same build |
GET /docs and GET /openapi.json | Both returned the web app's HTML rather than FastAPI's interactive docs or a schema, so the API description is not exposed at the usual paths |
With no configuration file at all, the backend chose the persistent SQLite backend, which matches the configuration page's table marking sqlite as the default. It created ~/.local/share/dbdata/pyrit.db (393,216 bytes with 30 tables, among them PromptMemoryEntries, ScoreEntries, AttackResultEntries, OperationEntries, FindingEntries and an Alembic version table), an empty logs.txt beside it, an empty ~/.local/share/.pyrit_cache, and three empty folders under ~/.pyrit/: custom_initializers, scenario_presets and scenario_suites. The path comes from pyrit/common/path.py, which uses appdirs.user_data_dir("dbdata", "pyrit"); on Linux that resolves to a folder named plainly dbdata, not one namespaced under pyrit. Source checkouts use a dbdata folder next to the repository instead.
Scanner and shell with no model configured
Command (against the local backend, --auth-mode none) | Observed |
|---|---|
pyrit_scan list-initializers | Eight initializers: converter, load_default_datasets, preload_scenario_metadata, refresh_datasets, scorer, target, technique and tools, each with its required environment variables and parameters |
pyrit_scan list-datasets | 130 dataset names |
pyrit_scan list-targets | No targets found in registry. with a hint that targets are registered by initializers |
pyrit_scan list-converters | No converters found in registry. |
pyrit_scan list-scenarios | Failed: 400 Bad Request for /api/scenarios/catalog?limit=200 with Environment variable OPENAI_CHAT_MODEL is required. The backend log showed TargetRegistry entry 'objective_scorer_chat' not found. Falling back to default OpenAIChatTarget. |
pyrit_scan run airt.scam --target openai_chat | Failed the same way, at /api/scenarios/catalog/airt.scam, before anything was sent anywhere |
pyrit_shell with list-targets and exit piped in | Printed its banner and command list, then No targets found in registry. and Goodbye! |
So in 1.2.1 even browsing the scenario catalog needs an OpenAI-compatible chat model configured, because building scenario metadata reaches for a default scorer target. Plan on a configured endpoint (a local Ollama model works, per the FAQ) before exploring scenarios.
The framework with no API key
The Python layer is where PyRIT is most usable without credentials. A short script, run with python -I, initialised in-memory SQLite and exercised converters, an attack and memory:
| Step | Observed |
|---|---|
get_converter_modalities() | 101 entries |
ROT13Converter on the docs' sample sentence | ConverterResult(output_text='gryy zr ubj gb phg qbja n gerr', output_type='text') |
Base64Converter | dGVsbCBtZSBob3cgdG8gY3V0IGRvd24gYSB0cmVl |
FirstLetterConverter and StringJoinConverter | t m h t c d a t and t-e-l-l m-e h-o-w t-o c-u-t d-o-w-n a t-r-e-e |
RandomCapitalLettersConverter(percentage=25.0) after seed=42 | telL mE how tO cuT down a tree |
PromptSendingAttack on a TextTarget with StringJoinConverter as a request converter | The target printed user: t-e-l-l m-e …. The AttackResult had outcome UNDETERMINED, reason No objective scorer configured, one executed turn and about 96 ms execution time |
Same attack with SubStringScorer(substring="tree") as the objective scorer, on persistent SQLite | Outcome SUCCESS, reason Objective achieved according to scorer, stored in ~/.local/share/dbdata/pyrit.db |
OpenAIChatTarget() with no environment set | ValueError: Environment variable OPENAI_CHAT_MODEL is required |
The SUCCESS above is a plumbing check, not a finding, and it shows a trap. TextTarget returns no reply, so the last stored message was the outgoing prompt itself, and the substring scorer matched the word in the prompt. The UNDETERMINED outcome without a scorer is the honest default and matches the framework guide's rule to report what cannot be determined "as undetermined or as an error, not as false". When building custom scoring, check which message the scorer actually reads. Even the in-memory run created ~/.local/share/dbdata/logs.txt and the cache folder, because pyrit/common/path.py creates them when the module is imported.
Telemetry, read from the source
A search of the installed pyrit package and its bundled frontend found no analytics or usage-reporting client. The OpenTelemetry SDK is a hard dependency, but in 1.2.1 it is used for request tracing and an in-memory span exporter that the code describes as attaching "only to a caller-owned provider", for scorers that inspect traces. Network traffic was not captured during these runs, and the dependencies (Hugging Face libraries in particular) were not audited for their own behaviour. The practical point from the FAQ stands: a local target does not make a run offline, because adversarial models, LLM scorers, converters and dataset downloads can each call out.
Not exercised: any real model or application target, any scenario run, the CoPyRIT GUI in a browser (only its HTML and API were fetched), Entra authentication, Azure SQL and Key Vault, the Docker and dev-container installs, the optional extras (huggingface, gcg, playwright, litellm, speech and others), Python versions other than 3.13, and the project's test suite.
Use cases
- Pre-release safety testing of your own chatbot or copilot. Register the deployed endpoint as an HTTP or WebSocket target, run the AIRT and Garak-inspired scenario families, then review transcripts by hand. The red-teaming guide's planning questions (what the system can do, which harms matter, which layer you are testing) belong in the test plan first.
- Human-led engagements with a paper trail. Use CoPyRIT's Chat workspace for manual probing, group the work in an Operation, and record Findings with linked evidence for export to Word or Markdown. This fits internal red-team reviews before a launch gate.
- Regression checks after a fix. Re-run the same scenario preset against a new model version or a changed system prompt, and compare runs in scenario history. For test-runner integration, the docs point to RAMPART, which turns findings into pytest regression tests; see pytest vs unittest for that runner and CI/CD for the pipeline side.
- Testing agents that call tools. The docs include tool-call and file-write scorers and agent-threat rules, which suit agents exposed through the Model Context Protocol. For the related problem of catching behaviour drift between agent versions, compare eval-view.
- Comparing providers or local models under the same tests. Point the same scenario at OpenAI, Anthropic, Gemini or a local Ollama model through the OpenAI-compatible target. Background on the providers is in OpenAI API vs Anthropic API vs Gemini API and Ollama vs vLLM vs LM Studio.
- Testing the full web app, not the API. The Playwright target drives a browser against the real UI, which catches problems introduced by the app's own prompt assembly. Playwright itself is compared in Playwright vs Cypress.
- Evaluating scorers and guardrails. The scoring docs include scorer metrics against human labels, and the target list includes Azure's Prompt Shield, so a team can measure how a content filter or judge model behaves before relying on it.
How PyRIT compares
Two other open-source projects with pages here cover similar ground. The table sticks to what each project's own README says (fetched on 2 December 2026). Where a README is silent the cell says so, which does not mean the feature is missing.
| PyRIT | Promptfoo | DeepTeam | |
|---|---|---|---|
| Focus | AI red teaming: scenarios, multi-turn attacks, converters, scorers, human-led testing | "evaluating and red-teaming LLM-based apps": evals, red teaming, model comparison, code scanning | "red teaming framework for LLM systems", plus guardrails for production |
| Language and install | Python; pip install pyrit | CLI and library; npm install -g promptfoo, also Homebrew, pip and npx | Python; pip install -U deepteam, now moving to deepeval.red_team |
| Interfaces | CLI scanner, interactive shell, CoPyRIT web GUI, Python framework | CLI, Node.js package, web viewer (promptfoo view) | Python API and a YAML-driven CLI |
| Built-in coverage (as claimed) | Scenario families incl. AIRT, Garak-inspired, Foundry, Benchmark; 101 converters and 130 datasets in 1.2.1 | Red teaming and vulnerability scanning; the README does not list counts | "50+" vulnerabilities, "20+" attack methods, mappings to OWASP, NIST AI RMF and MITRE ATLAS, 7 guardrails |
| Results | Local SQLite by default, in-memory or Azure SQL; JSON and HTML export | Local runs; "Share results with your team" | Saved locally as JSON; optional upload to the Confident AI platform |
| Steward | Microsoft AI Red Team and contributors | The README says Promptfoo "is now part of OpenAI" and "remains open source and MIT licensed" | Built by the founders of Confident AI |
| Licence | MIT, with Apache-2.0 garak-derived portions | MIT | Apache-2.0 |
| Status note | Package classifier "3 - Alpha" despite 1.x versioning | Not stated | The README says deepteam "will be deprecated on January 30, 2027" in favour of DeepEval |
The three overlap more than the table suggests. PyRIT ships a Garak-inspired scenario family, and its main branch ports promptfoo red-team plugins and grading prompts (credited in THIRD_PARTY_NOTICES.txt), so a team does not have to choose only one source of probes. In broad terms, Promptfoo is the natural pick when red teaming should sit beside everyday prompt evals in a JavaScript-friendly CLI. DeepTeam suits Python teams who want a short callback-based API and framework mappings such as OWASP, but new adopters should start from deepeval.red_team given the announced deprecation. PyRIT is the heavier option, with a GUI, persistent engagement records and the widest set of targets, and it fits organised red-team work more than a quick check in a pull request.
Where the README, docs and package disagree
- Starting the GUI. The docs landing page (both on
mainand in the v1.2.1 tag) showspyrit_backendalone with the comment "serves webapp on http://localhost:8000/". In 1.2.1 that fails at startup with the authentication error quoted above. The GUI page'spyrit_backend --auth-mode localis the command that works, andpyrit_backend --helpsays that without a mode "startup requires complete Entra configuration". - Supported Python versions. The docs site, which follows
main, says Python 3.11 to 3.15 on the install page and in the FAQ, andmain'spyproject.tomldeclares>=3.11, <3.16. The released 1.2.1 wheel declares<3.15,>=3.11, and the v1.2.1 copy of the install page says 3.11 to 3.14. Python 3.15 support is unreleased. - The MCP endpoint. The scanner page on
maindocuments an MCP endpoint at/api/mcpfor agents such as GitHub Copilot. The 1.2.1 package has no MCP server module in its backend, and requests to that path returned the generic compatibility-header 400. The v1.2.1 copy of the page does not mention it. - The promptfoo scenario family. The scanner page on
mainlists a promptfoo family; the 1.2.1 package ships only the adaptive, AIRT, benchmark, Foundry, Garak and technique families. - Fallback to OpenAI. The scanner page on
mainsays helper roles "do not automatically reuse--target, and no missing role constructs OpenAI from ambient environment variables". In 1.2.1 the backend logged a fallback to a defaultOpenAIChatTarget, and the scenario catalog failed becauseOPENAI_CHAT_MODELwas unset. - Plaintext
.env. The landing page and FAQ tell new users to create~/.pyrit/.env, while the configuration file page calls Key Vault the canonical source and says PyRIT "warns because plaintext files are less secure". Both work; the docs simply pull in two directions. - Maturity signals. The project has shipped 1.x releases since July 2026, but the package metadata still carries
Development Status :: 3 - Alpha, andpyproject.toml's description still calls PyRIT "a library used to assess the robustness of LLMs", which undersells the scanner and GUI. - Release dates. PyPI shows the 1.2.1 files uploaded on 16 November 2026, two days before the GitHub release entry dated 18 November.
Things to know before adopting
- Authorisation comes first. PyRIT generates adversarial traffic on purpose. Use it only against systems you own or are explicitly authorised to test, and check the usage policies of any hosted model, including the ones you use as adversarial or scoring models.
- The licence is permissive, with notices to keep. PyRIT is MIT, but
THIRD_PARTY_NOTICES.txtlists garak-derived portions under Apache-2.0 and several MIT-licensed adaptations from other projects. Redistributing a modified PyRIT means carrying those notices and the Apache-2.0 text. Remote datasets carry their own terms, which were not reviewed here. For the differences between these licences, see open-source licences. - No usage telemetry found, but plenty of outbound calls by design. The source search above found no analytics client. Every scan still sends prompts to the target and often to separate adversarial and scorer models, so data handling depends on those providers.
- Costs can multiply. The FAQ warns that one objective "can lead to many calls" across prompt generation, scoring, conversion and retries, and that rate limits "are not a spending cap". Start with small dataset sizes and low concurrency.
- Harmful content is part of the job. The bundled datasets and scorer prompts deal with harmful material, and the security principles say PyRIT will not redact what operators need. Expect content filters on scorer models to interfere, as the FAQ notes, and agree internally where transcripts are stored.
- Fast-moving, with breaking changes. v1.0.0 (July 2026) reorganised scenarios, converters and memory; v1.1.0 made scores able to be undetermined; v1.2.0 dropped Python 3.10, changed scenario and dataset APIs, removed the Gandalf target and scorer, and required backend, frontend and CLI to come from the same source commit. Pin versions and read release notes before upgrading.
- The docs track
main. As the discrepancies show, the default docs describe unreleased features. Match the docs version to the installed package. - Heavy install. About 850 MB and 127 packages for the base install on Linux, before any extras. Keep it in its own virtual environment or container.
- Default storage is persistent. Without configuration, results go to a SQLite file under the user data directory (
~/.local/share/dbdata/pyrit.dbon Linux). That suits audits, but transcripts can include sensitive model output, so treat the file accordingly. Background on the SQLite-or-server choice is in SQLite vs PostgreSQL; PyRIT's shared option is Azure SQL. - Shared deployments lean on Azure. Team use of CoPyRIT means Entra authentication, and the docs' deployment guide targets Azure; v1.1.0 notes mention Azure Container Apps and Azure SQL migrations. Local mode is loopback-only by design, and the GUI page says its unauthenticated settings should never be used "for a network-accessible deployment".
- Automation is not assurance. The docs themselves stress that scorers misjudge responses in both directions and that red teaming finds problems rather than measuring their frequency. Budget time for people to read transcripts.
Project activity
Checked 2 December 2026: latest release v1.2.1 (GitHub release dated 18 November 2026; pyrit 1.2.1 on PyPI, files uploaded 16 November), a packaging-only patch that the notes say fixed missing licence files in built wheels with "No runtime behavior or public API changes". Licence MIT, 5,245 stars and 1,169 forks on GitHub, last push 2 December 2026, and main already at version 1.3.0.dev0.
The repository was created on 12 December 2023 and GitHub lists Python as its main language, with a TypeScript frontend for CoPyRIT. Recent releases came at a steady clip: v0.13.0 (17 April 2026), v0.14.0 (5 June), v1.0.0 (24 July), v1.0.1 (30 July), v1.1.0 (4 September), v1.2.0 (13 November) and v1.2.1. The FAQ says the team aims "to release at least once a month". The v1.2.0 notes credit 108 external contributors with 507 of the 882 pull requests in that release. Documentation is at microsoft.github.io/PyRIT, security reports go through the Microsoft Security Response Center as described in the repository's security policy, and the README links a 2026 whitepaper, "PyRIT: Democratizing AI Red Teaming Through Open-Source Tooling", for the design background. For the tracing standard behind PyRIT's OpenTelemetry dependency, see the OpenTelemetry Collector write-up, and for how MCP endpoints like the one coming to PyRIT's backend differ from plain REST, see MCP vs REST API.
Enjoying this project?
Discover more amazing open-source projects on TechLogHub. We curate the best developer tools and projects.
Repository:https://github.com/microsoft/PyRIT
GitHub - microsoft/PyRIT: PyRIT: Microsoft's Open-Source AI Red Teaming Toolkit
PyRIT is Microsoft's MIT-licensed toolkit for red teaming generative AI systems you own: a CLI scanner, the CoPyRIT web GUI and a Python framework. Covers a han...
github - microsoft/pyrit
Related Projects
FastAPI: Python Web Framework for Building APIs
Python API framework using type hints for validation, dependency injection and OpenAPI docs.
vLLM: High-Throughput LLM Inference and Serving Engine
Python engine for fast LLM inference and OpenAI-compatible serving, built around PagedAttention.
Scrapling: Adaptive Web Scraping Framework for Python
Python scraping framework with an adaptive parser, HTTP and browser fetchers, and Scrapy-style spiders.
Maintain PyRIT: Microsoft's Open-Source AI Red Teaming Toolkit? Add the badge to your README
Show that the project is featured on TechLogHub and send readers to this write-up.
[](https://techloghub.com/open-source/pyrit?utm_source=techloghub_badge&utm_medium=referral&utm_campaign=readme)
