Prompt instructions.
Useful for shaping ordinary behaviour, unreliable against adversarial input. Never the last line of defence for anything that matters.
MKC2 results ↗Access control for agents has to sit between the model and the resource, evaluated on every call, because anything inside the context window can be argued with.
01 / DEFINITION
The short answer first.AI agent access control is the enforcement of what an agent may reach, implemented outside the model. Every tool call is authorised at the moment of use against the identity the agent is acting as, so a model persuaded to attempt something it should not attempt is still refused.
The defining constraint is that the model cannot be part of the enforcement path. Instructions in a system prompt shape behaviour under normal conditions and can be overridden by sufficiently persuasive content in the context window. A control that can be argued with is not a control, which means the boundary has to be code the model calls through rather than text the model reads.
WORKED EXAMPLE
A service agent is helping a technician investigate a warranty claim. The technician can view claims assigned to their region but cannot read another region's customer addresses. The agent's search tool can technically query both regions. Access control must therefore be enforced by the system retrieving the claim, before any unauthorised record reaches the model.
Create one synthetic claim and request it as the assigned technician and as a technician from another region. Keep the wording and claim identifier identical. The authorised request should return the permitted fields. The other request should reveal neither the address nor a descriptive error that confirms private details about the claimant. A refusal after retrieval is too late if the protected content already entered the model context.
Then change the assigned technician's role from investigator to auditor. The auditor may be allowed to see a redacted record but no longer update the claim. Test reading, editing and exporting separately. A single successful read does not demonstrate that write restrictions are working.
Save the final tool decision, identity, record identifier and returned field set. Avoid recording full addresses in widely accessible audit logs. If access was denied correctly but a cached answer still contains the old address, route the issue to the cache owner as well as the access-control owner. Both components participate in the effective security boundary.
02 / THE GATEWAY PATTERN
The architecture that holds up in practice puts a single gateway between the agent and every tool. The model produces a structured request; the gateway validates the schema, resolves the caller identity, applies policy, performs the call and records the result. The model never holds a credential and never reaches a resource directly.
Centralising has three effects that matter. Policy is written once rather than per integration. The trajectory log is complete by construction, because every call passes through one place. And revocation is real: removing a capability at the gateway takes effect immediately, without redeploying the agent.
| Check | Question | If skipped |
|---|---|---|
| Schema | Are the arguments well formed and within range? | Free-form arguments become an injection surface of their own |
| Identity | Who is this call being made on behalf of? | The agent's own rights apply, amplifying privilege |
| Authorisation | May this identity perform this operation here? | Session-start checks miss anything the agent reaches mid-run |
| Quota | Is this within the volume allowed for one run? | Bulk reads are indistinguishable from legitimate use |
| Egress | Is this destination on the allowlist? | Any outbound call becomes an exfiltration path |
| Record | Has the call and its trigger been logged? | Incidents cannot be explained afterwards |
03 / EGRESS IS THE ONE TO GET RIGHT
Most practical exfiltration from an AI system uses an ordinary feature: a fetch, a webhook, an image reference, a link the interface renders.
An agent that can construct an arbitrary outbound request can encode anything it has read into that request. This does not require a write tool, a vulnerability or an unusual capability — a general-purpose HTTP tool is sufficient, and so, in some interfaces, is a markdown image whose URL the client fetches automatically.
The controls are unglamorous and effective: no general-purpose outbound HTTP tool; specific tools for specific destinations; an allowlist enforced at the network layer as well as in application code; and sanitisation of rendered output so client-side fetches cannot be triggered by generated content. For deployments where the material is confidential by default, the strongest version of this control is an environment with no outbound path at all, which is the arrangement described in private AI inference.
04 / WHAT NOT TO RELY ON
Useful for shaping ordinary behaviour, unreliable against adversarial input. Never the last line of defence for anything that matters.
Blocklists for injection phrases are bypassed by paraphrase, encoding and translation. Worth having, not worth trusting.
Checking rights once at the beginning of a long run misses everything the agent decides to reach for later.
A guard model that inspects requests before execution is a genuine addition, and it is a filter rather than a boundary: it reduces the rate at which bad calls are attempted without changing what is possible. Its own error rates should be measured before it is credited in a risk assessment, the same way any other model is measured — see AI model evaluation.
05 / QUESTIONS
Because the system prompt shares a channel with untrusted input. Retrieved content can contradict it, and the model has no reliable way to rank instructions by origin. Prompt rules shape default behaviour; they do not constrain a determined input.
Yes. An agent's target is decided at runtime, so rights checked at session start say nothing about the record it reaches for at step forty. Per-call checks are also what makes revocation immediate.
Retrieval has to be filtered by the same identity as tool calls, ideally at query time. Post-filtering results after generation is too late, because the content has already entered the context. See RAG access control.
No. A guard model reduces the rate of bad requests; a gateway determines what is possible. They compose well — guard first, enforce always — and the gateway is the part that must hold when the guard is wrong.
In practice: no implicit trust from network position or session history, identity verified per call, least privilege by default, and full recording. The agent case adds one twist — the instructions reaching the model may themselves be adversarial, so the identity being verified is the user's, not the model's intent.
WORK WITH PRIVILEGE AI
Limits that hold, not polite requests.
We build agents whose access is set by the system itself, so a cleverly worded instruction cannot talk them past their limits.
Clear rules for what an agent may touch.
We define which information an agent can reach and which actions it can propose, task by task.
Private deployment when it matters.
For confidential work, we can run the system inside a boundary you operate.
Talk with Privilege AI
Describe the resource, user and action your access policy should distinguish when the agent calls a tool.
CONTACT PRIVILEGE AI
Describe the resource, user and action your access policy should distinguish when the agent calls a tool.
Privilege AI builds systems where permissions and retrieval boundaries define what a model can access and which actions it can propose.