Skip to content
Krishna Kishor Tirupati edited this page May 11, 2026 · 5 revisions

PolicyAware AI Gateway

PolicyAware AI Gateway is an open-source governance and control plane for enterprise LLM, RAG, AI agent, and MCP-style tool workflows.

It enforces organizational, security, privacy, compliance, cost, routing, and tool-use policies before requests reach models or tools, then evaluates outputs for safety, quality, compliance, and auditability.

What PolicyAware Does

  • Deny-by-default policy enforcement for prompts, request context, model calls, and tool calls.
  • PII, PHI, secrets, and sensitive-data detection with redaction support.
  • Risk-tier classification for low, medium, high, and critical AI requests.
  • Model routing across local, OpenAI-compatible, Azure OpenAI, Anthropic, Bedrock, Vertex AI, Ollama, and vLLM-style providers.
  • MCP and tool governance for connector-level and action-level permissions.
  • Runtime evaluations for sensitive-data leakage, citation requirements, and policy consistency.
  • Audit traces, replayable snapshots, audit bundles, SQLite trace storage, Prometheus metrics, and OpenTelemetry-shaped exports.
  • Python SDK, CLI, YAML policies, and integration shims for web frameworks and AI app frameworks.

Install

pip install policyaware

Upgrade to the latest version:

pip install --upgrade policyaware

Minimal Example

from policyaware import Gateway, GatewayRequest

gateway = Gateway.from_policy_file("examples/policies/basic.yaml")

response = gateway.chat(
    GatewayRequest(
        tenant="acme",
        app="claims-assistant",
        user={"id": "u_123", "role": "claims_adjuster"},
        context={"region": "us", "task_type": "summarization", "risk": "low"},
        messages=[{"role": "user", "content": "Summarize claim ACME-42."}],
    )
)

print(response.content)
print(response.policy.decision)
print(response.policy.reason_codes)
print(response.trace_id)

Documentation Map

Project Links

Clone this wiki locally