Letting an AI agent act for you, safely
An AI agent is a model that can take actions, not just write answers. Given a goal, it plans steps, uses tools (running commands, editing files, browsing websites, sending messages, calling other services), looks at the results and decides what to do next, often many times in a row without asking you.
That is what makes agents useful, and it is also the risk. When a chatbot misunderstands you, you get a wrong answer. When an agent misunderstands you, it acts on the misunderstanding. The safeguards are the ones you would use for a new assistant on their first day: limited access, approval before anything important, a record of what was done, and a way to undo it.
What can go wrong
- It misreads the goal. "Clean up my inbox" could mean archiving newsletters, or deleting everything older than a month.
- It acts on a wrong assumption. It decides a file is unused and removes it, or picks the wrong customer because two names are similar.
- It follows instructions hidden in what it reads. A web page, an email or a document can contain text written to look like instructions to the agent. This is called prompt injection, and no model is fully immune to it.
- It has more access than the task needs, so a small mistake can reach things that should have been out of bounds.
- It loops. It retries a failing step again and again, using up time and money.
- It does something that cannot be undone: deleting, sending, paying or publishing.
Principle 1: give it the least access that works
Start from nothing, and add only what the task needs.
- Give it a dedicated working folder, not your whole drive.
- Use read-only access wherever reading is enough.
- Create separate, limited accounts or API keys for it, which you can revoke without affecting your own.
- Keep it away from your password manager, your payment details and your personal email, unless the task truly needs them.
- For risky work, run it in a sandbox: a virtual machine, a container or a spare computer.
Principle 2: review before it acts
Most agent tools let you choose which actions need your approval. A sensible policy to start with:
| Action | Risk | Rule |
|---|---|---|
| Read files in its working folder | Low | Allow |
| Edit files that are under version control | Medium | Allow, then review the changes |
| Run commands | Medium to high | Approve each one, or allow a short list you trust |
| Browse the web | Medium | Allow, but treat what it reads as untrusted |
| Send email or messages, or post in public | High | Always approve |
| Spend money | High | Always approve, with a spending limit |
| Delete or overwrite anything outside its folder | High | Block |
Ask for a plan before it starts. Reading a ten-line plan takes a minute, and catches most misunderstandings before anything happens. Where you can, have it prepare rather than do: a draft email for you to send, a list of proposed changes, or a dry run that reports what it would have done.
Principle 3: set limits
- A maximum number of steps and retries.
- A time limit.
- A spending cap on any paid service it uses, set with that service itself, not only in the agent.
- A rate limit on anything that sends messages.
Limits turn a runaway loop into a stopped task and a small bill.
Principle 4: keep a record
Every action the agent takes should be logged: what it did, with which tool, and what came back. Read the log after each task while you are building trust. It shows what the agent actually did, which is not always what its summary says it did.
Principle 5: make undo possible
Before an agent touches anything, make sure you can put it back.
- Keep files under version control, and commit before each task.
- Back up anything that is not under version control, and check that the backup really restores.
- Prefer moving things to a trash or archive folder over deleting them.
- Try it on a test copy before you let it near live systems or customer data.
Handling prompt injection
You cannot stop an agent from reading hostile text, so limit what that text could make it do. Above all, an agent that reads untrusted content (web pages, incoming email, uploaded files) should not also be able to send your data anywhere without your approval.
Be suspicious if an agent suddenly asks for passwords, wants to visit sites unrelated to the task, or proposes actions you never mentioned. Stop it, read the log, and find out what it read just before.
Your first agent task, step by step
- Choose a task that is low-risk and easy to reverse, such as sorting files or drafting replies for you to review.
- Write down the goal, the limits, and what "done" looks like.
- Set up the folder, the accounts and the permissions it needs, and nothing more.
- Ask for a plan, and edit it until it matches what you want.
- Run the task with approvals switched on.
- Review the result and the log.
- Loosen only the permissions that have proved safe, one at a time.
A worked example
You want an agent to tidy a downloads folder that holds several hundred files. You give it access to that folder only, and ask for a plan. It proposes sorting the files into subfolders by type, moving rather than deleting, and writing every move into a text file.
You add one rule: anything it cannot classify goes into a folder called "Check", untouched. You approve the plan and the first batch of moves, look at the result, then let it finish. Because every move is listed, any of them can be reversed.
When to stop it
Stop the agent and take over if it repeats the same failing action, works outside the scope you gave it, asks for credentials it should not need, or its costs climb faster than you expected.
Related guides
Coding agents need these safeguards most, because they can change many files at once; coding with AI without breaking your project covers the habits that help. What you give an agent access to is also a privacy question; see keeping your data private when using AI. And when an agent reports its results, check them as you would any AI answer: how to check AI answers and their sources.
Where Noetic Suite fits
When Noetic Suite hands back a piece of work, it tells you plainly what was and was not done. In its desktop app, a coding session works on a folder on your computer, with a restore point that undoes a whole build in one click. See the features page and the download page.