If Agents Were Angels, No Governance Would Be Necessary: Out-of-Band Policy Enforcement at a Trusted Tool Boundary
Organizations: Redpanda Data
Abstract
Give an agent a human's credential and it inherits the person's reach without the judgment that limits its use. It can sweep every reachable record into model context, where hidden instructions steer its next call, and every request stays credential-valid while the agent exceeds its job or absorbs a secret. Prompts are a brittle guardrail: one fallible reasoner interprets the task and enforces its limits. We present Out-of-Band Policy Enforcement (OBPE), a trusted boundary outside agent reasoning. It authorizes the typed operation and resource, narrows the query before the backend call, then filters records and fields or masks values in the response. Semantic gating can deny or hold an authorized call on argument values or external state. A data policy owner sets the maximum grant; agent policy can only narrow it. We prove, under stated conditions, that the policy plan is order-independent and agent policy cannot widen the ceiling. Field removal covers one execution; masking and history rules claim less. We release an HTTP proxy prototype simplified from our production system, with conformance tests tying its typed Cedar policy core to the model. Against Jira and ServiceNow mocks, our benchmark compares prompted agents with and without OBPE on four models, including 20 adaptive red-team tasks. A trace failure means protected data entered agent context, an exact value appeared in the answer, or a forbidden effect completed. In 3,621 trials it fell from 57.6% to 0.2%, a cluster-weighted reduction of 41.2 points [95% CI: 27.7, 54.9]; fulfillment fell from 79.1% to 60.9%, while paired safe-useful completion rose 21.8 points [9.5, 35.2]. Some answers reconstructed a value that never entered context or used filtered row counts as an oracle: shaping one execution is not noninterference. Write controls, durable approval, and temporal and aggregate policies lie outside this evaluation.
Figures & tables
| Operator | Stage | Acts on | Most-restrictive combination | Claim | Evidence |
|---|---|---|---|---|---|
| deny | gate | gate result | most restrictive gate result | Exact | Released |
| scope-query | request | query and record limit | conjunction; lowest limit | Exact | Released |
| filter-records | response | record set | owner keeper agent keeper | Exact | Released |
| drop-write-field | request | gate and write map | remove absence-safe fields; deny otherwise | Exact | Implemented, unreachable |
| clamp-write-arg | request | write map | lowest value in the declared direction | Exact | Implemented, unreachable |
| strip-field | response | field set | intersection of retained fields | Exact | Released |
| Capability | Released artifact | Production implementation |
|---|---|---|
| Write controls | Write guard on supported partial updates. Drop and clamp only in synthetic tests. | Broader schema mappings for persisted write workflows. |
| Human deferral | Hold/no-dispatch and per-call transition tests. Terminal timeout and approved dispatch absent. | Durable, ordered approval log. Attribute-based access control protects inspection and resolution. |
| Temporal policy | No released execution. | Implemented over durable, trusted history. |
| Aggregate policy | No released execution. | Implemented over durable, trusted history. |
| Comparison | How to read it | |
|---|---|---|
| RQ1 | Prompt only Prompt + full OBPE, on four models. | Adds only the policy boundary. This is the primary test of what OBPE adds beyond detailed prompt rules; it is not a provider ranking. |
| RQ2a | Raw Raw + full OBPE and Prompt only Prompt + full OBPE, on Sonnet. | A prompt-rules OBPE design. The two effects test OBPE with and without prompt help; their difference tests interaction. |
| RQ2b | Record controls + strip fields + mask fields and guard writes + pattern masking, on Sonnet. | A cumulative ablation with all other inputs fixed. Adjacent steps isolate field stripping and pattern masking, but not masking from write guard. |
| RQ3 | Prompt + output reviewer Prompt + full OBPE, on Sonnet. | Compares a model that reviews assistant text with a boundary that mediates requests, responses, and backend effects. It is not a ranking of all LLM guardrails, and no local A2A experiment is claimed. |
| Outcome | Raw | Prompt | Prompt+OBPE |
|---|---|---|---|
| Trace failure | 63.3% | 57.6% | 0.2% |
| Entered agent context | 55.1% | 52.1% | 0.0% |
| Exact final disclosure | 27.5% | 3.7% | 0.2% |
| Semantic disclosure, Judge A | 30.0% | 8.8% | 1.6% |
| Semantic disclosure, Judge B | 25.4% | 8.2% | 2.1% |
| Forbidden backend effect | 8.1% | 5.5% | 0.0% |
| Policy configuration | Protected | Fulfilled (A) | Safe-useful (A) |
|---|---|---|---|
| Record controls | 46.7% | 75.1% | 21.8% |
| + field stripping | 69.4% | 70.0% | 37.6% |
| + masking and write guard | 88.6% | 65.7% | 51.9% |
| + pattern masking (full) | 100.0% | 66.2% | 63.0% |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| System or configuration | Agent- inaccessible | Deterministic | Interoperable | Resource aware | Boundary shaping | External gating |
|---|---|---|---|---|---|---|
| Envoy ext_proc with external policy [ 18 ] | P | P | Y | P | Y | P |
| AgentCore Policy, base [ 2 ] | Y | Y | P | P | N | N |
| AgentCore Policy with Dogwood temporal rules [ 4 , 17 ] | Y | Y | P | P | N | N |
| AgentCore Policy with model-based guardrails [ 3 ] | Y | P | P | P | P | N |
| Progent [ 35 ] | Y | P | P | P | N | P |
| CaMeL [ 13 ] | P | Y | P | P | N | P |
| Obligation | Purpose | Evidence or control |
|---|---|---|
| Query joins use conjunction | Preserves caller and policy filters | Vertical refusal and query-join tests |
| Pattern masks use canonical order | Prevents rule-order dependence | Golden fixture |
| Mask placeholders are inert | Prevents remasking | Golden fixture |
| Full redaction supersedes partial rewrites | Fixes one content normal form, not a semantic meet | Composition fixture |
| Caps are enforced after fetch | Backend cannot evade the cap | Proxy invariant |
| Row filters see unprojected records | Projection cannot change predicates | Proxy fetch contract |
| Condition | Formal role | Released artifact | Conformance | Not released |
|---|---|---|---|---|
| O1 identity/mediation | All claims | Bound identity; HTTP path | Identity/path tests; released grid | MCP; remote A2A |
| O2–O3 fixed semantics | Permutation invariance | Staged path; sensitivity chain | Stage/full-path tests; mutations | Product-order registry |
| O4 safe writes | Write monotonicity | Guard live; drop/clamp unreachable | Guard full path; drop/clamp synthetic | Broader write workflows |
| O5 trusted decisions | Defer/history | Hold path; nonterminal in-memory transition | Hold/no-dispatch tests | Terminal timeout; durable, temporal, aggregate |
| Owner ceiling | Propositions 1 – 3 | Two-tier staged path | Tier attribution; mutation checks | Production deployment |
| Annotation | Meaning |
|---|---|
| @id | Stable policy name used for lookup and audit. |
| @transform | Selects the wrapper decision or shaping operator. |
| @field_group | Names a response allowlist; matched groups meet by intersection. |
| @cap_limit | Positive collection cap; matched caps meet by minimum. |
| @pattern_mask_fields , @pattern_mask_rules | Name fields to scan and schema-defined pattern categories. |
| @write_guard_fields | Names fields the agent may not originate; omission must preserve stored state. |
Runtime Enforcement for AI Agents
Runtime enforcement for AI agents checks and constrains actions as they execute, helping prevent unsafe or unauthorized effects.
See all 279 papers