> ## Documentation Index
> Fetch the complete documentation index at: https://docs.guardway.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Policy

> Author the unified policies your gateways enforce — content safety, prompt-injection and SLM guardrails, model and provider routing, MCP tools, rate limits, budgets, and drift detection.

## What this is for

**AI Gateway → Policy** is where you author the **unified policies** your gateways enforce. One policy ties together content safety, routing, limits, budgets, MCP tools and drift detection, scoped to an [application](/platform/configuration/apps) (or the organization baseline). It is the enforcement nerve-center — guardrails, model and provider restrictions, budgets and more live in one place per app, instead of being scattered across separate screens.

## Options

A policy is authored section by section in the **Policy sections** rail:

| Section | Configures |
| - | - |
| **General** | Name, scope (which app or the baseline it applies to), and whether it's enforced. |
| **Guardrails** | The guardrail rules applied to matching traffic (see [Guardrails](/platform/configuration/security)). |
| **Safety SLM** | The small-language-model safety classifier. |
| **Prompt injection** | Prompt-injection detection. |
| **Models & routing** | Allowed and denied models, the providers in play, and fallback routing. |
| **Response cache** | Response caching for matching requests. |
| **MCP tools** | Which MCP servers and tools the policy allows. |
| **Rate limits** | Request rate limits for the policy's scope. |
| **Budget** | The spend cap for the policy's scope (see [Budgets](/platform/budgets)). |
| **Drift detection** | Configuration-drift detection. |

## How to configure

**1. Open Policy**

**AI Gateway → Policy**. The list shows every policy, the app it's scoped to, and what it configures.

**2. Create or edit a policy**

Click **New policy**, or open an existing one. In **General**, name it and set its scope and whether it's enforced.

**3. Author each section**

Move through the **Policy sections** rail — Guardrails, Models & routing, MCP tools, Rate limits, Budget and the rest — turning on what this app needs.

**4. Save**

Save the policy. Scoped policies appear on their [app's](/platform/configuration/apps) row and take effect on the next request each gateway serves.

## Related

* [Apps](/platform/configuration/apps) — what a policy is scoped to.
* [Guardrails](/platform/configuration/security) — the guardrail rules a policy applies.
* [Routing](/platform/configuration/routing) — provider routing and fallback.
* [Budgets](/platform/budgets) — how the policy's budget behaves.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.