· Security

Where I draw the line on what an agent can touch

The rules I use when giving a software agent access: what it may read, which writes it may make by itself, which actions wait for a person, and how to stop it when it is not responding.

I give an agent read access fairly freely. I give it write access where I can undo what it does. Anything destructive waits for a person to approve that specific action. And the switch that stops the agent has to work when the agent itself is not responding.

In April I wrote about giving every agent its own identity. An identity tells you who did something. These rules cover what that identity is allowed to do, and I apply them the same way whether the agent is doing a small chore for me or working on something that matters to other people.

The OWASP project has a name for the risk. Its list of risks for language model applications calls it Excessive Agency and defines it as the vulnerability that lets "damaging actions" be performed "in response to unexpected, ambiguous or manipulated outputs from an LLM." It gives three root causes: excessive functionality, excessive permissions and excessive autonomy. Put plainly, the agent has too many tools, the tools have too much access, or too much happens without a person looking.

Access rules for an agent, by type of action
ReadingGranted fairly freely. Secrets stay out of reach.
Writes I can undoAllowed without a person, such as creating a draft.
Writes I cannot undoEach one waits for a person to approve that specific action.
The stop switchSits outside the agent and works when the agent is not responding.

Approvals are enforced in the tool or the credential, outside the model.

Reading

Read access is the cheapest thing to grant, and I still attach two conditions.

First, secrets stay out of reach. Credentials, keys and configuration files that hold tokens are not something an agent needs in order to summarize a mailbox. Whatever an agent can read can turn up in its output.

Second, I treat everything the agent reads as untrusted input. An email, a web page or a shared document can contain text written to steer the agent, and the agent may follow it. So reading is only as safe as what the agent is able to do next. An agent that can read private data and also send a message somewhere has a way to move that data, and it reads other people's text all day.

Writes I can undo

For any write, I ask whether I can put it back, how long that would take, and whether I would know it needed putting back.

Many useful actions pass easily. Applying a label to a message. Creating a draft. Opening a change request for someone to review. Moving a file to a holding folder. Stopping a service that can be started again.

Each has a twin that does not pass. Sending the message. Merging and deploying the change. Deleting the file. Destroying the volume under the service.

So I build the tools around the reversible twin and leave the other one out. The agent gets a "create draft" tool and has no "send" tool. It can propose a change and cannot merge one. It can move things to a holding area and cannot empty it. This takes more thought when you build the tool and much less afterward, because the question of whether the agent will misuse a capability goes away when the capability is not there. OWASP's guidance says the same: limit what an agent can call "to only the minimum necessary."

An agent that prepares and a person who commits covers more real work than you might expect. Most of the time saved is in the preparing.

Writes I cannot undo

Some actions have no reversible form. A message that leaves the organization. A payment. A deletion with no backup behind it. A schema change on live data. Anything that lands in front of another person.

Each of these waits for a human, and the approval has to show the specific action: the recipients and the text, or the rows that will change. An approval that says "the agent wants to send email, allow?" approves nothing in particular. OWASP words the control as "human-in-the-loop control to require a human to approve high-impact actions before they are taken."

Two conditions make an approval worth having.

It has to be enforced outside the model. If the only thing standing between the agent and a deletion is a sentence in its prompt saying never to delete, then nothing is standing there. A prompt is a request, and text the agent reads later can talk it out of a request. The check belongs in the tool or in the credential, where the action fails without a recorded approval no matter what the model has decided.

And the list has to stay short. A person who is asked to approve fifty things a day stops reading them, and after that the approval step protects nothing. The way to keep the list short is the previous section: move everything you can into the reversible column, so that the approvals left over are few enough to read.

Limits on volume

A reversible action repeated ten thousand times is no longer easy to reverse. So every agent gets ceilings, such as a maximum number of actions per run and a spending limit per month.

Anthropic's engineering guidance on building agents makes the general point: "The autonomous nature of agents means higher costs, and the potential for compounding errors." It adds that it is common to include stopping conditions "to maintain control." A ceiling sets how large a mistake can get before something stops it.

The stop switch

The requirement sounds simple and rules out more designs than it seems to. The stop has to work when the agent is hung, crashed or doing the wrong thing with great confidence.

That means the stop cannot be a message you send to the agent, because an agent that is misbehaving is the one you least trust to act on it. It should not live in the agent's own process, and preferably not on the agent's own host.

The stops I trust sit at the far end. Revoke the agent's credential at the systems it touches, which is one more reason for it to have an identity of its own. Or have the tool layer check a flag before every action, with the flag stored somewhere the agent cannot write. Or cut its network path.

There is a second half that gets forgotten. If the agent can create things that persist, such as scheduled jobs or forwarding rules, stopping the agent leaves those in place. You need a way to list and remove what it created that does not go through the agent. I wrote in May about building the way back in before you lock something down. This is the same idea pointed at your own automation.

Test the switch with the agent process killed. If the test needs the agent to be running, you do not have a switch yet.

What the model does not decide

The model chooses among the actions it is allowed, and the list of what is allowed is set somewhere else. Permission checks, approval requirements and ceilings live in ordinary code with fixed rules. The model can recommend an action and explain why. Code decides whether that kind of action runs without a person.

I hold to this because text the agent reads can change what a model does with its prompt, and it has no effect on a permission check.

Who answers for it

The person who grants the access owns the outcome. The owner of each system decides what an agent may do there, and "whatever the requesting user can do" is too generous a default. Every action goes to a log the agent cannot edit, so that when something does go wrong, the record is intact.

One caveat. These lines cost speed, and at first they will feel like too much. Start narrow and widen on evidence. If a class of proposal has been approved without changes for weeks, that is a fair case for letting it run unattended, with its ceiling left in place.

For an agent you already run, the exercise is short. Write three columns: what it can read, what it can write and undo, and what needs a person. Move anything that is in the wrong column. Then kill the process and try the stop.

Views are my own.