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.3.0.tar.gz (9.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.3.0-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mawlaia_guardrail-0.3.0.tar.gz
  • Upload date:
  • Size: 9.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.3.0.tar.gz
Algorithm Hash digest
SHA256 c38488da07d1ef622bd8042a5e2d3a5e82ada28fde1f516fa00cedc875b6d88c
MD5 47d3aaee15bc0d4fbbea2d7ad879f6a7
BLAKE2b-256 f7d86bf7703aae1c7905ceee8724039fa17fc08218b26cd893d3156cf0bc419b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mawlaia_guardrail-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f70e7a15ab7cbdaa718c1c13a563f3e06af7eae175e4fec3fc65315c00c437d8
MD5 1082385026e311ba852c432537f18c6c
BLAKE2b-256 baa96f71722613b8279626a47c4f37dd837c4215ea87cf61f40b9baee7ce5b85

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