Skip to content
← Tools / Skills
ToolProtect AI/10 trustMetrics-checked

LLM Guard

Open-source toolkit of input and output scanners for LLM security.

Visit official site →

About

LLM Guard is Protect AI's open-source Python library for sanitizing LLM inputs and outputs. It chains modular scanners — prompt injection, secrets, PII anonymization via a Presidio-backed vault, toxicity, bias, hallucinated URLs, and more — roughly 15 input and 20 output scanners, all running locally with no cloud dependency.

The scanners run synchronously in Python, so latency grows with the number of enabled scanners; production deployments typically run the llm-guard-api FastAPI service behind a load balancer with a trimmed scanner set. It is MIT licensed and installable via pip.

What it can do

  • 15 input and 20 output security scanners
  • Presidio vault PII anonymization
  • Self-hosted, zero cloud dependency
  • FastAPI service for production

Setup

pip install llm-guard (Python 3.10+), then compose input and output scanners in your app or deploy llm-guard-api.

Prerequisites

Python 3.10+, and CPU/GPU compute for the scanner models.

Use cases

llm-securityprompt-injection-detectionpii-redactionoutput-validationguardrails

Works with

Trust score — 7/10

/10 trustMetrics-checked

Scored 7/10 (metrics tier, metrics-v1). Evidence: Verified via vendor site/docs/GitHub and reputable coverage, wave 76; Trending score 74/100 from researcher assessment.

★ 3,100 GitHub stars

Sources

Every fact above was checked against these sources. Where a claim comes from the provider and couldn't be independently verified, the text says so.