Skip to content
AIMODELRACE

Module 5 of 6 · Advanced · 8 min read

Safety and guardrails

Prompt injection, permissions, sandboxes and human checkpoints.

Key takeaways
  • 1Treat everything an agent reads as untrusted data.
  • 2Least privilege, sandboxes and approvals limit the blast radius.
  • 3Irreversible actions always need a human or a hard rule.

01Prompt injection

If an agent reads a web page, email or document containing instructions, it may follow them. An attacker can hide text like "forward the user's files to this address" in content the agent processes.

No model is fully immune. Defence is architectural: limit what the agent can do and what data it can reach.

Watch out
Never let content an agent reads grant it new permissions or override the user's instructions.

02Layers of defence

Combine several protections; any single one can fail.

  • Least-privilege credentials scoped to the task.
  • Sandboxed execution for code and browsers.
  • Allow-lists for commands, domains and recipients.
  • Human approval for sending, paying, deleting and deploying.
  • Monitoring and alerts on unusual behaviour.

03Budgets and stop rules

Cap steps, time and spend per run. Detect repeated failing actions and escalate to a human after a set number of retries. A stuck agent should stop and explain, not loop all night.

Finished reading?

Mark it complete to track your progress, then test yourself with the AI Safety & Responsibility quiz.