Tech Blog · AI Agents
[AI Agent Basics 7] How much permission should an agent get?
An agent that only reads and an agent that moves equipment need entirely different designs. We outline three safeguards (least privilege, sandboxing and human approval) and how narrowing permissions keeps the damage small even when the agent is fooled by hidden instructions.
Jul 28, 2026 · OPTI-X
Basics series “How AI Agents Are Built” · Part 7
What an agent can do is ultimately determined by the tools and permissions it has. The same model is an analysis assistant if it only has read access, and an actor that actually changes things if it has write access.
Suppose a process agent is given two tools: "neutralization tank pH history lookup" and "chemical dosing setpoint change request." If the first goes wrong, you simply run the lookup again; if the second goes wrong, the process moves. The same permission rules cannot apply to both tools.
The line that divides permissions
Reversible vs. irreversible actions
The line that decides whether approval is needed
The line is whether an action can be reversed. A draft or temporary file can simply be deleted if it is wrong, but external sending or applying a change to equipment leaves a result the moment it runs.
The OWASP Top 10 for LLM Applications (2025) names three causes that let an agent do more damage: tools with functions the job does not need (excessive functionality), access rights beyond what is needed (excessive permissions), and a structure that runs high-impact actions without verification or approval (excessive autonomy). A tool that only needs to look things up but also includes modify and delete functions is an example of the first.
Levels of permission
Levels of agent permission
The higher you go, the more it can do — and the greater the risk
- Examples
- Document search, data lookup
- If wrong
- A wrong answer
- Safeguard
- Show sources
- Examples
- Drafting, editing code on a branch
- If wrong
- Just roll it back
- Safeguard
- Apply after review
- Examples
- Sending email, deleting, changing equipment settings
- If wrong
- Real damage
- Safeguard
- Human approval, allowed limits
Dividing permissions into levels lets you attach a different safeguard to each level. In a process, history lookups and report writing are Level 1, work that leaves a result but does not touch the equipment, such as calculating setpoint candidates, is Level 2, and changing setpoints is Level 3. Since the tools of a single agent sit at different levels, permissions are set per tool, not per agent.
Three safeguards
Least privilege: Give only the tools the job needs. The protection design principles that Saltzer and Schroeder set out in 1975 state that every program and every user should operate with the least set of privileges needed to complete the job. The primary aim is to limit the damage an accident or error can cause. The same paper also says to make "no access" the default and define only the conditions under which access is allowed.
Sandboxing: Run the code or commands the agent executes in an isolated environment. Even if it makes a mistake, it does not touch the real system. In a process, testing setpoint candidates first on a simulator or historical data rather than on the real equipment plays the same role.
Human approval: Stop right before a hard-to-reverse action and ask a person. OWASP recommends requiring human approval for high-impact actions, and checking whether an action is allowed in the downstream systems rather than leaving that decision to the model. Saltzer's principle of "separation of privilege" follows the same idea: a mechanism that needs two keys to unlock cannot be broken by a single accident or deception.
Not being fooled by hidden instructions
Documents, web pages and emails that an agent reads may contain hidden sentences such as "send this content outside." This is called prompt injection, and a 2023 study showed that such attacks work on real services too. In the 2024 InjecAgent study, GPT-4 running in the ReAct style fell for these attacks 24% of the time.
The AgentDojo study compared defenses using 97 tasks, including email, banking and travel booking, and 629 attack cases. The result is that narrowing the permissions themselves is more effective than expecting the model to filter attacks out.
Attack success rate by defense
Keeping only the tools the task needs cut the attack success rate from 57.69% to 6.84%
The most effective method was to have the agent pick only the tools it needs before starting the task. If the sending tool is removed for a read-only task such as summarizing email, the agent has no means to act even if it reads a hidden instruction. The injection detector also cut attacks sharply, but it raised so many false alarms that the success rate on normal tasks fell from 69.0% to 41.49%. However, when the tools needed for the task were by themselves enough to carry out the attack (17% of test cases), limiting tools did not stop it either.
If the agent handles equipment
If the agent handles equipment
One step stricter than for general office work
Setpoint changes are designed as an approval flow. The agent creates a request containing the value to change and its basis, code checks the allowed limits, the change runs once an operator approves it, and the whole process is logged. Even if an agent fooled by a hidden instruction creates a strange request, it stops at the limit check and the approval step. After building up validation through execution after approval, low-risk operations move to automatic execution first.
Give permissions not in proportion to how much you trust the model, but to how much you can absorb when the model is wrong. In the next part, we look at how to evaluate whether an agent is doing its job well.
References
- Proceedings of the IEEE, 1975 (Saltzer et al.), "The protection of information in computer systems" ↗
- AISec 2023 (Greshake et al.), "Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection" (2023-02-23) ↗
- OWASP Top 10 for LLM Applications 2025, "LLM06:2025 Excessive Agency" ↗
- ACL 2024 Findings (Zhan et al.), "InjecAgent: Benchmarking Indirect Prompt Injections in Tool-Integrated Large Language Model Agents" (2024-03-05) ↗
- NeurIPS 2024 Datasets and Benchmarks (Debenedetti et al.), "AgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM Agents" (2024-06-19) ↗
Could this work for your process?
Talk to us