Runtime authorization for AI agents: per-call permissions
Runtime authorization for AI agents means checking policy on every tool call, at the moment the agent makes it, instead of once at login. Each call is allowed, denied or sent for approval, based on who the agent acts for, what it is about to do, and the current policy.
Your role-based access control (RBAC) assigns a role at login. Your agent then makes dozens of tool calls in a minute. By the time a person could review the third one, the agent is done.
Nobody designed authorization for that. This post covers why static roles break for agents, and what a per-call check looks like. For the short definition, see what is runtime authorization.
Authorization was built for humans
The usual flow: a user signs in, gets a role, the role grants permissions, and each request is checked against them. It works because humans are slow. They click one button at a time, read the response and make maybe 20 requests a session.
Agents break each of those assumptions. They chain tool calls on their own, decide what to touch as they go, and make calls faster than anyone can read them. The question stops being “does this user have permission?” and becomes “does this agent, acting for this user, have permission to do this specific thing right now, given what it has already done?”
A traditional app has two parties. The user signs in to the backend, identity flows straight through, and the audit trail works.
An agent adds a third party. The user signs in to an LLM runtime. The LLM decides to call your backend. Your backend sees a service account token. It doesn’t know who started the request or what the agent did before it.
Why static roles fail
Four things break.
Speed. An agent makes 50 tool calls while you’re reviewing the first. A role check at session start can’t help once the agent’s behavior unfolds across dozens of calls.
Chains of calls. An agent reading your CRM is fine. The same agent reading your CRM and then emailing the data to an outside address is an exfiltration pattern. A role check looks at each call alone, and the risk is in the sequence.
Scope creep. An agent starts by reading CRM contacts. Then it decides to update a record and create a follow-up task. The user’s role may allow each step. Read, modify and create together in one unattended session may break your data policy. Roles have no idea what has been used so far.
Delegation. The user is an admin. Should their agent be? A role-based system says yes, because the agent inherits what the user has. But an agent working at machine speed shouldn’t have the same privileges as a person who reviews each action. RFC 8693 (OAuth 2.0 Token Exchange) covers this kind of delegated access. Most agent frameworks don’t use it.
What runtime authorization is
It’s a policy check on every tool call, not every session or every minute. If an agent makes 200 calls in a workflow, that’s 200 decisions, each against the current policy.
Four principles describe it well:
A check on every call. The decision happens at the moment of the call, with the user, the tool and the arguments in view.
Deny or ask for what isn’t granted. In a strict setup, the agent has no access until a capability is explicitly allowed. OWASP lists excessive agency as a risk for agents: an agent that can do everything its user can do is easy to exploit. Note that ACP does not start there. A new ACP workspace starts in audit mode, where everything is recorded and your rules don’t block yet. You turn enforcement on when you’re ready.
Less than the user has. An agent’s permissions should be a strict subset of the user’s. The CFO’s agent shouldn’t hold CFO-level access, and an intern’s agent should get less than a manager’s.
Policy as code. Rules are written down, kept in version control and enforced in one place. They are not buried in application logic or scattered across services.
An example
A sales rep tells their agent: “Pull the Q1 pipeline and email a summary to the VP.”
The agent plans three steps: query the CRM, write the email, send it. The check runs at each tool call.
- Step 1. The agent reads the CRM. The rep’s role allows it. Allow.
- Step 2. The agent writes the email. That’s the model reasoning, not a tool call, so there is nothing to check.
- Step 3. The agent sends an external email. Policy limits external sends to managers and up. The rep isn’t one. Deny.
The agent finishes step 1, drafts the email and can’t send it. The audit log records the denial and the rule that caused it. The user sees: “I prepared the Q1 summary but can’t email it outside the company. Ask your manager to send it, or share it internally.”
Here is that policy, written as a generic example. It is not ACP’s own rule format:
policies:
- role: rep
allow:
- tool:crm:read
- tool:email:draft
- tool:email:send:internal
deny:
- tool:email:send:external
- tool:crm:write
- role: manager
allow:
- tool:crm:read
- tool:crm:write
- tool:email:send:internal
- tool:email:send:external
A security team can read it without writing code, and a machine can enforce it.
Where the check runs matters
If authorization lives inside the agent, as prompt instructions or system messages, you’re asking the model to follow the rules. That’s a request, not a control. A prompt-injected agent can be talked out of instructions it was given.
The check has to sit outside the model’s reasoning, in a hook the harness must call before a tool runs, or in a gateway the call has to pass through. Be clear about what that does and doesn’t give you:
- A hook runs on the machine where the agent runs. Whoever controls that machine can switch it off, and some harness flags do. In Claude Code,
--dangerously-skip-permissionsdrops most permission prompts, but deny rules, explicit ask rules andPreToolUsehooks still apply (what the flag does and doesn’t turn off). On Antigravity, its skip-permissions flag removes hooks, ACP’s included. - A gateway that your backend only accepts calls through is harder to go around, because the check isn’t on the agent’s machine. That’s a stronger boundary where you can build it.
In both cases the decision is made before the call reaches the tool, and the denial is logged with the identity, the tool and the matched rule. Rules you have written down give an auditor something concrete to read. The EU AI Act’s Article 14 requires human oversight for high-risk systems, and “we told the LLM not to” is not evidence of it.
Budget is authorization too
Usage limits are authorization decisions. You’re allowed to spend $50 a day on agent work, not $5,000.
A single agent stuck in an error loop can burn through a monthly LLM budget before anyone notices. Counting requests doesn’t help, because one expensive model call can cost more than a thousand cheap ones. In our metered data, 285,814 governed calls at that post’s date, one frontier model drove 77% of the spend across 30% of the calls. Cost per call is what needs counting.
Here is a generic version of a budget check, again not ACP’s own API:
const budgetCheck = evaluateBudget({
user: { sub: "auth0|8f3a2b1c" },
estimatedCost: 0.12,
windowSpend: 48.73, // spent so far today
dailyLimit: 50.00, // tenant policy
});
// budgetCheck.allowed = false
// budgetCheck.reason = "daily budget exceeded (48.73 + 0.12 > 50.00)"
You wouldn’t hand an employee a corporate card with no limit and no alerts. Don’t hand one to their agent.
Frequently asked questions
What is runtime authorization?
Runtime authorization is checking policy on every action at the moment it is attempted, instead of once at login or session start. For AI agents that means each tool call is evaluated against who the agent acts for, what it is asking to do, and current policy, and is allowed, denied or sent for approval before it runs.
How is runtime authorization different from RBAC?
RBAC assigns a role at login and every later request inherits it. Runtime authorization still uses roles as an input, but decides per call, so it can deny one specific action (an external email, a write to a production table) inside a session the role otherwise permits.
Where should runtime authorization be enforced for an agent?
Outside the model’s reasoning: in a hook the harness must call before a tool runs, or in a gateway the call must pass through. Instructions in a prompt are suggestions the model can be talked out of. A hook or gateway decision is not.
Where to start
If your agents call tools today, ask three questions.
-
Is authorization checked on every call, or only at session start? At session start, you’ve authorized intent. What the agent actually does may differ.
-
Is the check outside the model? In the prompt, it’s a suggestion. In a hook or gateway, the model can’t argue with it.
-
Can the agent do more than its user can? If it inherits the user’s full role, you’ve given an unattended process the trust of a careful person, at many times the speed.
The Agentic Control Plane checks each tool call through the harness’s own hooks and records every decision in one log. The coverage matrix lists what it sees on each harness.
Get started · Reference architecture · Data plane vs control plane
Running coding agents? ACP records each tool call its hook sees and makes the dangerous shell commands (a force-push, destructive SQL, curl | sh) wait for you. One command, free up to 5 agents:
curl -fsSL https://agenticcontrolplane.com/install.sh | bash
irm https://agenticcontrolplane.com/install.ps1 | iex