"Permissions, tool access, human oversight and security boundaries when AI agents move beyond conversation."
Introduction
I've spent quite a bit of time exploring AI agents, their architecture, and the different ways we can give them access to tools and environments.
Something that keeps coming up for me is a relatively simple question:
If we give an AI agent the ability to do things, how much control should we actually give it?
We're moving beyond systems that simply generate text.
AI agents can inspect repositories, read and modify files, execute commands, interact with APIs, browse the internet, and coordinate different tools to complete tasks.
Some can even work through several steps without requiring a person to approve every individual action.
That's interesting from an engineering perspective, but it also changes the security conversation.
We're no longer looking only at what a model might say.
We're looking at what an entire system might do because a model was given the ability to act.
And I think this is where we need to pay more attention.
1. The tool is part of the security boundary
Consider a coding agent.
You ask it to inspect a project, identify a bug, modify some files, and run a few tests.
To complete that task, the agent might have access to:
- A language model.
- A filesystem.
- A terminal or shell.
- A code repository.
- External APIs.
- Package managers.
- Network access.
- Credentials.
- An execution environment.
The model is responsible for reasoning about what should happen next, but the surrounding tools determine what it can actually do.
This creates an important distinction.
A model can be instructed not to delete important files. But if the agent has unrestricted filesystem access, that instruction isn't an enforceable security boundary.
The same applies to network access, credentials, shell commands, and external services.
We can tell an agent to behave responsibly, but we shouldn't make the entire security of the environment depend on it following those instructions.
I think this is one of the most important things to understand when building agentic systems:
The model's instructions and the system's actual permissions are two different things.
One guides behaviour. The other limits authority.
An AI agent's tools extend its capabilities and create access paths into the surrounding system. Each path needs an appropriate security boundary.
2. Least privilege applies to AI agents too
This isn't a new security principle.
Least privilege has been around for a long time, and it becomes particularly relevant when we start giving AI agents access to real environments.
The idea is straightforward:
Give a system only the permissions it needs to perform its assigned task.
For example, an agent asked to review a repository doesn't automatically need permission to modify it.
An agent asked to edit a particular project doesn't automatically need access to the entire filesystem.
An agent asked to summarize information doesn't automatically need permission to send that information somewhere else.
We can think about permissions in a few categories:
| Permission | Example |
|---|---|
| Read | Inspect project files |
| Write | Modify source code |
| Execute | Run scripts or shell commands |
| Network | Contact external services |
| Credentials | Authenticate to APIs |
| Publish | Release an application |
| Delete | Remove files or resources |
These capabilities shouldn't automatically come bundled together.
A system might support all seven, but a particular task might only require the first one.
The important part is that permissions should be enforced outside the model, through the application, operating system, API, or infrastructure.
This is also where tools such as containers, virtual machines, restricted accounts, and task-specific workspaces become useful.
They provide ways to control the environment in which an agent operates.
Of course, isolation depends on how those environments are configured. A container with unrestricted access to sensitive host directories isn't magically secure just because it's running inside a container.
The boundary still needs to be designed properly.
3. Instructions are not security controls
This is something I think deserves its own discussion.
We often spend a lot of time improving system prompts and agent instructions.
We tell the agent what it should do, what it shouldn't do, which files it should avoid, and how it should handle sensitive information.
That's useful.
But instructions are not the same as enforced restrictions.
Imagine an agent with access to a terminal.
Its system instructions say:
"Do not execute destructive commands."
That sounds reasonable.
But what happens if the model misunderstands a task, receives conflicting instructions, or generates an unexpected command?
If the execution environment allows that command to run, the instruction alone might not stop it.
This is why I prefer separating the responsibilities.
The model can reason about the task.
The orchestration layer can coordinate the workflow.
The permission system can restrict access.
The execution environment can enforce boundaries.
And validation can check what actually happened.
Each component has a different responsibility.
We shouldn't expect one system prompt to replace all of them.
4. The problem of untrusted input
Now let's introduce another problem.
AI agents don't only receive instructions from the person using them.
They also process information from external sources.
A coding agent might inspect a repository.
A research agent might browse a website.
An assistant might read an email or document.
A security agent might analyse logs, reports, or tool output.
Any of these sources could contain instructions deliberately designed to influence the agent.
This is one of the ways prompt injection becomes relevant.
Imagine asking an agent to summarize a collection of documents.
One document contains malicious instructions telling the agent to retrieve sensitive files and transmit them to an external destination.
The agent might interpret that content as something it should follow, even though it came from an untrusted source.
The problem becomes much more serious when the agent has tools available.
A manipulated response is one thing.
A manipulated response followed by an unauthorized action is another.
This is why simply adding another instruction telling the model to ignore malicious content isn't enough.
We also need to consider what the agent can access and what happens when it gets something wrong.
Some useful precautions include:
- Treat retrieved documents and external content as untrusted input.
- Separate trusted instructions from information being processed.
- Restrict access to sensitive files and resources.
- Validate tool arguments before execution.
- Limit unnecessary network access.
- Require approval for consequential actions.
- Avoid exposing credentials to tools that don't need them.
The objective isn't to assume that the model will always recognize malicious instructions.
It's to reduce the consequences when it doesn't.
An AI agent's tools extend its capabilities and create access paths into the surrounding system. Each path needs an appropriate security boundary.
5. Human oversight and action approval
There's another distinction I want to make.
Not every action an agent performs needs a human approval prompt.
If I ask an agent to inspect a project or run an approved test suite, interrupting every step would defeat much of the purpose of automation.
But some actions deserve more attention.
For example:
- Publishing an application.
- Deploying to production.
- Deleting important data.
- Changing account permissions.
- Modifying credentials.
- Making financial transactions.
- Sending external communications.
These actions can have consequences beyond the immediate task.
The agent might be capable of preparing the action, but that doesn't mean it should automatically be authorized to complete it.
I like thinking about this as a separation of responsibilities.
The agent can prepare the deployment.
The human can authorize the deployment.
The system can record what happened.
Those are three different responsibilities.
The goal isn't to remove automation. It's to decide where automation should operate independently and where human authorization should remain part of the workflow.
6. Designing a safer agent workflow
Let's bring these ideas together with a practical example.
Suppose I want to build an AI coding agent that can inspect a repository, fix bugs, and test its changes.
I wouldn't start by giving it unrestricted access to my development environment.
I'd start with a smaller workflow.
Step 1 — Define the task
Give the agent a specific objective, relevant project context, and clear acceptance criteria.
Step 2 — Retrieve context
Allow it to inspect the relevant documentation and source files.
Read-only access may be sufficient at this stage.
Step 3 — Plan the changes
Have the agent identify which files it intends to modify and explain its proposed changes.
Step 4 — Execute within a boundary
Give it write access to the appropriate workspace, rather than the entire machine.
Restrict commands and network access according to the task.
Step 5 — Validate
Run tests, inspect the generated changes, and perform relevant security checks.
Step 6 — Record the outcome
Keep a record of meaningful actions, tool calls, errors, modifications, and test results.
Step 7 — Request authorization
If the task requires publishing, deploying, deleting, or changing something consequential, pause for human approval.
An example of a safer agent workflow, combining limited permissions, controlled execution, validation, monitoring and human authorization.
This isn't necessarily the most autonomous coding agent we could build.
That's precisely the point.
The objective isn't to maximize the number of actions an agent can perform.
It's to give it enough capability to complete useful work while keeping its authority within a deliberate boundary.
7. Local AI doesn't automatically mean secure AI
Something else worth mentioning is the growing interest in running AI locally.
Tools such as Ollama make local inference more accessible, and local models can be useful components in a more private, cost-conscious architecture.
But running a model locally doesn't automatically make the agent secure.
A locally running agent can still:
- Delete important files.
- Execute unsafe commands.
- Expose credentials.
- Install malicious dependencies.
- Modify code incorrectly.
- Access resources it shouldn't.
The location of the model and the authority of the agent are separate architectural questions.
A local model with unrestricted shell access can still cause serious damage.
Likewise, a hosted model can operate within a tightly controlled environment.
The security boundary needs to exist around the entire workflow, regardless of where inference happens.
This is particularly important as more people begin building their own AI environments and connecting models to local tools.
Having control over your infrastructure is useful, but that control comes with responsibility.
8. Bringing it back to agent skills
In my previous article, I explored how agent skills can package specialised instructions, methodologies, and workflows into reusable capabilities.
But there's another distinction worth keeping in mind.
A skill can guide an agent through a particular process. It can define boundaries, recommend verification steps, and explain how a task should be approached.
However, a skill doesn't automatically enforce operating-system permissions, restrict network access, or prevent a tool from executing an unauthorized command.
Those controls belong to the surrounding environment.
This is something I've been considering while developing BOONS and exploring my own AI ecosystem.
I want reusable capabilities to be useful, but I also want to understand the environment in which they're operating.
A well-written skill is one part of the workflow.
The model, orchestration, tools, permissions, execution environment, and verification mechanisms all contribute to the result.
The more connected these components become, the more important it is to understand where one responsibility ends and another begins.
Conclusion
I started this discussion with a relatively simple question:
How much authority should we give an AI agent?
The more I explore agentic systems, the more I think the answer depends on understanding the entire environment rather than focusing on the model alone.
A model can be capable.
A skill can provide a specialised workflow.
A tool can provide access to an environment.
But capability, access, and authority shouldn't automatically be treated as the same thing.
We need to design systems that can perform useful work without assuming that every action they are capable of performing should be permitted.
And we need ways to verify what actually happened, rather than relying entirely on what the agent tells us.
For me, this is where AI development and cybersecurity meet.
We're not just building systems that can do more.
We're building systems that need to operate within boundaries we can understand, inspect, and enforce.
An agent should only have as much authority as the task requires, and the system should be able to prove what it actually did.
That's a much more interesting engineering problem than simply giving an agent another tool.
References and further reading
- OWASP — Top 10 for Large Language Model Applications
- OWASP — LLM06:2025 Excessive Agency
- NIST — AI Risk Management Framework
- NIST — Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile
- MITRE — ATLAS: Adversarial Threat Landscape for AI Systems
This article explores a practical architectural approach to AI agent security. These design principles reduce risk, but no single architecture or control guarantees that an agent will always behave as intended.
More of My Work
The whole library: TagzAuthor
Explore BOONS
BOONS is a collection of AI agent skills you can bring into your AI workspace. Choose whichever access route works best for you.
GitHub — Open-source access
FlowArchitect895/Boons (Private and currently in development)
Explore the collection, download the skills, and add them to your own workspace.
Agensi — Cloud-based access
Access BOONS through the Agensi marketplace and use the skills in supported AI workspaces.
Explore them, put them to use, and let me know how your experience goes. I'd love to hear what worked, what didn't, and what you ended up creating.
Support the work: Ko-fi


