# LLM Guard — Input/Output Security Toolkit

> Scan LLM inputs and outputs for security risks — self-hosted, no data leaves your infra.

- Org: Protect AI
- Date: 2024-08-10
- Category: security, tool, repo
- Source: https://github.com/protectai/llm-guard
- Canonical page: https://ai-tldr.dev/releases/llm-guard/

## In short

Self-hosted security toolkit for LLM interactions. Scans inputs for prompt injection, jailbreaks, and toxic content. Scans outputs for PII, secrets, and harmful content.

## What it is

LLM Guard is a self-hosted security layer for LLM apps. It runs before and after every LLM call, scanning for prompt injections, jailbreaks, PII leakage, secrets, and harmful content.

## How it works

Deploy it as a Python library or API service. Configure input scanners (prompt injection, toxicity, language) and output scanners (PII, secrets, relevance). It blocks or sanitizes risky content.

## Why it matters

Unlike cloud-based solutions, LLM Guard runs entirely on your infrastructure. Sensitive data never leaves your network.

## Who it's for

Security-conscious teams who need on-prem LLM guardrails.

## Try it

pip install llm-guard

## Links

- [GitHub](https://github.com/protectai/llm-guard)
- [Docs](https://llm-guard.com)
