In my article on shadow AI, I advised giving your staff an approved AI tool rather than banning AI. The next step comes quickly: letting that tool act, read your e-mail, write to the ERP, run commands, prepare payments. Before you hand tools to an AI agent, set up guardrails: nine simple rules that do not depend on the model you choose.
Key points
- An AI agent does not just answer: it acts, with the rights you give it. OWASP, the reference body for application security, lists this "excessive agency" among the ten major risks of AI applications.
- Prompt injection, meaning instructions hidden in an e-mail, a page or a PDF the agent reads, has no foolproof defence. OWASP and Anthropic say so in plain words.
- The useful question for a business owner: can this action be undone? A human approves everything that cannot.
- Nine guardrails are enough to start, and none requires costly tools.
AI agent guardrails: from answering to acting
An assistant that answers gets a page wrong; an agent that acts gets your books wrong. OWASP names this risk Excessive Agency in its 2025 Top 10 for large language model applications: a damaging action triggered by unexpected, ambiguous or manipulated model output. It gives three causes: too much functionality, too many permissions, too much autonomy. In the 2026 edition, announced in September, this risk moves up to third place. In December 2025, OWASP also published a Top 10 specific to agentic applications.
The danger does not only come from a model error. It also comes from what the agent reads. OWASP calls it "indirect injection" when the agent reads outside content, a website or a file, that contains instructions, and follows them. And it admits that it is unclear whether any foolproof prevention method exists. In November 2025, Anthropic published its measurements on a web-browsing agent: against an attacker trying a hundred variants, about 1% of attacks still succeed with its best protections. The vendor itself calls this a "meaningful risk".
Reversible or irreversible: the only question that matters
To decide what an agent may do on its own, ask one question: can you go back?
- ERP. A draft can be deleted; a posted invoice or a reconciled entry, much less so. The agent reads and prepares, a person approves. I cover this case in MCP server security.
- E-mail. Reading and drafting can be undone; sending never can. The agent prepares, you send.
- Server and shell. Listing files can be undone; deleting or reconfiguring, not always. Routine commands on a list, everything else on approval.
- Payments. A transfer that has left does not come back. The agent prepares the order, a human signs it in e-banking, always.
For high-risk AI systems, the EU AI Act requires that the person in charge of oversight can "interrupt the system through a 'stop' button" (Art. 14). An office agent does not normally fall into that category, but the principle is worth adopting.
The nine guardrails
- Least privilege. An account in the agent's name, limited to the tools and data of its task. What it must not do, it must not be able to do: authorisation is checked in the target software, not left to the model's judgement.
- Separate agents. The one that reads the web or e-mail has no ERP, no shell and no payments.
- Content treated as suspect. An e-mail, a PDF invoice or a web page can contain orders. No irreversible action should follow from outside content without human review.
- Dry run. The agent simulates, shows what would change, then rolls back. Failing that, it presents the exact list of planned changes.
- Backup before writing. A restorable copy before every batch of changes. And archive rather than delete: a move can be undone, a deletion cannot.
- Explicit human approval for the irreversible. Sending, paying, deleting, writing to an external system. Approval covers named items, not "tidy things up".
- Log. Every action leaves a trace: who, when, what, with what result.
- Spending cap. An agent stuck in a loop consumes without limit. OWASP calls it "unbounded consumption": caps, quotas and timeouts.
- Emergency stop. Know how to shut the agent down and revoke its access within minutes, and have tried it once.
Under the hood: for your IT person
The distinction that matters: a technical barrier versus a mere instruction given to the model.
- The system prompt is not access control. Denying a tool to an agent that keeps a shell does not stop it from calling the same API with curl. Claude Code's documentation spells it out: a deny rule matches the command as written; for real network blocking you need the sandbox.
- Isolation. A container or virtual machine for each agent exposed to outside content: read-only file system, network egress filtered by a domain allowlist, no secrets mounted.
- Identities. One API key per agent and per use, rights restricted on the server side: a limited ERP role, a narrowly scoped OAuth token, a mailbox account without send rights for the reading agent. Scripted revocation.
- Fail-closed approvals. No human answer means refusal. OpenAI recommends keeping tool approvals on, reads included, for any MCP tool.
- Separate data from instructions. Untrusted content goes in the user message, never in the system instructions, and structured outputs (JSON schema) link the steps, which closes a smuggling channel.
- A log out of the agent's reach. Centralised and append-only: the agent must not be able to erase its tracks. Alert on abnormal action volumes.
- Budget and kill switch. A spending cap per key at the provider, a maximum number of turns per task, a timeout, and a tested shutdown procedure (service stopped, keys revoked).
- Framework. To formalise it, the NIST AI RMF (govern, map, measure, manage) and its generative AI profile provide a recognised structure.
What I have learned
My house rules came from incidents, not theory: never write without a backup, nothing irreversible without explicit approval, archive rather than delete. During my ERP migration, a first synchronisation test deleted four events from my calendar.
For my bookkeeping run with an AI agent, nothing is written without a dry run and my approval: the agent drafts a plan, runs it dry, I review it, then it executes after a database backup. With my former OpenClaw assistant, I separated agents by trust level, and learned that denying the web tool to an agent that keeps a shell blocks nothing. Today, my server-based agents apply the same principles. Budget is part of security: see LLM API cost.
Where to start
1. List the actions
For each tool you want to hand to an agent, list what it could do there, and mark what cannot be undone.
2. Start with reading and drafts
For the first few weeks, the agent reads, summarises and prepares; you execute. You see where it goes wrong, at no risk.
3. Open one action at a time, with its guardrails
Dry run, backup, approval, log and cap for each new action. And test the emergency stop before you need it.
Frequently asked questions
Doesn't my AI provider already protect me?
It reduces the risk; it does not remove it: Anthropic still measures about 1% successful attacks in its browsing tests. The last line of defence remains the agent's rights.
Doesn't approving every action cancel out the time saved?
No, if you only approve the irreversible. The agent does the repetitive work on its own and presents a batch for you to approve in one go.
Are these guardrails mandatory?
The EU AI Act requires human oversight of high-risk systems. As soon as the agent processes personal data, data protection law applies, as I explain in Swiss data protection and AI.
Going further
I set up AI agents with these guardrails from day one, on infrastructure you control. The guides for my AI server detail the technical stack. To discuss your case: a 20-minute discovery call.
The step-by-step guides
To put these guardrails on a server you control, my guide no. 6 (CHF 39) describes agents with separate permissions, isolated containers for those that read external content, and approvals before any execution; my guide no. 3 (CHF 39) keeps keys and passwords in a vault and in encrypted files, so that no secret is left in plain text. Both are part of the Guides Pack (CHF 149), a complete stack, documented and tested in production.
Sources
- LLM06:2025 Excessive Agency, OWASP GenAI Security Project, accessed 15 November 2026
- LLM01:2025 Prompt Injection, OWASP GenAI Security Project, accessed 15 November 2026
- LLM10:2025 Unbounded Consumption, OWASP GenAI Security Project, accessed 15 November 2026
- OWASP GenAI Security Project Unveils 2026 Top 10 for LLM Applications, OWASP, 1 September 2026
- OWASP Top 10 for Agentic Applications for 2026, OWASP, 9 December 2025
- Mitigating the risk of prompt injections in browser use, Anthropic, 24 November 2025
- Safety in building agents, OpenAI, accessed 15 November 2026
- Claude Code: Security, Anthropic, accessed 15 November 2026
- AI Risk Management Framework (AI RMF 1.0) and Generative AI Profile (NIST AI 600-1), NIST, 26 January 2023 and 26 July 2024
- Regulation (EU) 2024/1689 on artificial intelligence (AI Act), Art. 14, European Union, 13 June 2024
Cover photo: Flygklubben / Wikimedia Commons, CC BY-SA 4.0 licence.
Tags: AI guardrails, AI agents, prompt injection, security, OWASP, AI Act, small business