Skip to main content

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.

Go toQuilrAI ConsoleGovernPolicy Engine

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:

SectionUse it to
ControlsOpen a control area, read what happens today, start from a recipe, or manage configured rules.
PoliciesSearch and filter policies, inspect their scope and outcome, add a rule, or open Edit technical source.
TestTry a situation or Replay activity before publishing.
HistoryCompare published versions and review what changed.
Groups (LLM Gateway only)Rank smart groups (Rank: lower number wins; Strength: the resulting position, #1 strongest) and create virtual groups. The best-ranked group governs a person who is in several groups. See Budgets for several groups.
Agents (LLM Gateway only)See the agents and coding tools seen in gateway traffic in the last 30 days, declare agents with an owner and tags, and build agent groups. Views: All agents, Review, Agent groups, Families. See Agents and coding tools.

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:

Control or settingHow matching rules combine
Gateway Access, MCP Server Access, tool accessHighest numeric priority wins; Deny wins ties. A higher-priority Allow can override a lower-priority Deny for that setting. Other checks still apply.
Allowed ModelsMatching allowed lists combine. A model on any matching rejected list is rejected, regardless of priority.
Identity or conversation ID requiredHighest priority wins; Required wins ties.
Allowed source IP rangesMatching rules narrow access by intersecting their ranges.
Token-saving switchesEach switch resolves independently by priority; On wins ties. An Off exemption must outrank the On rule.
Human ConfirmationHighest priority wins; the stricter confirmation requirement wins ties.
Data-risk actionsThe highest-priority matching action applies to the request, call, or result, with stricter actions winning ties. Non-blocking redaction and MCP scan-profile category actions have additional per-type rules; see the control guides.
Severity tagsThe highest matching severity is reported, regardless of priority. Severity does not replace the configured action.

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​

WorkspacePoliciesRules, across all policies
LLM Gateway1,0002,500
Other workspaces200500

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.

GroupControlGuide
Who can use AI?Gateway Access; Allowed ModelsGateway access and allowed models
Who can use AI?Identity & Network TrustIdentity and network trust
Who can use AI?Model VisibilityModel visibility
Who can use AI?Prompt Store & EnforcementPrompt store
What should be checked?Data & Adversarial RisksSecurity guardrails, Custom detections
What should be checked?Guardian AgentGuardian Agent
What should be checked?Tool ControlsTool controls
What should be checked?AttachmentsAttachment scanning
Which model and limits?Routing Groups & FallbacksRouting and failover
Which model and limits?Budgets & Usage LimitsRate, token and budget limits
Which model and limits?Token SavingsToken saving
Which model and limits?Conversation CompactionConversation compaction
What may return?Hallucination ProtectionHallucination protection
What may return?Error MessagesError messages

MCP Gateway controls​

GroupControlGuide
Who can connect?MCP Server AccessServer access
Who can connect?OneMCP FeaturesOneMCP, Tool lists
Who can connect?Web Search SecurityWeb search security
Who can connect?Claims ForwardingClaims forwarding
Which tools are available?Invocation & DiscoveryTool visibility, Group and user rules
What can run?Human ConfirmationHuman approval
What can run?Usage Quotas & ConcurrencyQuotas and concurrency
What can run?Data & Adversarial RisksSecurity guardrails
What may return?Token SavingsToken saving

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​

GroupFields
CallerUser email, user ID, user full name, smart groups, identity provider, client IP
AgentAgent name, keyword, normalized and raw user agent, classification, matching registered agent keywords
RouteRoute kind (direct, onemcp, workflow), route name, route source
MCP serverMCP ID, name, slug, transport, auth type, system MCP, tags
OperationMCP method, operation kind
ToolTool name, type, tags, risk, and the read_only, destructive, idempotent and open_world annotations
Resource and promptResource URI, template URI, name, MIME type; prompt name
ResponseWhether the response succeeded, error code and message
Data foundDetections by exact catalog name

Effects by stage​

SurfaceStageEffects
MCP Server Accesssessionmcp.access allow or deny
Tools, Resources & Promptsdiscovery, request, responsetool.access, resource.access, prompt.access
Human Confirmationrequesttool.confirmation: none, required, or required_with_justification
Data & Adversarial Risksrequest, responsedlp.action, dlp.category_actions, dlp.default_action, dlp.detectors, risk.level
Usage Quotas & Concurrencyrequestquota.minute, quota.hour, quota.day, quota.window, quota.timezone, quota.dimensions, quota.id, concurrency.limit, concurrency.ttl_seconds, concurrency.dimensions
OneMCP Featuressessiononemcp.dynamic_tools, onemcp.memory, tool_list.top_tools (most-used tools listed), tool_list.code (run_code scripts); both tool_list effects are off unless a configuration turns them on
Identity & Managed Authenticationsessionclaims.forward, token.profile, credential references
Capability Cache & Isolationsessioncache.mode: shared, tenant, private or none
Token Savingsresponsetoken_saving.smart_json_compression, html_to_text, markdown_to_text, text_compression
Web Search Securityresponseweb_search.zia_timeout_seconds, excluded_domains, url_overrides, result_domain_action

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:

contractor_session_posturesession

runs on sessionpriority 800

WhenSmart groupsincludes (ignoring case)Contractors
Then
OneMCP dynamic toolsfalse
OneMCP memorydeny
forward user claimsfalse
cache modeprivate

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.

App settings sectionPolicy Engine control
Security Guardrails (data, adversarial, precision detections)Data & Adversarial Risks
Security Guardrails > Hallucination checkHallucination Protection
Security Guardrails > Source IP restrictionsIdentity & Network Trust
Guardian AgentGuardian Agent
AttachmentsAttachments
Rate and Token LimitsBudgets & Usage Limits > Request guards
Token SavingToken Savings
RoutingRouting Groups & Fallbacks
Identity Aware (Enforce identity, Enforce conversation ID)Identity & Network Trust
Prompt Store (Require system prompt from store, Universal system prompt)Prompt Store & Enforcement

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.