--- id: llm-guard version: "0.3.16" license: The MIT License (MIT) Copyright (c) Protect AI. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files… (full text in the JSON record) license_treatment: unclear maintenance: abandoned --- # llm-guard — LLM-Guard is a comprehensive tool designed to fortify the security of Large Language Models (LLMs). By offering sanitization, detection of harmful language, prevention of data leakage, and resistance against prompt injection attacks, LLM-Guard ensures that your interactions with LLMs remain safe and secure. License: unclear · Maintenance: abandoned · Downloads: 211.8K/mo ## What it is and what it does LLM Guard is a security toolkit that scans both user inputs (prompts) and model outputs to detect and mitigate threats in Large Language Model interactions. It offers multiple scanning strategies including prompt injection detection, PII anonymization, secret detection, toxicity analysis, and output validation for harmful content, code injection, and factual consistency. The package integrates with popular LLM APIs and is designed for production deployment. The package depends on 12 runtime libraries spanning NLP (nltk, transformers, tiktoken), data anonymization (presidio-analyzer, presidio-anonymizer, faker), and ML inference (torch). However, the project is now abandoned—its repository is archived and the last commit was 2026-07-08, meaning no new features, bug fixes, or security patches will be released. For teams considering adoption, this means relying on a static codebase for an inherently security-sensitive tool. Use it for: - Scan user prompts before sending to a production LLM API to block prompt injection and data exfiltration attempts - Anonymize personally identifiable information in user inputs and deanonymize model outputs to comply with privacy requirements - Detect and filter toxic, biased, or harmful language in both prompts and LLM responses - Validate LLM outputs for code injection, malicious URLs, and factual consistency before returning to users - Enforce organizational policies by banning specific topics, competitors, or substrings in LLM interactions ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. LLM Guard provides input and output scanning for Large Language Models to detect and prevent prompt injection, data leakage, harmful language, and other security threats. No—not for new projects. While the package is feature-rich and has low install friction, its abandoned status (archived repo, no commits since 2026-07-08) is disqualifying for security-sensitive work. An unmaintained firewall cannot be trusted to defend against evolving threats. Consider it only if you have a specific, time-bounded use case and can fork and maintain it yourself. ## Install pip install llm-guard uv add llm-guard poetry add llm-guard ## Installing llm-guard Before you install: Low install friction with a pure-Python wheel, but the package is abandoned as of the latest commit on 2026-07-08. The 12 runtime dependencies include heavy libraries (torch, transformers, tiktoken) that will pull in substantial downloads; base functionality requires fewer, with advanced features auto-installing as needed. License in practice: MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it legally straightforward to adopt—though the abandoned status means no upstream security patches or maintenance. Quickstart: pip install llm-guard from llm_guard import scan_prompt result = scan_prompt("user input here") Requires Python 3.10 or higher (capped below 3.13). Heavy dependencies like torch and transformers may require significant disk space and download time. Verify before relying: - Whether the abandoned status affects real-world security scanning reliability or if the final release remains effective for current threat models - Performance characteristics and latency of scanning operations under production load - Compatibility of the 12 runtime dependencies with recent versions of torch, transformers, and other ML libraries ## Package facts - License: The MIT License (MIT) Copyright (c) Protect AI. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files… (full text in the JSON record) (unclear) - Python support: capped_below_current - Install friction: low - Maintenance: abandoned - Downloads: 211.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags llm security scanning, prompt injection detection, pii detection for language models, llm content filtering, adversarial prompt defense, llm firewall, harmful content detection, llm-security, prompt-injection, pii-detection [View on SkillFed](https://skillfed.io/packages/llm-guard) · [View on PyPI](https://pypi.org/project/llm-guard/)