Beyond Monitoring: Why Authorization Must Be Part of the AI Agent Runtime
Check Agent Permissions at the Tool Boundary An AI agent can make a reasonable decision in the wrong context. It may have seen an approval earlier, misunderstood a policy, or received new instructions after permissions
Check Agent Permissions at the Tool Boundary
An AI agent can make a reasonable decision in the wrong context. It may have seen an approval earlier, misunderstood a policy, or received new instructions after permissions changed. If that agent can call tools, the system needs to decide not only whether an action looks appropriate, but whether it is authorized when the action is about to happen.
I work on AI and ML systems where this distinction matters in practice. A model monitor can help detect a suspicious call. But detection and prevention are different outcomes. A monitor that flags a call after the tool has executed may leave us with a useful audit record and an unwanted side effect.
Consider an agent asked to clean up cloud resources. It proposes calling delete_resource on a particular project. A monitor can inspect the conversation and decide that deletion seems risky. An authorization gate at the executor checks the proposed action against current authority: Is this agent allowed to delete this resource? Is the permission still valid? Has it been revoked or already consumed? Do the approved arguments match the call being submitted?
If the current authorization does not cover that exact call, the executor denies it before invoking the tool. The model can still explain why it wanted to act, and a monitor can still flag suspicious behavior. Neither supplies the permission. That decision belongs to a trusted enforcement point close to the side effect.
The distinction also matters when permissions change. A model may correctly recall that a user approved an action earlier, while the authorization has since expired or been revoked. A transcript can contain the history of the approval without reflecting its current status. In my Study 3 design, authorization decisions depended on fields such as the validity window, revocation time, prior consumption, and whether the authorization matched the run, tool, and arguments. These are state checks; a modelβs interpretation of a conversation is not a substitute for them.
In Study 2, I compared four execution-boundary designs using proposals from two 3B-class open-weight models across ten scenario families. The final analysis included 997 proposals, of which 797 were unauthorized. In the monitor-only arm, the monitor recorded a verdict but did not block execution: all 797 unauthorized proposals ran. Its recall was 0.789, and it classified 72 of 200 authorized proposals as unauthorized. The two authorization gates executed none of the 797 unauthorized proposals in these scenarios.
Study 3 asked a related question: what happens when an LLM gatekeeper is asked to make a blocking authorization decision? On 1,050 unauthorized synthetic proposals, the information-matched Qwen gatekeeper allowed 170, and the Llama gatekeeper allowed 701. The deterministic rules using live authorization state allowed none in that dataset. In a separate bounded evaluation with 60 seeds and five predetermined operators, the matched Qwen and Llama gatekeepers were bypassed in 40 and 57 seeds, respectively; the live deterministic rules were bypassed in none.
These results are observations from controlled experiments, not evidence that every model monitor will behave the same way. Study 2βs monitor-only arm was non-blocking by design, so its execution count shows what happens when a monitor records rather than enforces a verdict. Study 3 used synthetic scenarios, two quantized 3B-class models, and a bounded, non-adaptive attack procedure. Its deterministic gate was a Python reimplementation of authorization semantics, not AIGov Core. The confirmatory proposals did not trigger real external side effects. Neither study establishes production performance, universal security, or that a gate can compensate for incorrect policy or compromised infrastructure.
For me, the engineering principle is narrow: let the model propose and explain actions, but put authorization enforcement at the point where a tool call can take effect. Keep the decision tied to the current permission state and to the specific action being executed. Monitoring remains valuable for detection and audit; the executor is what can refuse the call.
Iβm affiliated with AIGov, which develops AIGov Core. Study 2 included a signed gate backed by Core; Study 3 evaluated a Python reimplementation, not Core.
How do you separate an agentβs decision to call a tool from the system that enforces whether that call is authorized?
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.