Favicon of PyRIT

PyRIT

AI red teaming framework with a self-hosted browser GUI, multi-turn attacks and response scoring. Configure Ollama or cloud model endpoints.

Screenshot of PyRIT website

PyRIT is an open-source Python framework for testing generative AI systems, with a self-hosted CoPyRIT browser interface. Its backend serves the interface locally, and Docker deployment is available. Targets and scorers use configured endpoints, including Ollama or cloud providers. The documented OpenAI configuration sends requests to OpenAI; hosting the testing interface locally does not make every model local.

The framework combines reusable attack techniques with evaluation scenarios across harm categories. Teams can reuse prompts between attacks and assess multiple targets. Scenarios manage parallel execution, while individual attacks adapt conversations according to response scores.

Single-turn and multi-turn techniques include Crescendo, TAP and Skeleton Key. Scorers judge responses using true/false decisions, Likert scales, classifications or custom criteria, so teams can define what counts as reaching an attack objective.

Prompt converters handle text, audio, images and video. They can rephrase a prompt, put text over an image or turn text into a Word document. Teams can combine converters to test how different presentations affect a target's responses.

PyRIT uses the MIT license. Its target connections include HuggingFace, HTTP endpoints and custom targets alongside the named cloud providers.

Similar to PyRIT