> For the complete documentation index, see [llms.txt](https://vigil.deadbits.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vigil.deadbits.ai/vigil.md).

# Vigil

⚡ Security scanner for Large Language Model (LLM) prompts ⚡

<div align="left"><figure><img src="https://1327977903-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEzo8o9vJPcrh2UB6tKuV%2Fuploads%2FJgIbwrmKRy3hyNZuK0lv%2Flogo.png?alt=media&amp;token=93232105-9456-458c-85cb-edee6814cfd7" alt=""><figcaption></figcaption></figure></div>

## Overview 🏕️

`Vigil` is a Python library and REST API for assessing Large Language Model prompts and responses against a set of scanners to detect prompt injections, jailbreaks, and other potential risks. This repository also provides the detection signatures and datasets needed to get started with self-hosting.

* **Repo**:[ https://github.com/deadbits/vigil-llm](https://github.com/deadbits/vigil-llm)

This application is currently in an **alpha** state and should be considered experimental.

Work is ongoing to expand detection mechanisms and features.

### Highlights ✨

* Analyze LLM prompts for common injections and risky inputs
* Use Vigil as a Python library or REST API
* Evaluate detections and pipelines with **Vigil-Eval** (coming soon)
* Scanners are modular and easily extensible
* Available scan modules
  * [x] [Vector database / text similarity](/overview/use-vigil/scanners/vector-database.md)
    * [Auto-update vector database with detected prompts](/overview/use-vigil/configuration/auto-updating-vector-database.md)
  * [x] [Heuristics via YARA](/overview/use-vigil/scanners/yara-heuristics.md)
  * [x] [Transformer model](/overview/use-vigil/scanners/transformer.md)
  * [x] [Prompt-response similarity](/overview/use-vigil/scanners/prompt-response-similarity.md)
  * [x] [Canary Tokens](/overview/use-vigil/scanners/canary-tokens.md)
  * [ ] Sentiment analysis
  * [ ] Relevance (via LLM)
* Supports [local embeddings](https://www.sbert.net/) and/or [OpenAI](https://platform.openai.com/)
* Signatures and embeddings for common attacks
* Custom detections via [YARA signatures](https://yara.readthedocs.io/en/stable/)
* [Streamlit web UI playground](https://vigil.deadbits.ai/overview/use-vigil/web-server/web-ui-playground)

## Quick Links

{% content-ref url="/pages/GGt99ahnes2jQA4hT6QO" %}
[Install Vigil](/overview/install-vigil.md)
{% endcontent-ref %}

{% content-ref url="/pages/i6A6yfigI9z1YJWhPFcC" %}
[Use Vigil](/overview/use-vigil.md)
{% endcontent-ref %}

{% content-ref url="/pages/0OzdFecHB4ytNckKwpKJ" %}
[Scanners](/overview/use-vigil/scanners.md)
{% endcontent-ref %}

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://vigil.deadbits.ai/vigil.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
