Module 8 · Lesson 6 · 15 min read
Autonomy risks and their controls
Autonomy Risks and Controls
Introduction
Every additional degree of autonomy widens the risk surface. In this lesson we map the main risks of autonomous agents, build control layers that complement one another, and write a guard that enforces permissions, the budget and a kill switch outside the agent's logic.
Learning objectives
- Identify the main risks of autonomous agents and why they grow with autonomy
- Apply the control layers: least privilege, budgets, a kill switch, isolation, approval and logs
- Distinguish between controls enforced in code and instructions written for the model
- Link risk management to the functions of the NIST AI RMF framework
The more autonomy, the larger the risk surface
An autonomous agent makes decisions and executes them without waiting, and this is the source of both its strength and its danger. A small mistake in a suggesting assistant is corrected by the human before it happens, but the same mistake in an agent that executes on its own may be repeated dozens of times before anyone notices. So we must think about the risks before raising autonomy, not after the first incident.
Map of the main risks
| Risk | Example | Why does it grow with autonomy? |
|---|---|---|
| Goal misspecification | "Reduce complaints", so the agent closes tickets without resolving them | The agent optimizes what was literally asked, not what was meant |
| Error compounding | A mistake in step 2 is built on in every step after it | There is no human reviewing between steps |
| Runaway loops and cost | Endless retries that consume the credit | Nobody presses "Stop" |
| Excessive permissions | A reading agent that has delete permission | Any mistake or attack exploits all the permissions |
| Indirect injection | Malicious instructions inside an email or a page | The agent reads untrusted content and executes on its own |
| Data leakage | Sending a student's information to the wrong party | Sending is an irreversible action |
| Unclear accountability | Nobody knows why the decision was made | Absence of logs and explanation |
The OWASP list of the top risks for large language model applications includes the risks of injection (Prompt Injection) and excessive agency, and the latter describes exactly an agent that has more functions, permissions or autonomy than its task needs.
Control layers
No single control is enough; instead there are layers that complement one another, so that if one layer fails another stops the damage:
- Least privilege: give every tool the narrowest permission that suffices, and separate reading tools from writing tools.
- Budgets and rate limits: a limit on steps, time, cost and the number of actions per hour.
- Kill switch: an external signal that the agent checks in every cycle and that stops it immediately.
- Isolated environment (Sandbox): running code and browsing in an environment that cannot reach sensitive systems.
- Human approval: for irreversible actions, as in the previous lesson.
- Audit log and monitoring: recording every decision and its reason, with alerts on unusual behavior.
For risk management at the organization level, the NIST AI Risk Management Framework (AI RMF) offers four functions: Govern, Map, Measure and Manage. These functions remind you that safety is not only code, but policies, responsibilities and continuous measurement.
Practical example: a guard for a log-cleanup agent
The scenario: an agent in the computer center archives old login logs. A mistake in the date condition could make it try to archive everything. We wrap its tools in a guard that enforces permissions, the budget and the kill switch and logs every attempt:
# A guard for an autonomous agent: permissions + budget + kill switch + log - standard Python
class Guard:
def __init__(self, allowed_tools, max_actions):
self.allowed = set(allowed_tools)
self.max_actions = max_actions
self.actions = 0
self.kill_switch = False
self.log = []
def call(self, tool, target):
if self.kill_switch:
self.log.append(("blocked", tool, target, "kill switch is on"))
return False
if tool not in self.allowed:
self.log.append(("denied", tool, target, "tool not allowed"))
return False
if self.actions >= self.max_actions:
self.kill_switch = True # exceeding the budget stops everything
self.log.append(("stopped", tool, target, "action limit exceeded"))
return False
self.actions += 1
self.log.append(("ok", tool, target, ""))
return True
guard = Guard(allowed_tools={"archive_log"}, max_actions=3)
# The agent tries to delete a log, then because of a bug in the date condition tries to archive all the logs
guard.call("delete_log", "log-day-1")
for day in range(1, 7):
guard.call("archive_log", f"log-day-{day}")
for entry in guard.log:
print(entry)The result: the delete attempt is blocked because it is not among the allowed tools, then only three archive operations go through, and when the limit is exceeded the kill switch is turned on so all following attempts are blocked, and all of this is logged for review. Notice that the guard is outside the agent's logic; even if the agent makes a mistake or is tricked, it cannot exceed the limits.
Summary
Autonomy amplifies risks: goal misspecification, error compounding, runaway loops, excessive permissions, indirect injection, data leakage and unclear accountability. Protection comes from layers: least privilege, budgets, a kill switch checked in every cycle, an isolated environment, human approval and an audit log. Real controls are enforced in code outside the model, not in instructions alone. And the NIST AI RMF framework helps manage risks at the organization level.
Terms
| Term | English | Definition |
|---|---|---|
| Excessive permissions | Excessive Agency | The agent having functions, permissions or autonomy beyond what its task needs |
| Least privilege | Least Privilege | Granting every component the narrowest permission that suffices for its work |
| Kill switch | Kill Switch | An external signal that stops the agent immediately |
| Guard | Guard | A code layer that enforces constraints on tool calls |
| Error compounding | Error Compounding | Building later steps on an earlier mistake so that its effect grows |
| AI Risk Management Framework | AI RMF | A NIST framework with the functions Govern, Map, Measure and Manage |
Review questions
- Why is the risk of error compounding worse in an autonomous agent than in a suggesting assistant?
- What is meant by excessive permissions, and how does the principle of least privilege address it?
- Why must the kill switch be checked in every cycle and not just once?
- Why are instructions written for the model not enough as a security control?
References
- OWASP Top 10 for LLM Applications owasp.org Reviewed on 2026-11-18
- NIST AI Risk Management Framework www.nist.gov Reviewed on 2026-11-18
- Indirect prompt injection (Greshake et al., 2023) arxiv.org Reviewed on 2026-11-18
