Insights · AI Automation
Guardrails for AI agents: how to let them act without losing control
AI agent guardrails are the limits, approval points and records that let an agent act in your systems without you losing control. In practice: use a fixed workflow where you can, give the agent the least access that works, keep a person on any step that commits money or customers, treat what it reads as untrusted, and log every run.
By Manish Sharma, Founder of AXVU · · 3 min read
First, check whether you need an agent at all
Anthropic's engineering guide on building agents draws a useful line between workflows, where a model follows steps you have defined in code, and agents, where the model directs its own process and chooses which tools to use. Its advice is to start with the simplest approach that works and add autonomy only when it clearly improves results.
Many business processes are better served by a workflow: the same steps every time, with a model handling the parts that involve reading or writing language. A workflow is easier to test, cheaper to run and easier to explain when something goes wrong. Reach for an agent when the steps genuinely can't be fixed in advance, such as researching an open question or resolving a request that could go several ways.
Give the agent the least access that does the job
OWASP's Top 10 for Large Language Model Applications lists excessive agency as one of the main risks: an agent with more tools, permissions or autonomy than its task needs can cause damage when it misreads an instruction or is manipulated. The fix is the same principle security teams apply to people.
- Tools: connect only the tools the task requires, and remove any that are there just in case.
- Permissions: read-only wherever reading is enough; write access scoped to specific records, not a whole system.
- Accounts: run the agent under its own service account, so its actions are traceable and can be switched off without affecting anyone else.
- Limits: cap how much it can spend, send or change in a single run and in a day.
Put people at the points of commitment
Let the agent prepare and propose, and keep a person on the step that commits. Payments, refunds, contract terms, messages to many customers at once and changes that can't be undone should wait for a named person to approve them, with the agent's reasoning and the data it used shown alongside.
Approvals only work if they're quick to give. If reviewers face a wall of text for every decision, they start approving without reading. Show the proposed action, what changes and what the agent was unsure about, in a form someone can check in under a minute.
Treat everything the agent reads as untrusted
Prompt injection, ranked first in the OWASP list, happens when instructions hidden in content the agent reads, such as an email, a web page or a document, steer it into doing something it shouldn't. An agent that reads customer emails and can also issue refunds is an obvious target.
No single filter removes this risk, so design for it: keep reading and acting separate where you can, never let content from outside your business grant new permissions, and require approval for sensitive actions however the request arrived.
Log every run and watch for drift
Record what the agent was asked, which tools it called, with what inputs, and what it changed. Without that trail you can't investigate a complaint, show what happened or improve the agent.
Then monitor it like any other system. Track how often runs fail, how often people reject its proposals and how its costs move over time. Models, prompts, tools and data all change, and an agent that worked well in its first month can drift quietly afterwards.
Use a framework for the wider governance
For organisations that need a structure around all of this, the NIST AI Risk Management Framework is a free, voluntary reference built on four functions: govern, map, measure and manage. It helps you decide who owns each AI system, what could go wrong, how you'll measure it and what you'll do when it does. A small business doesn't need to adopt it wholesale, but its questions make a good checklist before an agent goes live.
Sources
- Building effective agents, Anthropic
- OWASP Top 10 for LLM Applications 2025, OWASP GenAI Security Project
- AI Risk Management Framework (AI RMF 1.0), NIST