# Rate-Aware Authorization: Permission Grants Aren't Enough for Agents <!-- ref: @knowledge/frameworks/rate-aware-agent-authorization type: framework tags: [agent authorization, delegated identity, MCP, scoped tokens, rate limits] version: 1 updated_at: 2026-11-01T03:06:11.669Z --> > For an agent, the right question is often how many times it may act, not only whether it may act at all. *Synthesized from a LangChain presenter (not named in the transcript), "Building Deep Agents and Deploying in Production," LangChain, 2026-07-31. The presenter supplied the one-vs-a-thousand-emails example, delegated identity as the floor, and the inbound/outbound split. The behavioral-threshold layer and the three-layer arrangement are this artifact's synthesis.* ## The problem Traditional role-based access control is binary. A deterministic application either holds Gmail send scope or it doesn't. Once granted, that permission is safe because the code only does what it was written to do. An agent holding the same scope is a different risk. The presenter's example: you may be comfortable letting an agent send one email for you, but if it sends a thousand, someone should investigate. The permission is identical in both cases. Only the behavior differs. A static grant can't tell those two cases apart. ## The model Agent authorization has three layers. Each one catches something the others miss. 1. **Delegated identity (the floor).** The agent acts on behalf of a specific user through an OAuth-style flow. It must never be able to do anything that user couldn't do. This bounds the capability ceiling. 2. **Directional handlers.** Inbound and outbound auth guard against different failures, so they need separate handlers. - **Inbound auth** decides who may invoke the agent. Its failure is the wrong caller steering an agent that holds someone else's delegated power. - **Outbound auth** governs the agent's calls to third-party services with the user's delegated credentials. Its failure is a legitimate caller's credentials being stretched past what that user intended. - A single combined check tends to cover only one of these. 3. **Behavioral thresholds (the agent-specific layer).** Permissions are checked against observed rate and volume, not just the scope. Examples: - actions per run - distinct recipients - spend per session - fan-out width Below a threshold, the agent proceeds. Above it, the action is held for human approval or flagged. ## When to apply Apply this to any agent that can produce side effects that are cheap to repeat and costly in aggregate. Typical cases are messaging, payments, record deletion, outbound API calls, and ticket creation. The more autonomous and long-running the agent, the more weight layer 3 carries, because no human is watching each step. ## How it connects - **Enforcement location.** Enforce thresholds in the runtime or middleware, not the prompt. See `constraints-in-code-not-in-prompt`. - **Human-in-the-loop trigger.** Crossing a threshold is a natural point to pause the run and ask for approval instead of failing silently. Load the context a reviewer needs, per `agent-to-human-handoff-context-preload`. - **Earned autonomy.** Thresholds can loosen as an agent builds a track record. See `progressive-autonomy-exposure-ladder`. ## Caveat The presenter said openly that agent authentication is still unsettled and that the lines are blurrier than for conventional apps. The three-layer structure is a sound way to organize the problem, not an established standard. Specific threshold values will depend on the domain and have to be tuned empirically. ## Source - `@content/youtube/langchain/2026-07-31-building-deep-agents-and-deploying-in-production` --- *Related: `@content/youtube/yifan-bth/we-are-missing-the-point-of-mcp-its-not-just-about-tools` · `@content/youtube/tiago-forte/i-connected-claude-to-everything-then-i-saw-the-gap` · `@content/youtube/every-inc/microsofts-vision-for-an-internet-made-for-agents-with-cto-kevin-scott-best-of-the-pod` · `@content/youtube/tiago-forte/i-connected-my-entire-business-to-claude` · `@content/youtube/cole-medin/anthropic-just-dropped-a-masterclass-on-building-agent-harnesses-for-large-codebases`* --- *You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).* *Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*