Runtime safety proxy for LLM applications
Project description
guardrail
Runtime safety proxy for AI apps.
guardrail is a drop-in proxy that protects your AI features from prompt injection, jailbreaks, and unsafe outputs — with sub-50ms overhead and no vendor lock-in.
from guardrail import GuardrailProxy
import openai
client = GuardrailProxy(
openai.OpenAI(api_key="..."),
policy="guardrail.yaml"
)
# Input is checked before reaching the model
# Output is filtered before reaching your app
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": user_message}]
)
Status
🚧 Early development. Star to follow progress.
What it does
- Input protection — prompt injection, jailbreak, instruction override detection
- Output filtering — PII leakage, regulated content (medical/legal/financial), harmful content, brand safety
- Multi-provider — OpenAI, Anthropic, Google, Mistral, local models
- Policy-as-code — define rules in YAML, update at runtime without redeploy
- Audit log — every flagged call logged with reason code and severity
- Sub-50ms — small classifier models, not LLM-as-judge on the critical path
Roadmap
- Python SDK
- TypeScript SDK
- Prompt injection classifier (open weights)
- Policy YAML spec
- Hosted API (mawlaia.com)
- SOC 2 Type II
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mawlaia_guardrail-0.1.0.tar.gz.
File metadata
- Download URL: mawlaia_guardrail-0.1.0.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e559326b4be66285703d30a377db0060225a566afb2689fc5dd9128d23d8394
|
|
| MD5 |
068850895dced3da5650f42c5dd684af
|
|
| BLAKE2b-256 |
6b080070e3782bfe9a5aca4c33a8e5e83714487f053bfb751ee75222dd6ea09a
|
File details
Details for the file mawlaia_guardrail-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mawlaia_guardrail-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eec663ab2da0e2328f9e2d922e8033e78e2206e358b2b1f0f2e26a7010dab1f5
|
|
| MD5 |
7338a7eea9ecbb887d4d00ea391d31e5
|
|
| BLAKE2b-256 |
f810829f9844a9ad5e31365c4347d3a678585207c7651ee91a9aa9bfdf760b39
|