# protectai/llm-guard

The Security Toolkit for LLM Interactions

Repository: https://github.com/protectai/llm-guard
Canonical: https://ross.abutalabs.com/products/llm-guard
Homepage: https://protectai.github.io/llm-guard/
Language: Python
License: MIT
License Family: permissive
Topics: large-language-models, llm, chatgpt, security-tools, adversarial-machine-learning, prompt-engineering, prompt-injection, llmops, llm-security, transformers
Archived: true
Last push: 2026-07-08T23:58:40+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 91, release rhythm 35, longevity 80
- inputs: {"age_days": 1133, "days_push": 56, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3203, forks 446 (observed 2026-08-28T04:07:48.546657+00:00)

## What it is
LLM Guard is a Python library providing input and output scanners to secure LLM interactions, including sanitization, harmful language detection, PII anonymization, and prompt injection resistance. The project has been archived and is no longer maintained.

## Use cases
- detect and block prompt injection attacks on my llm app
- anonymize PII before sending prompts to an LLM API
- sanitize user input before it reaches a chatbot
- prevent data leakage in LLM responses
- add a security firewall around ChatGPT API calls
- scan LLM outputs for toxic or harmful content

## When to choose
- you need a ready-made set of LLM input/output security scanners in Python
- you want PII anonymization and prompt injection detection out of the box
- you are okay using an unmaintained library as-is or forking it

## When to avoid
- you need actively maintained software with bug fixes and updated models
- you require support for new LLM providers or recent attack techniques
- you want long-term production support without forking

## Facets
- artifact type: library
- maturity: abandoned
- function: security, nlp, llm-inference, prompt-engineering, middleware
- domain: large-language-models, security, machine-learning
- platform: python, cross-platform
- tags: llm-security, prompt-injection, pii-detection, input-sanitization, llm-firewall, archived-project, natural-language-processing

## Member repositories
- protectai/llm-guard (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:48.546657+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:24:47.913934+00:00, confidence not recorded.
  - readme: https://github.com/protectai/llm-guard (fetched 2026-08-28T04:07:48.546657+00:00, sha fddf5a6ec2db)
  - homepage: https://protectai.github.io/llm-guard/ (fetched 2026-08-29T09:38:25.641450+00:00, sha 7403f55aa640)
  - registry_pypi: https://pypi.org/pypi/llm-guard/json (fetched 2026-08-29T09:38:25.650619+00:00, sha 12848426ce5f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
