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.1.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.3.1-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mawlaia_guardrail-0.3.1.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.3.1.tar.gz
Algorithm Hash digest
SHA256 96c84f081d93d81fadf3c14362367de162f70488cfadef03df78b97713120db3
MD5 e847a10bf487302fef9e258a39b522f5
BLAKE2b-256 bee80c0bddce1765ec95906f5df5f2c34e50f11c011be6b53242dd491389506d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mawlaia_guardrail-0.3.1-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.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0b4fa8e6766d8bc4afab2df61fd5a912fcb078ce91ad14d9ca8728d7dfc22e27
MD5 4a50078a80e6e1671ab042af57bfe741
BLAKE2b-256 0164af6e5ff68058e830fdd825dce187d3b5096b8b5ca9af5141d41a7cef6285

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