# any-guardrail Documentation
> Complete documentation for any-guardrail - A Python library providing a single interface to different llm providers.
This file contains all documentation pages concatenated for easy consumption by AI systems.
---
## index.md
`any-guardrail` is a Python library providing a single interface to different guardrails.
### Getting Started
Refer to the [Quickstart](#./quickstart.md) for instructions on installation and usage.
### Guardrails
Refer to [Guardrails](#./api/guardrails/index.md) for the parameters for each guardrail.
Refer to [AnyGuardrail](#./api/any_guardrail.md) for how to use the `AnyGuardrail` object.
## For AI Systems
This documentation is available in two AI-friendly formats:
- **[llms.txt](https://mozilla-ai.github.io/any-guardrail/llms.txt)** - A structured overview with curated links to key documentation sections
- **[llms-full.txt](https://mozilla-ai.github.io/any-guardrail/llms-full.txt)** - Complete documentation content concatenated into a single file
---
## quickstart.md
### Requirements
- Python 3.11 or newer
### Installation
You can install the bare bones library as follows (only [`any_guardrails.guardrails.any_llm.AnyLlm`] will be available):
```bash
pip install any-guardrail
```
Or you can install it with the required dependencies for different guardrails:
```bash
pip install any-guardrail[huggingface]
```
Refer to [pyproject.toml](https://github.com/mozilla-ai/any-guardrail/blob/main/pyproject.toml) for a list of the options available.
### Basic Usage
`AnyGuardrail` provides a seamless interface for interacting with the guardrail models. It allows you to see a list of all the supported guardrails, and to instantiate each supported guardrails. Here is a full example:
```python
from any_guardrail import AnyGuardrail, GuardrailName, GuardrailOutput
guardrail = AnyGuardrail.create(GuardrailName.DEEPSET)
result: GuardrailOutput = guardrail.validate("All smiles from me!")
assert result.valid
```
### Troubleshooting
Some of the models on HuggingFace require extra permissions to use. To do this, you'll need to create a HuggingFace profile and manually go through the permissions. Then, you'll need to download the HuggingFace Hub and login. One way to do this is:
```bash
pip install --upgrade huggingface_hub
hf auth login
```
More information can be found here: [HuggingFace Hub](https://huggingface.co/docs/huggingface_hub/en/quick-start#login-command)
---
## api/guardrails/any_llm.md
::: any_guardrail.guardrails.any_llm.any_llm
---
## api/guardrails/deepset.md
::: any_guardrail.guardrails.deepset.deepset
---
## api/guardrails/duo_guard.md
::: any_guardrail.guardrails.duo_guard.duo_guard
---
## api/guardrails/flowjudge.md
::: any_guardrail.guardrails.flowjudge.flowjudge
---
## api/guardrails/glider.md
::: any_guardrail.guardrails.glider.glider
---
## api/guardrails/harm_guard.md
::: any_guardrail.guardrails.harm_guard.harm_guard
---
## api/guardrails/injec_guard.md
::: any_guardrail.guardrails.injec_guard.injec_guard
---
## api/guardrails/jasper.md
::: any_guardrail.guardrails.jasper.jasper
---
## api/guardrails/off_topic.md
::: any_guardrail.guardrails.off_topic
---
## api/guardrails/pangolin.md
::: any_guardrail.guardrails.pangolin.pangolin
---
## api/guardrails/protectai.md
::: any_guardrail.guardrails.protectai.protectai
---
## api/guardrails/sentinel.md
::: any_guardrail.guardrails.sentinel.sentinel
---
## api/guardrails/shield_gemma.md
::: any_guardrail.guardrails.shield_gemma.shield_gemma
---
## api/any_guardrail.md
## AnyGuardrail
::: any_guardrail.api.AnyGuardrail
---
## api/guardrails/index.md
## Guardrails
This section documents the available guardrails and their parameters. Select a guardrail to view its API details.
---