Here's a pattern I see in almost every agent framework: you define an agent, you list the tools and actions it needs, and the platform saves that list as what the agent is allowed to do.
Read that again. The agent's own declaration is its authorization. Whoever writes the definition, or whatever code generates it, decides what the agent can touch. Nobody else is asked.
In the early days of a project that's convenient. A few months later you have forty agents, half written by people who've moved teams, and a question from security that sounds simple: "which agents can send email to customers, and who approved that?" With self-granted permissions, the honest answer is "all of the ones that asked, and nobody".
Part 3 covered which agents can call which. This part covers what agents can do to the outside world, and why the request and the approval need to be two separate steps.
Split the request from the grant
The fix is boring and it works: an agent requests permissions, and something else grants them. That something is either the project owner, or a project policy the owner wrote ahead of time.
That one split gives you:
- A reviewer for every new capability. Adding
payments.refundto an agent becomes a change somebody has to look at. - Least privilege by default. The agent gets what was approved, not what it asked for. If a developer adds
crm.delete"just in case", it sits pending until someone decides. - An answer to the security question. Every grant has who approved it and when.
Policies so humans aren't approving everything
If every permission needs a click, people start clicking without reading. So most of the value comes from a short project policy that decides the routine cases automatically:
| Kind of action | Suggested policy | Why |
|---|---|---|
| Read (search, fetch, list) | Auto-approve | Low blast radius, high volume |
| Update internal records | Auto-approve in dev, owner approves in production | Useful in testing, risky with real data |
| Send (email, chat, webhooks to outsiders) | Owner approves | Can't be unsent |
| Delete, pay, change permissions | Owner approves, and consider a human step at run time | Irreversible or privilege-changing |
Two refinements I'd add once the basics work:
Re-approve on change. If an approved agent's definition later asks for something new, the new permission goes back to pending. The old grants stay.
Grants belong to an agent version, not just a name. If someone replaces the code behind "billing-agent" entirely, its grants shouldn't silently carry over to the new behavior.
The check happens on the server
This is the same principle as everywhere else in this series: the server enforces, the model proposes.
When an agent calls a tool action, the platform checks the grant before the action runs. It doesn't ask the model whether it's allowed. It doesn't rely on the tool description saying "only use this for VIP customers". A prompt can talk a model into almost anything. It can't talk a permission check into returning true.
Denials are data
Most systems treat a denied call as an error and move on. I think denials are one of the most useful signals you have in a multi-agent system, as long as you record them properly.
For every agent-to-agent call and every tool call that's refused, record:
- caller (the agent identity from the token, see part 2),
- receiver or tool action,
- scope that was needed,
- decision and reason, in words a person can read,
- chain, so you can see who started it,
- run and session, so you can open the full trace.
What not to record: secrets, full prompt contents with personal data, or the token itself.
Then alert on patterns, not single events. One denial is usually a config gap. Five denials for the same agent in ten minutes, especially against actions it has never tried before, usually means one of two things: a deploy went wrong, or the agent read something that's trying to steer it. Both are worth waking up for.
How DNotifier handles it
Request and approval are separate. Agents declare the permissions they need, and those declarations are requests. The project owner, or a project policy the owner set, approves them. An agent can't use a tool action nobody approved.
The check runs on the backend. Permissions are enforced by the server when the tool action is called, not by the model and not by the tool description.
Calls and denials are in Traces. Every agent-to-agent call and every denial is recorded with caller, receiver, scope, decision and reason, filterable per agent, and an alert fires on repeated denials. Every workflow step is traced as well, so a denial always links back to the run it happened in.
A checklist for your own system
- Who approved each permission your production agents hold? If the answer is "the agent's own definition", start here.
- Do you have a written policy for read vs write vs send vs delete?
- Does a new permission on an existing agent need approval, or does it slip in with the next deploy?
- Is every tool call checked by code before it runs, regardless of what the prompt says?
- Can you list every denial from last week, by agent, with reasons?
- Do you alert on denial bursts?
FAQ
Doesn't approval slow developers down?
Only for the actions that should slow down. With a sensible policy, reads and dev-environment updates go straight through. The approvals that remain are the ones you'd want a second pair of eyes on anyway.
Should the model know which tools it's allowed to use?
Yes, show it only the tools it has been granted. It reduces wasted calls and confusing errors. Just don't rely on that as the security control. The server check is the control.
What about permissions that depend on the request, like "refunds under $50"?
Grants answer "may this agent ever do this". Limits on specific values belong in validation rules on the action or on shared state, covered in part 7, and big ones can go to a human approval step.
Where do these records show up?
In DNotifier, in Traces, next to the run they belong to. Elsewhere, anywhere your team actually looks. A denial log nobody reads is the same as no log.



