Policy engines and enforcement outside the model
Enforcement belongs in code the model cannot argue with, not in the prompt it follows.

A policy engine is a decision point that sits outside the model: the runtime asks it about an action that is about to happen, the engine answers from rules written elsewhere, and that answer — not the model’s intention — decides whether the action proceeds. Open Policy Agent states the shape plainly: “OPA decouples policy decision-making from policy enforcement” (opa-docs.txt, lines 72–73). This sheet is about where that second place can be.
The reason to move the decision out is that a model’s compliance is a behaviour, not a control. Critical controls must “not be delegated to the LLM, either through the system prompt or otherwise”, OWASP writes, and they “need to occur in a deterministic, auditable manner” (owasp-llm-top10-2025.txt, lines 1236–1237). CaMeL makes the same move structurally: it wraps the model in a custom interpreter and “does not rely on model behavior modification” (camel-2503.18813.ro.txt, line 18). The model may propose; something it cannot talk out of the decision disposes.
Deciding and enforcing are two different places
OPA is “an open source, general-purpose policy engine that unifies policy enforcement across the stack” (opa-docs.txt, lines 59–60), but its division of labour is narrower: “When your software needs to make policy decisions it queries OPA and supplies structured data (e.g., JSON) as input” (lines 73–74). The engine returns a decision; the software that asked is what stops or performs the action. That is why OPA can be “co-located with your service” as “a sidecar, host-level daemon, or library” (opa-philosophy.txt, lines 105–106): the decision point moves.
Standards name the enforcement side separately. NIST SP 800-53 requires the policy to be “uniformly enforced over all subjects and objects to which the system has control” — “Otherwise, the access control policy can be circumvented” — by “an implementation that meets the reference monitor concept” (nist-sp800-53r5.txt, lines 2574–2576). A mediator that sees most calls is not a mediator. MCP places the same idea in the network: server-side deployments “SHOULD consider using an egress proxy that enforces network policies” (mcp-security-best-practices.txt, lines 359–360).
What the enforcement point can see decides what it can enforce
An engine decides from the input it is handed and nothing else: “OPA generates policy decisions by evaluating the query input against policies and data” (opa-docs.txt, lines 76–77). It cannot infer a fact nobody supplied, so the mediator’s field of view is the real policy boundary — a rule about a value the enforcement point never sees is a rule that will not fire.
CaMeL shows what it takes to widen that field. Its interpreter “maintains a data flow graph (i.e., tracking which values each variable depends on), and uses it to enforce security policies based on capabilities when executing tools” (camel-2503.18813.ro.txt, line 100), applying the policy “to that variable and its dependencies, as identified by the dependency graph” before the call runs (line 364). NIST draws the outer edge: the policy “is bounded by the system” (nist-sp800-53r5.txt, line 2577).
The decision is a value, not a verdict
“Policy decisions are not limited to simple yes/no or allow/deny answers. Like query inputs, your policies can generate arbitrary structured data as output” (opa-docs.txt, lines 84–85). CaMeL’s policies return “a SecurityPolicyResult expressed as Allowed or Denied, along with a reason for the decision” (camel-2503.18813.ro.txt, lines 307–308). A boolean suits one gate; a structured decision can be split across several enforcement points that log, redact or escalate.
Why the model’s own decision is not a control
Prompting or training a model to obey a policy is a request, and the request is “frequently implemented as vulnerable system prompts” (camel-2503.18813.ro.txt, line 9). Even a well-trained model gives no guarantee — “it is not a guarantee that the model will always adhere to this”, which is why OWASP asks for “a system of guardrails outside of the LLM itself” (owasp-llm-top10-2025.txt, lines 1226–1228). In CaMeL the policies, not the prompt, are the control: they “govern globally-allowed actions for the provided tools (i.e., independently of the prompt)” and “are checked against before each tool call” (camel-2503.18813.ro.txt, line 214). Independence from the prompt is the mechanism.
What enforcement costs, and where it fails
Enforcement is not free. CaMeL solves “77% of tasks with provable security (compared to 84% with an undefended system)” (camel-2503.18813.ro.txt, line 5), and it depends on reach: capability-based systems “ideally require full participation from the entire ecosystem”, and where tools do not take part, “utility degrades” (line 977). A refusal is not always a block — such executions “will not be blocked, but they will require user confirmation” (line 364) — making a human an enforcement point with a budget of their own. A decision point outside the model buys determinism and pays in coverage, utility and maintenance.
Level and prerequisites. L5 — the specialist level for placement rather than construction: where the decision point sits, what it can see, and why the model’s own compliance never counts as the control. Prerequisites: the L4 sheets on the action loop and its stopping conditions, on separating the model orchestrator from the tool executor, and on execution policy, deny-by-default and allowlists, which define the policy; and the L3 sheets on tool calling and argument validation.
Where to go next
- Automation & AI — the macro-area this sheet belongs to.
- Operations and risk — the node this sheet sits in.
References
- Open Policy Agent — Documentation — the decision/enforcement split, the query-input contract, and decisions as arbitrary structured data.
- Open Policy Agent — Philosophy — the engine co-located as a sidecar, host-level daemon or library.
- Debenedetti et al. — Defeating Prompt Injections by Design (CaMeL) — the interpreter that enforces policies at tool calls from a data-flow graph, the policy return type, the utility figure and the ecosystem precondition.
- NIST — SP 800-53 Rev. 5 — access and information flow enforcement, the reference monitor and the system bound.
- MCP — Security Best Practices — the egress proxy as an enforcement point off the model’s own process.
- OWASP — Top 10 for LLM Applications 2025, LLM01 Prompt Injection — guardrails outside the model, and controls that must not be delegated to it.