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.4.0.tar.gz (9.8 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.4.0-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file mawlaia_guardrail-0.4.0.tar.gz.

File metadata

  • Download URL: mawlaia_guardrail-0.4.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.3 Darwin/25.3.0

File hashes

Hashes for mawlaia_guardrail-0.4.0.tar.gz
Algorithm Hash digest
SHA256 6e87429f2e380933ad16781cad67656c2b80c6d5f57e056d56935296af706260
MD5 faf4da35e18273fa20fa158fa6437a4f
BLAKE2b-256 fd145534681127356eac80998bd39ddb1b24c0389ebb5dec72be5f789ab9a8c3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mawlaia_guardrail-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.3 Darwin/25.3.0

File hashes

Hashes for mawlaia_guardrail-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc9fb371de642e77724e511ef6fc04a02202ddfcf9f4e2d6e3d5177cd74c7cd5
MD5 443566ac81682a4758d8fca0fcaf7938
BLAKE2b-256 bf009ed259f3a304aa16f5f1eb4484d15222e7a0b6c31196a82cd11d4fc4025f

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