Technology · Agentic → Guardrails · Open Source · wiki:deep

LLM Guard

LLM Guard (Protect AI) is a security toolkit for LLM interactions: sanitization, harmful-language detection, data-leakage prevention, and prompt-injection resistance via input and output scanners (anonymize, secrets, toxicity, prompt injection, malicious URLs, and many more). Install with pip install llm-guard (Python ≥ 3.9); deployable as a library or API.

Primary README warning: the project has been archived — the repo and associated Hugging Face models are no longer actively developed or maintained. Treat as historical reference and pin commits if still used.

Why it matters here

Guardrails research still needs a catalog of I/O scanners for prompt injection, secrets, and toxicity. LLM Guard remains a useful shape reference for scanner libraries even though it is archived. Prefer Guardrails AI or NeMo Guardrails for maintained programmable rails; prefer Headroom for action-level HITL, not text scanners.

How it works

Wrap LLM calls with prompt scanners on the way in and output scanners on the way out. Each scanner targets a risk class (secrets, injection, toxicity, …). Optional API deployment fronts the same scanners for services.

  1. pip install llm-guard.
  2. Configure input scanners on user/tool text.
  3. Call the LLM.
  4. Run output scanners before acting on the response.

Related: guardrails-ai · headroom · nemo-guardrails · topics/13-governance-policy

Flow

Scroll inside the canvas to pan

When to reach for it

  • Use when: studying scanner-style I/O defenses or maintaining a pinned legacy integration.
  • Skip when: you need an actively maintained guard product (guardrails-ai, nemo-guardrails) or HITL action calibration (headroom).
  • Prefer instead: Guardrails Hub validators or NeMo rails for new installs.

Limits

  • Archived: no active maintenance — security scanners age poorly; do not pick for greenfield.
  • Model/HF coupling: some scanners depended on Protect AI HF models now frozen.
  • Not a sandbox / not HITL: text filters ≠ code isolation or approval budgets.
  • Not the ledger.

Linked from

What we checked

Claims below are backed by science sources on disk.

Toolkit / scanner framing

protectai/llm-guard · MODERATE

LLM Guard is a comprehensive tool designed to fortify the security of Large Language Models (LLMs).

Docs / scanner list

LLM Guard documentation · MODERATE

LLM Guard by Protect AI is a comprehensive tool designed to fortify the security of Large Language Models (LLMs).

Peer contrast

NeMo Guardrails contrast · MODERATE

THIS PROJECT HAS BEEN ARCHIVED.

In this research stack

Features and peers linked from the catalog map — not a second product surface.

Features it supports

Same cell

Stack

Document management

Source

Primary repo github.com/protectai/llm-guard · Open Source

technologies/llm-guard/README.md

Research inventory

9 tags · 37 out · 38 in · 3 artifacts · 0 gaps · 34 corpus docs

Catalog tags

landscape.layer
Agentic
landscape.subcategory
Guardrails
license_tag
Open Source
maps.dm
present
maps.features
10
one_liner
Agentic
review.depth
science
slug
llm-guard
title
LLM Guard

Artifacts

  • dm_map · present · technologies/llm-guard/document-management.md
  • features_map · present · technologies/llm-guard/features.md
  • readme · present · technologies/llm-guard/README.md

Out · alternative_to

Out · dm_axis

Out · maps_to

In · alternative_to

In · dm_axis

In · in_stack

In · maps_to

Corpus tags

category
Agentic → Guardrails
dedication
open-source
feature
access-vs-authority
agent-supply-chain
autonomy-levels
emergency-control
human-oversight-guardrails
job-security
r2-13-governance-policy
r2-16-approval-calibration
security-identity-governance
wt-human-policy
kind
map_edge
tech_features
tech_quote
tech_readme
tech_science_source
tech_section
needs_deepen
false
quality
ok
section
Document management map
Evidence
Features map
GitHub map
How it works
Limits & failure modes
Links
Scientific notes
What it is
When to use / skip
Why it matters here
slug
llm-guard
source_id
llmguard-docs
llmguard-github
nemo-contrast
technology
llm-guard

Corpus documents (34)

map_edge · 10

  • llm-guard → access-vs-authority
  • llm-guard → agent-supply-chain
  • llm-guard → autonomy-levels
  • llm-guard → emergency-control
  • llm-guard → human-oversight-guardrails
  • llm-guard → job-security
  • llm-guard → r2-13-governance-policy
  • llm-guard → r2-16-approval-calibration
  • … +2 more

tech_features · 1

  • LLM Guard · features

tech_quote · 8

  • LLM Guard · llmguard-docs
  • LLM Guard · llmguard-docs
  • LLM Guard · llmguard-docs
  • LLM Guard · llmguard-github
  • LLM Guard · llmguard-github
  • LLM Guard · llmguard-github
  • LLM Guard · nemo-contrast
  • LLM Guard · nemo-contrast

tech_readme · 1

  • LLM Guard

tech_science_source · 3

  • LLM Guard · llmguard-docs
  • LLM Guard · llmguard-github
  • LLM Guard · nemo-contrast

tech_section · 11

  • LLM Guard · Document management map
  • LLM Guard · Evidence
  • LLM Guard · Features map
  • LLM Guard · GitHub map
  • LLM Guard · How it works
  • LLM Guard · Limits & failure modes
  • LLM Guard · Links
  • LLM Guard · Scientific notes
  • … +3 more