Lattice
Skip to content

PyRIT

github.comlibraryself-hosted

PyRIT is a self-hosted library in the Guardrails & Safety layer of the AI stack. Microsoft's red-team tool for generating and scoring attack prompts.

By Lattice editorial · Facts verified · method

licence
MIT
language
Python
cost
free

Use PyRIT when

Generating and scoring attack prompts systematically.

Skip PyRIT when

You are not authorised to test the target.

Stops the bad input before it, and the bad output after. — that is what this layer of the stack is answerable for. See the full Guardrails & Safety section for the rest of the options.

Visit github.comCompare with another tool
Badge this entry
Lattice badge: PyRIT verified 2026-09
[![PyRIT on Lattice: verified 2026-09](https://lattice.kunjshah.in/guardrails-safety/pyrit/badge.svg)](https://lattice.kunjshah.in/guardrails-safety/pyrit)

Quick answers

Is PyRIT open source?
Yes. PyRIT is open source under the MIT licence. It is free to use.
What are the alternatives to PyRIT?
The closest alternatives to PyRIT are garak.

Reading on guardrails

Alternatives to PyRIT

Listed as an alternative to

  • garak

Also in guardrails

  • NeMo Guardrails
  • Guardrails AI
  • Llama Guard
  • Microsoft Presidio
  • Lakera Guard
  • garak
  • Invariant Guardrails