LLM Guard (Protect AI)
Tool : A precise action the AI can call · requires protectai
Open source input and output scanners: injection, personal data, toxicity.
The best free, self-hosted option.
Security reflects where data goes, requested permissions and incidents on record at the verification date. It is not a guarantee of zero risk: check the deployment mode and the connections you enable.
What it does, concretely
Applications built on top of language models face specific risks: prompt injections, personal data leakage, toxic or biased content in responses. LLM Guard addresses this by adding a control layer between the user and the model.
The tool works as a Python library integrated directly into your code. It provides scanners applied to inputs (prompts sent to the model) and outputs (responses received). Each scanner is independent and targets a specific risk: prompt injection detection, personal data anonymization, secrets and API key detection, banned topic filtering, malicious URL detection, factual consistency checking, and more.
LLM Guard is aimed at developers and technical teams building LLM-based applications who want to secure exchanges without sending their data to a third-party service. All processing happens locally.
It is not suited for non-technical users: there is no graphical interface and integration requires Python skills. Furthermore, the project is now archived and no longer actively maintained, meaning no security updates or new features will be released.
What it offers
- ·Prompt injection detection to block attempts to manipulate the model.
- ·Personal data anonymization in inputs, with de-anonymization capability in outputs.
- ·Detection of secrets and API keys in prompts to prevent accidental leakage.
- ·Filtering of banned topics, keywords, or substrings in both inputs and outputs.
- ·Toxicity and bias detection in model responses.
- ·Factual consistency verification between the prompt and the generated response.
- ·Malicious URL detection in model outputs.
- ·Language control and detection of invisible or incoherent text (gibberish).
In practice
- Price
- Free
- Commercial use
- Commercial use: yes
- Available on
- sdk-python
- Host
- protectai
- Licence
- MIT
- FR interface
- No
Security and data
- Rating
- Security: nothing to flag
- Capabilities
- readswritesexecutesnetwork
- Your data
- Data stays local
- Maintenance
- Inactive for over six months
Links and repository checked on 25 October 2026 · added on 1 August 2023
How to install LLM Guard (Protect AI)
pip install llm-guard