Vigil
Python library and REST API that scans LLM prompts and responses to detect prompt injections, jailbreaks, and other risky inputs.
At a Glance
Self-hosted Python library and REST API for scanning LLM prompts and responses, released under the Apache License 2.0. Currently in alpha and described as experimental.
Engagement
Available On
Alternatives
Listed Oct 2026
About Vigil
Vigil is an open-source Python library and REST API for assessing Large Language Model prompts and responses against a set of scanners. It is developed by deadbits (Adam M. Swanda per the license copyright) and ships with detection signatures and datasets for self-hosting. The project is described as alpha and experimental, intended for research purposes.
What It Is
Vigil is a security scanner for LLM inputs and outputs. Applications submit a prompt, or a prompt plus a response, and each configured scanner contributes to the final detection. It can be imported into a Python application or run as a REST API server.
How Detection Works
Scanners are modular and extensible. Available modules include vector database text similarity, YARA heuristics, a transformer model classifier, prompt-response similarity, and canary tokens. Sentiment analysis is also listed in the documentation. Custom detections can be written as YARA signatures. The vector database scanner supports local embeddings (sentence-transformers) or OpenAI embeddings, and it can be auto-updated with detected prompts.
Canary Tokens and API
Canary tokens can be added to a prompt and later checked in the LLM output, supporting prompt leakage and goal hijacking detection workflows. The API provides endpoints to analyze prompts and responses, add and check canaries, add texts to the vector database, and view settings. Scan results are returned as JSON with per-scanner matches and messages.
Setup Path
Installation involves cloning the repository, installing YARA, creating a virtual environment, installing with pip, and editing conf/server.conf. Datasets are loaded with the loader.py utility, and the embedding model must match the one used for the stored embeddings. A Streamlit web UI playground is available. The README notes Vigil should not be the only defense, and that a Docker container exists but is not currently recommended.
Community Discussions
Be the first to start a conversation about Vigil
Share your experience with Vigil, ask questions, or help others learn from your insights.
Pricing
Open Source (Apache-2.0)
Self-hosted Python library and REST API for scanning LLM prompts and responses, released under the Apache License 2.0. Currently in alpha and described as experimental.
- Apache License 2.0 (OSI-approved)
- Python library and REST API
- Self-hosted with detection signatures and datasets included
- Scan modules: vector database, YARA heuristics, transformer model, prompt-response similarity, canary tokens, sentiment analysis
- Streamlit web UI playground
Capabilities
Key Features
- Prompt injection and jailbreak detection
- Python library and REST API
- Vector database / text similarity scanner
- YARA heuristic scanner with custom signatures
- Transformer model scanner
- Prompt-response similarity scanner
- Canary tokens for prompt leakage and goal hijacking
- Sentiment analysis
- Local or OpenAI embeddings
- Streamlit web UI playground
- Datasets and signatures for common attacks
