Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mawlaia_guardrail-0.1.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mawlaia_guardrail-0.1.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

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

Hashes for mawlaia_guardrail-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3e559326b4be66285703d30a377db0060225a566afb2689fc5dd9128d23d8394
MD5 068850895dced3da5650f42c5dd684af
BLAKE2b-256 6b080070e3782bfe9a5aca4c33a8e5e83714487f053bfb751ee75222dd6ea09a

See more details on using hashes here.

File details

Details for the file mawlaia_guardrail-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mawlaia_guardrail-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eec663ab2da0e2328f9e2d922e8033e78e2206e358b2b1f0f2e26a7010dab1f5
MD5 7338a7eea9ecbb887d4d00ea391d31e5
BLAKE2b-256 f810829f9844a9ad5e31365c4347d3a678585207c7651ee91a9aa9bfdf760b39

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page