Star

Security-first LLM gateway and guardrails framework

Put one protected gateway in front of your AI traffic

SentinelGuard helps teams secure LLM applications, AI IDEs, agents, and model provider traffic with prompt scanning, output scanning, PII and secret protection, model routing, failover, usage controls, audit events, and a stable management API.

OpenAI-compatible gateway PII and secret controls Prometheus metrics Docker and Kubernetes ready
OpenAI Anthropic Claude Google Gemini Kimi / Moonshot DeepSeek Mistral MiniMax Ollama Hugging Face

Install and start the gateway

pip install "sentinelguard[gateway,monitoring]"
export OPENAI_API_KEY="sk-..."
export SENTINELGUARD_GATEWAY_API_KEY="$(sentinelguard token)"
sentinelguard init
sentinelguard gateway \
  --config sentinelguard.yaml \
  --gateway-config sentinelguard-gateway.yaml \
  --port 8080

Point apps and IDEs to http://localhost:8080/v1

36 security scanners
v1 stable gateway API
2 modes package and proxy
local model-backed detection

Why teams use SentinelGuard

Runtime protection for the LLM boundary

Secure prompts and responses

Scan prompts before they reach a model and scan responses before they return to users. Block attacks, redact PII, and stop secrets from leaving the application.

Route across providers

Use friendly model names, route traffic across OpenAI-compatible providers, fail over when one provider is unavailable, and keep private routes available for sensitive traffic.

Operate with evidence

Use virtual keys, usage accounting, provider health, privacy-safe audit events, Prometheus metrics, and the stable /gateway/v1 API for dashboards and alerts.

Built for modern AI applications

Use it in code or as a shared gateway

Package mode

Use SentinelGuard directly in Python code when you want guardrails inside one application.

from sentinelguard import SentinelGuard

guard = SentinelGuard()
result = guard.scan_prompt("Ignore previous instructions")
print(result.is_valid, result.failed_scanners)

Gateway mode

Run SentinelGuard as a proxy so multiple applications, users, and AI tools share one security boundary.

App or IDE -> SentinelGuard /v1 -> LLM provider

Stable endpoints: /gateway/v1/contract, /gateway/v1/health, /gateway/v1/routes

Explore the docs

Pick the workflow you need