Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Adding guardrails to large language models.
| Date | Stars |
|---|---|
| 2026-07-31 | 7231 |
| 2026-08-01 | 7235 |
| 2026-08-02 | 7235 |
| 2026-08-06 | 7235 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
15.0
growth rate 0.00%/day
<div align="center">
<img src="https://raw.githubusercontent.com/guardrails-ai/guardrails/main/docs/assets/Guardrails-ai-logo-for-dark-bg.svg#gh-dark-mode-only" alt="Guardrails AI Logo" width="600px">
<img src="https://raw.githubusercontent.com/guardrails-ai/guardrails/main/docs/assets/Guardrails-ai-logo-for-white-bg.svg#gh-light-mode-only" alt="Guardrails AI Logo" width="600px">
<hr>
[](https://opensource.org/licenses/Apache-2.0)

[](https://pepy.tech/project/guardrails-ai)
[](https://github.com/guardrails-ai/guardrails/actions/workflows/ci.yml)
[](https://codecov.io/gh/guardrails-ai/guardrails)
[](https://microsoft.github.io/pyright/)
[](https://x.com/guardrails_ai)
[](https://discord.gg/U9RKkZSBgx)
[](https://guardrailsai.com/guardrails/docs)
[](https://www.guardrailsai.com/blog)
[](https://gurubase.io/g/guardrails)
</div>
## News and Updates
- **[Feb 12, 2025]** We just launched Guardrails Index -- the first of its kind benchmark comparing the performance and latency of 24 guardrails across 6 most common categories! Check out the index at index.guardrailsai.com
## What is Guardrails?
Guardrails is a Python framework that helps build reliable AI applications by performing two key functions:
1. Guardrails runs Input/Output Guards in your application that detect, quantify and mitigate the presence of specific types of risks. To look at the full suite of risks, check out [Guardrails Hub](https://guardrailsai.com/hub/).
2. Guardrails help you generate structured data from LLMs.
<div align="center">
<img src="https://raw.githubusercontent.com/guardrails-ai/guardrails/main/docs/assets/with_and_without_guardrails.svg" alt="Guardrails in your application" width="1500px">
</div>
### Guardrails Hub
Guardrails Hub is a collection of pre-built measures of specific types of risks (called 'validators'). Multiple validators can be combined together into Input and Output Guards that intercept the inputs and outputs of LLMs. Visit [Guardrails Hub](https://guardrailsai.com/hub/) to see the full list of validators and their documentation.
<div align="center">
<img src="https://raw.githubusercontent.com/guardrails-ai/guardrails/main/docs/assets/guardrails_hub.gif" alt="Guardrails Hub gif" width="600px">
</div>
## Installation
```python
pip install guardrails-ai
```
## Getting Started
### Create Input and Output Guards for LLM Validation
1. Download and configure the Guardrails Hub CLI.
```bash
pip install guardrails-ai
guardrails configure
```
2. Install a guardrail from Guardrails Hub.
```bash
pip install guardrails-ai-regex-match
```
3. Create a Guard from the installed guardrail.
```python
from guardrails import Guard, OnFailAction
from guardrails_ai.regex_match import RegexMatch
guard = Guard().use(
RegexMatch, regex="\(?\d{3}\)?-? *\d{3}-? *-?\d{4}", on_fail=OnFailAction.EXCEPTION
)
guard.validate("123-456-7890") # Guardrail passes
try:
guard.validate("1234-789-0000") # Guardrail fails
Excerpt of 9,437 characters
Read on GitHubCaleb Courier
936
729
266
198
Shreya Rajpal · United States
179
166
121
112
Alejandro Esquivel · Blocks.team · Canada
108
99
Joseph Catrambone · Xoana · United States
90
86
Kaushik B
21
Karan Goel · United States
15
13
11
9
Ramkumar R
9
8
8
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:541a95b1ef63dedb, topic:llm
matched fp:541a95b1ef63dedb, name:guardrails, desc:guardrails