Skip to main content

Policy Engine overview

The Policy Engine decides what happens when AI use crosses a line. It has one tab per enforcement surface, and each surface holds the controls enforced through that product.

Go toQuilrAI ConsoleGovernPolicy Engine

The four surfaces​

TabModelWhat you configure
Browser ExtensionControls tableMonitor and action controls for AI apps and websites in the browser
LLM GatewayCard engine, versionedData, tools, models, identity, routing, spend and quality on every model call
MCP GatewayCard engine, versionedServer access, tool visibility and invocation, approvals, quotas and responses for MCP traffic
Endpoint AgentBasic policiesPer-app detection and application configuration on managed devices

Browser Extension​

A table of controls. Search, filter by Posture (AI Risks, Data Risks, Device Risks, IT Support, MFA Risks, Password Hygiene and more) and Type, sort by Recently modified, Export, or Add control. Each row shows the control name and use case, Criticality, Mode (Monitor or Action), a Status toggle, and who created and last updated it. The row menu offers Edit and Duplicate.

The edit form has three parts: control details (name, description, criticality from Very Low to Very High, mode), When this happens (the use case, fixed after creation, plus mandatory and additional conditions), and Perform action. See Browser controls.

LLM Gateway and MCP Gateway​

Both gateways use the same card-based engine:

  • The header shows ENGINE ON, the live Revision N, how many cards are active, and History.
  • Each card has Configure (edit in place) and a summary of what is set.
  • All edits from every card collect in one shared draft. Nothing changes for live traffic until you review the draft and publish it. Publishing creates the next numbered revision.
  • History lists published revisions, so you can review and roll back. Rollback republishes an earlier revision and never changes the classic settings.
  • Advanced policies holds rules that no card can express. They stay byte-preserved; card edits never rewrite them.

The MCP Gateway tab groups its cards by the stage where they take effect: 1 Session (evaluated once per connection), 2 Discovery (per listed capability), 3 Request (before a call is dispatched) and 4 Response (before the result returns).

See Author, simulate and publish for the draft and publish workflow.

Endpoint Agent​

The Endpoint Agent tab still runs in Basic policies mode, with Detection configurations and Application configuration sub-tabs and a card per supported AI app (ChatGPT, Claude, Cursor, Copilot, Gemini, DeepSeek, Ollama, LM Studio and more). A Convert to Policy Engine button moves it to the engine model. See App policies.

Describe a request​

On the LLM Gateway tab, What applies to one request has a Describe a request button (on the MCP Gateway tab: Describe a call). Describe a request or session, for example the user, application, model, server or tool, and every card collapses to the value that would win for it, resolved from the shared draft the way the engine merges it. Use it to answer "what happens to this call?" before you publish.

How policies work​

Each card setting is stored as a policy: a sentence with a name, a priority, a stage, conditions and effects.

block_request_secretsrequest

runs on requestpriority 900

Whendata foundis any ofAuth & Secrets
Then
Sensitive data actionblock
Risk levelcritical
PartMeaning
NameStable identifier. Activity history is keyed by name, so renaming a live policy starts a fresh history.
PriorityHigher wins when several rules set the same single-value setting. New policies start at 500.
StageWhere the rule runs: request and response for the LLM Gateway; session, discovery, request and response for the MCP Gateway.
ConditionsWho, which app, model, server, tool or metadata. No conditions means every call on that stage.
EffectsThe settings that take effect.

When several rules match:

  • Restriction wins. A deny is not undone by a permissive rule elsewhere.
  • Priority settles single values. A person rule sits above a Smart Group rule, which sits above an everyone default.
  • Risk only climbs. A call's risk level rises to the highest any matching rule assigns.
  • Redaction is per data type. redact and partial-redact apply only to the findings their own rule selected, so rules for different data types never compete. block stops the whole call.

Every policy also has an exact text form in QuilrQL, the policy language. Use the source view for review, diffing or bulk work.

Where each control is documented​

LLM Gateway cards​

CardDocs
Data & Adversarial RisksSecurity guardrails, Custom detections
Guardian AgentGuardian Agent
Hallucination ProtectionHallucination protection
Gateway AccessGateway access and allowed models
Identity & Network TrustIdentity and network trust
Tool ControlsTool controls
Allowed ModelsGateway access and allowed models
Routing Groups & FallbacksRouting and fallbacks
Budgets & Usage LimitsRate, token and budget limits
Rate, Token & Timeout LimitsRate, token and budget limits
Token SavingsToken saving
Prompt Store and EnforcementPrompt Store

MCP Gateway cards​

StageCardDocs
1 SessionMCP Server AccessServer access
1 SessionOneMCP FeaturesOneMCP
1 SessionClaims ForwardingClaims forwarding
2 DiscoveryDiscovery VisibilityTool visibility
3 RequestInvocationTool visibility, Group and user rules
3 RequestHuman ApprovalHuman approval
3 RequestUsage Quotas & ConcurrencyUsage quotas and concurrency
3 Request, 4 ResponseData & Adversarial RisksSecurity guardrails
4 ResponseToken SavingsToken saving
4 ResponseWeb Search SecurityWeb search security

Settings without a card (cache mode, managed authentication and credential references, web search tuning, response-stage access rules) live under Advanced policies & classifications. 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 Approvalrequesttool.confirmation none or required
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
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 card) 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 card
Security Guardrails (data, adversarial, precision detections)Data & Adversarial Risks
Security Guardrails > Hallucination checkHallucination Protection
Security Guardrails > Source IP restrictionsIdentity & Network Trust
Guardian AgentGuardian Agent
Rate and Token LimitsRate, Token & Timeout Limits
Token SavingToken Savings
RoutingRouting Groups & Fallbacks
Identity Aware (Enforce identity, Enforce conversation ID)Identity & Network Trust
Prompt Store (Require system prompt from store)Prompt Store and Enforcement

Still managed in the app: LLM providers, custom detections, self-service, alerts, API keys, API integration and audit log. Gateway Access, Tool Controls and Budgets & Usage Limits exist only in the engine. See Switching from classic settings.