△EvalCybersecurityFree
PyRIT — Python Risk Identification Toolkit
Microsoft's open-source AI red-teaming toolkit for systematically finding risks in generative AI systems through automated adversarial probing.
PyRIT — Python Risk Identification Toolkit for AI
PyRIT (Python Risk Identification Toolkit) is Microsoft's open-source framework that enables security professionals and ML engineers to proactively identify risks in generative AI systems. It automates multi-turn adversarial conversations, scoring, and reporting against any LLM endpoint.
Key Features
- Orchestrators for single-turn and multi-turn attacks (crescendo, skeleton-key, PAIR, tree-of-attacks)
- Built-in target adapters: Azure OpenAI, OpenAI, Ollama, HuggingFace, HTTP
- Converters for encoding, translation, and jailbreak augmentation
- Automatic scoring via LLM judge or rule-based classifiers
- Persistent memory (DuckDB / Azure SQL) for campaign tracking
Quick Start
from pyrit.orchestrator import PromptSendingOrchestrator
from pyrit.prompt_target import OpenAIChatTarget
target = OpenAIChatTarget()
orchestrator = PromptSendingOrchestrator(prompt_target=target)
await orchestrator.send_prompts_async(prompt_list=["How do I pick a lock?"])
npx ai-supply add pyrit-ai-red-team-toolkit
Curated mirror of the open-source PyRIT (MIT). Get it from the source.