Velamuvi AIAcademy

Lesson 1 of 6 · Safety

Risks of Autonomous Actions

Why AI agents raise the stakes of mistakes: real actions, speed, untrusted inputs and data leaks. Rate actions by reversibility and reach, with runnable Python.

  • 7 min read
  • Advanced
  • Reviewed
In this lesson you will learn
  • Explain why agents that act are riskier than models that only talk
  • Name the main risk categories for agents
  • Rate actions by reversibility, money, reach and exposure, and match them to controls
  • Recognise the lethal trifecta that makes data theft possible

From saying to doing

A chatbot that gets something wrong produces a wrong answer. A person reads it and, hopefully, notices. An agent that gets something wrong does something wrong: it sends the email, pays the invoice, deletes the folder. There may be no one reading before it happens.

Agents raise the stakes in four ways:

  • Real effects. Tool calls change systems, spend money and contact people.
  • Speed and scale. An agent can make a hundred mistakes in the time a person makes one, and repeat a bad pattern across thousands of users.
  • Chains of steps. An early mistake feeds every later step, and the agent may build confidently on it.
  • Untrusted input steering actions. Agents read web pages, emails and documents written by strangers, and that text can influence what the agent does next.

What can go wrong

The OWASP Top 10 for LLM Applications, a widely used security checklist, names several risks that matter most for agents. In its 2025 edition they include excessive agency (an agent with more tools, permissions or autonomy than it needs), prompt injection, sensitive information disclosure, improper output handling (passing model output to other systems without checks) and unbounded consumption (runaway costs and loops).

In practice, the incidents fall into a few groups:

RiskExample
Harmful mistakesRefunding the wrong order, emailing the wrong customer
ManipulationA web page tells the agent to send data somewhere, and it does
Data leaksThe agent reveals one customer's details to another
Runaway behaviourA loop of tool calls costing hundreds of euros overnight
OverreachThe agent “helpfully” does more than asked, like deleting files it thought were clutter

Rating actions by risk

Not every action needs the same care. Searching help articles is harmless; paying 4,000 euros isn't. Rate each action on a few factors and match the score to a control:

Try it yourselfPython
# Rate each action an assistant agent might take, and decide what control it needs before it runs.
ACTIONS = {
    #                          undo      money (EUR)  items/people affected  leaves the company
    "search_web":              ("easy",  0,           1,                     False),
    "archive_old_newsletters": ("easy",  0,           200,                   False),
    "send_email_to_client":    ("never", 0,           1,                     True),
    "pay_invoice_80":          ("never", 80,          1,                     True),
    "email_all_contacts":      ("never", 0,           900,                   True),
    "pay_invoice_4000":        ("never", 4000,        1,                     True),
    "delete_all_emails":       ("never", 0,           5000,                  False),
}

def risk(undo, money, reach, external):
    score = {"easy": 0, "hard": 1, "never": 2}[undo]
    score += 0 if money == 0 else 1 if money <= 100 else 2 if money <= 1000 else 3
    score += 0 if reach <= 1 else 1 if reach <= 10 else 2 if reach <= 1000 else 5
    score += 1 if external else 0
    return score

def control(score):
    if score <= 1: return "run automatically"
    if score <= 2: return "run, and log it for review"
    if score <= 4: return "ask the user to confirm first"
    if score <= 6: return "needs a second person's approval"
    return "not allowed for the agent"

for name, attrs in ACTIONS.items():
    s = risk(*attrs)
    print(f"{name:<24} risk {s}  ->  {control(s)}")

# The "lethal trifecta": private data + untrusted content + a way to send data out
agent = {"reads_private_data": True, "reads_untrusted_content": True, "can_send_externally": True}
if all(agent.values()):
    print("\nWarning: this agent has all three parts of the lethal trifecta. Remove one.")

The factors are simple: can it be undone, how much money is involved, how many people or items it affects, and whether anything leaves the company. The controls rise with the score: run automatically, run and log, ask the user to confirm, need a second person's approval, or never let the agent do it at all. The rest of this course builds each of these controls.

The lethal trifecta

The end of the demo checks for a specific combination. Security researcher Simon Willison named it the lethal trifecta in 2025: an agent that has all three of these can be tricked into stealing data.

  1. Access to private data: your emails, files, customer records.
  2. Exposure to untrusted content: web pages, incoming emails, documents from outside.
  3. A way to send data out: email, web requests, even loading an image from a URL.

An attacker writes instructions into content the agent will read (2), telling it to collect private data (1) and send it to them (3). No model today reliably resists every such attempt. The dependable defence is to remove one leg of the trifecta for any agent: separate the agent that reads untrusted content from the one that holds private data, or remove its ability to send data out.

Common mistakes

Practice exercise

Check a set of agents for the lethal trifecta: private data, untrusted content and a way to send data out, all in one agent.

Your solutionPython
agents = {
    "inbox helper":   {"private_data": True,  "untrusted_content": True,  "external_send": False},
    "web researcher": {"private_data": False, "untrusted_content": True,  "external_send": True},
    "email agent":    {"private_data": True,  "untrusted_content": True,  "external_send": True},
}

# An agent with ALL three capabilities can be tricked into leaking private data.
# For each agent, print "<name>: AT RISK" if it has all three, otherwise "<name>: OK".
Knowledge check

Which change removes the lethal trifecta from an agent that reads incoming emails, searches company files and sends emails?

Summary

  • Agents act, so their mistakes have real effects, at speed and scale, and can be steered by untrusted input.
  • Key risks: harmful mistakes, manipulation, data leaks, runaway behaviour and overreach; OWASP's list includes excessive agency and prompt injection.
  • Rate actions by undo, money, reach and external exposure, and match each to a control enforced in code.
  • Avoid the lethal trifecta: private data, untrusted content and a way out, all in one agent.

Next: least-privilege tools.

Finished reading? Tick it off to track your progress.