Policy Engine overview
Updated on 20 November 2026.
Use the Policy Engine to decide who can use your gateways, what requests are checked, and what may return. Open Govern > Policy Engine, then choose LLM Gateway or MCP Gateway.
Policy workspaces
The workspace selector shows LLM Gateway, MCP Gateway, Endpoint Agent, and Cloud & SaaS. This guide covers the two gateways. The Endpoint Agent workspace has its own guides, linked under Endpoint Agent workspace.
Gateway workspaces
Each gateway has its own engine status and these sections:
POLICY ENGINE ON means published policies govern that gateway. The header shows when it was updated. A control's status summarizes its configured scope; it is not proof that a particular request will match.
Open a control to see its default, how rules combine, and the rules already configured. Most panels have Controls and Activity tabs. Routing has Routes, Failover defaults, and Activity; Prompt Store also has a Prompt Store tab.
Edits saved to the draft do not change live traffic. Use Review & publish to publish the pending changes together. See Author, simulate and publish.
Endpoint Agent workspace
The Endpoint Agent workspace has a Desktop | Browser switch under the page title. The two sides are separate: turning on, pausing or publishing on Desktop does not change Browser controls.
- Desktop is the Endpoint Agent Policy Engine. It governs what people send to AI apps, what coding tools do, and which apps and accounts people can use on employee devices. It has its own on, off and paused states. Sensitive data and Files policies go live through a draft and Review & publish, as in the gateway workspaces. Skills, Apps and Accounts save at once. See Endpoint Agent Policy Engine.
- Browser holds the Browser Extension's controls. See Browser controls.
Browser controls
Browser controls are the rules the QuilrAI Browser Extension applies inside each user's browser. They save at once and have no draft, test, publish step or version history. Browsers pick up a change within about 2 minutes. See Browser Extension policy engine.
Test a situation
Open Test > Try a situation. For the LLM Gateway, describe the person, application, AI model, and request type. For the MCP Gateway, describe the person, server, tool, and operation. Add details that your rules depend on, then run the test and review the deciding rules.
Use Replay activity to compare the candidate with recent recorded traffic. Tests and replay do not change live behavior. See Test and replay.
How policies work
A policy has a name, a priority, one or more stages, conditions, and effects. A stage describes where it applies: request/response for LLM traffic, or session/discovery/request/response for MCP traffic. Those execution stages are separate from the question-based groups in Controls.
When several policies match, use the combination rule shown on the control:
Do not assume that a narrower audience always wins. Scope shortcuts seed a priority, but existing rules keep their stored priority. Inspect the rule and test overlapping cases before publishing.
Every policy also has a QuilrQL text form. Use Policies > Edit technical source when a visual control cannot express the condition or effect you need.
Size limits
Budgets, rate limits and app-specific settings all count toward these limits. A publish that goes over one is rejected (too_many_policies or too_many_rules) and the live policy stays as it was.
Where each control is documented
LLM Gateway controls
The groups follow a model request from access to returned response.
MCP Gateway controls
For combinations not exposed by a visual control, use Policies and the technical source editor. See MCP advanced policy reference.
MCP advanced policy reference
An effect is legal only on the stages that own it. The compiler rejects a rule that puts an effect on the wrong stage, so a quota cannot run at session and a cache mode cannot run at response.
What you can match on
Effects by stage
Quota and concurrency dimensions are keyed by tenant, user, agent, mcp, tool or group, over a fixed or rolling window.
A session rule can combine several advanced effects, for example a locked-down posture for contractors:
runs on sessionpriority 800
App settings under the Policy Engine
The engine switch is tenant-wide. While the LLM Gateway engine is on, these sections of every gateway app's settings follow published policies instead of their own values. Each shows Controlled by Policy Engine, with View policies (open the matching control) and Edit anyway (edit the stored legacy values). Values saved through Edit anyway are not enforced and are not added to policies; they become live only if the engine is disabled. For every transition (publish, rollback, Edit anyway, Management API writes, disable), see What happens to classic settings.
Still managed in the app: LLM providers, custom detections, self-service, alerts, API keys, API integration and audit log. Gateway Access, Tool Controls, Budgets & Usage Limits, Model Visibility, Error Messages and Conversation Compaction are configured in the engine. See Switching from classic settings.