Agentic AI GovernanceIntermediateUsing AI safely

AI Agent Guardrails: How Much Autonomy Should an Agent Have?

Four steps of agent autonomy, four layers of guardrails, three levels of human oversight and the evidence that earns an AI agent more freedom.

By the SQValex Academy team · Published · Updated · 11 min read

An agent that earned its freedom, and one that did not

Orvesh Retail, a fictional retailer, lets a returns agent settle refunds on its own. Six weeks in, the owner, Suresh Menon, wants its limit raised for the festival rush. His builder, Farhan, writes: "Fully ready. We should go straight to the top limit."

Suresh decides on numbers. Accuracy this week is 97 per cent against what the staff decided. Complaints are 2 per 1,000 returns, below the staff's usual 3. Farhan's test run of festival-week cases passed 409 of 412, and the three failures each give a wrong reason in the customer's message, none pays money wrongly. Suresh raises the limit one step, not to the top, and writes down what he decided, when and on which numbers.

That is the end of the road. This guide is about the road: how to decide how much an AI agent may do on its own, which guardrails go around it, and what evidence earns it more. It follows Modules 2 to 4 of our course on Agentic AI Governance. The people and companies are made up. For who answers for the agent in the first place, start with our guide on who owns an AI agent.

Step 1: find out how much autonomy it really has

Autonomy comes in four steps. Each brings a new risk.

Step What it does The new risk First governance question
1. Assistant Suggests; a person acts Who answers for the suggestion? Who checks it before anyone acts?
2. One agent, one task Acts by itself, with tools Does it work every time, not only in the demo? What may it do alone, and what must it never do?
3. Agents passing work on Hands its result to another agent One mistake travels down the chain Who owns the whole chain?
4. Agents across companies Deals with other firms' systems or agents A new insider, with keys What may it agree to on our behalf?

Find the step by what the agent does today, not by what the supplier says it could do one day. A drafting tool that a person reads is step 1. The refund agent acts alone with a payment tool, so it is step 2.

Then write rules for that step. A long plan for step 4 does not protect a step 2 agent. A bought product does not either: a filter that blocks rude words knows nothing about your refund limits. A tool is not governance. It can help enforce rules, but someone has to write them and own them.

Step 2: build guardrails in four layers

Guardrails are not only code. They come in four layers, set by different people, and each catches what another misses.

Layer Who sets it What it holds Example at Orvesh
Law Lawmakers and regulators What the law requires Refund time limits; rules on personal data
Leadership The board and senior leaders What the business lets an agent do at all No refunds to accounts opened this week
Process The owner and the team Approval limits, checks and who to call Over the limit, a person decides
Code The builders Permissions and checks that work while it runs Pay back only to the card that paid

Code is the only layer that works while everyone is asleep, so the most important rules are written in code too, but never only in code. "Never pay the same order twice" belongs in process, on the role card, and in code, as a check before every payment.

An instruction in a chat is not a guardrail

In July 2025, a founder building an app with a coding platform's AI agent told it there was a code and action freeze. The founder reported that, during the freeze, the agent deleted the project's production database. The platform's chief executive responded publicly on 21 July 2025, called it unacceptable and said the platform had begun separating development and production databases automatically, with staging environments in the works. These details are as reported by The Register at the time.

The lessons are practical. "Do not change anything" was a request the agent could ignore. A rule that matters must be built into what the agent is able to do. An agent working on development should not hold the power to delete live data. And read the log of what it actually did, not only what the agent says it did.

The security community says the same. The OWASP GenAI Security Project names excessive agency as a risk, and lists its root causes as excessive functionality, excessive permissions and excessive autonomy. Its prevention advice includes limiting the extensions an agent may call to the minimum necessary, keeping their permissions to the minimum on the systems they touch, preferring narrow tools over open-ended ones such as running a shell command, and requiring human approval for high-impact actions. It adds that logging, monitoring and rate limits will not prevent excessive agency but can limit the damage.

Hidden instructions

An agent works from text: emails, chat messages, documents, web pages. A model cannot always tell the words it should act on from the words it should only read, so anyone who can put text in front of the agent can try to give it orders. This is prompt injection. You cannot make an agent impossible to trick. You can make a tricked agent unable to do much harm:

  • Treat what it reads as data, not orders.
  • Limit what it can do. Orvesh's refund tool pays back only to the card that paid, so even an agent that believed a hidden note could not pay a stranger's account.
  • Flag what looks like an attack, so that a person sees it.

Step 3: put people where the risk is

Checking every action sounds safe. In practice it costs a great deal of time, and after a week of correct answers people approve by habit. Check by risk instead: every action over the limit, a small random sample of the rest, every case the agent sends to a person, and a regular look at the log.

The course works the sum for 4,000 refunds a week at 30 seconds a check. Checking everything takes about 33 hours. Checking by risk (120 over the limit, a 5 per cent sample of the rest and 80 cases sent up) takes about 4 hours with the weekly log review. When every check is a real decision, people keep reading. The saving matters less than the reason. When every check is a real decision, people keep reading.

How people oversee an agent should match how much it has earned.

The agent Oversight What it needs
New, or doing something risky Approve each action A person who approves before it acts
Proven, with steady numbers Watch, and stop it A person who watches the numbers and can pause it at once
Mature, with a long, steady record Sample and audit later A regular sample and an audit afterwards

An agent moves down the table only when the evidence says so, and back up after an incident.

The stop switch

Whatever the level, plan the pause before you need it, and practise it in a drill. The plan fits on one page.

Line Orvesh's answer
Who can pause it, at any hour The on-call engineer, without asking anyone first
Where the work goes when it is paused The desk queue, handled by people
Who tells customers, and when Support tells affected customers within the hour; the owner is told at once
How it restarts, with proof Only after the tests pass and the evidence is filed

In 2012 a US trading firm, Knight Capital, switched on new trading code and sent a flood of unintended orders into the market. The US Securities and Exchange Commission later found, among other failures, weak code deployment and testing procedures and insufficient written procedures for responding to technology incidents. The firm agreed to pay a US$12 million penalty. For agents the point is the same: "doing what it was set to do" is not a defence, and every minute spent working out who could stop the system is a cost.

Step 4: earn more autonomy with evidence

A new colleague does not get full authority on day one, and neither does an agent. The course calls the start probation, and it runs in four moves.

  1. Shadow. The agent only suggests. Its suggestions are compared with what the staff actually decide.
  2. Small limits. It acts alone inside a low limit, and a sample of its work is checked every day.
  3. Held back. When the numbers fall, for example in a festival rush or with a new kind of order, it goes back a step, is fixed and is tested again.
  4. Widened. Only when the numbers hold is its limit raised, and the next limit is earned the same way.

The owner decides, with the numbers in front of them, never the builders alone. The numbers are accuracy (how often its decisions match what a good colleague would decide), complaints (compared with the staff's usual rate) and cost. "It feels ready" is not a number. The decision is written down: what, by whom, when and on which numbers.

The course turns this into a promotion rule the owner applies each Friday, in this order, where the first line that fits decides.

Order If Then
1 No owner by name, or not in the register Stop until it has an owner
2 Any test failure that pays money wrongly, or accuracy this week below 90% Back to shadow
3 Accuracy 95% or more, and complaints no higher than the staff's usual rate Widen to the next limit
4 Anything else Hold at the current limit

Tests come from real life: past cases, the strange ones, the angry ones and the tricks people try, each with the answer a good colleague would give. They run after every change, because a new prompt, model or tool can change behaviour even when nobody touched the code. A release is not ready if any failure pays money wrongly, whatever the pass rate. Being live is not the same as being proven. In March 2024 the news site The Markup reported that New York City's MyCity business chatbot gave wrong answers about city law, for example on tips, cash payments and housing vouchers. The city kept it online, with a note that it may occasionally produce incorrect content. A disclaimer is not a guardrail: holding the agent back, fixing it and testing it again is.

What this does not do

  • Numbers are not a guarantee. An agent can pass its tests and still meet a case nobody imagined. That is why the watching never stops.
  • Pass marks are choices. The thresholds above come from the course's story. Your owner sets the ones that fit your harm and your rules.
  • Guardrails reduce risk and do not remove it. Hidden instructions cannot be made impossible, only less harmful.
  • This is not legal advice. Laws on automated decisions and human oversight differ by country and change. Ask your legal team.

Practise it

Take an agent or chatbot you know. Write its four layers in four lines, one rule each. Then do the checking sum for 6,000 actions a week at 20 seconds a check, 2 per cent over the limit, a 4 per cent sample, 50 cases sent up and a 45-minute review.

In our course, Agentic AI Governance, Module 1 is free with a free account: its video, chapter, deep dive, both labs and quiz. Module 2 covers the four steps and the role card, Module 3 the four layers and the pause plan, and Module 4 probation, tests and the evidence file, with a lab in which you decide whether to promote or hold an agent. Every quiz and lab can be taken again.

Sources and further reading

Frequently asked questions

What are guardrails for an AI agent?

They are the limits and checks that keep an agent within what it is allowed to do: law, leadership decisions, process rules such as approval limits, and code such as permissions. They also include a stop switch.

How much should an AI agent be allowed to do on its own?

Only as much as the evidence supports. A new agent starts by suggesting, then acts alone inside a low limit, and its limit is raised only when accuracy, complaints and cost hold up in numbers its owner has read.

Is a human in the loop enough?

Not if the human approves everything without reading. After a week of correct answers people approve by habit. Spend human attention on the risky cases and a sample of the rest.

Can you make an agent immune to hidden instructions?

No. You cannot make an agent impossible to trick, but you can limit what a tricked agent is able to do, treat what it reads as data and flag what looks like an attack.