Strike · Shield · Evolve

Field notes Defence · July 10, 2026
See it in action Get a demo
Defence

Securing the Agent: Guardrails, Sandboxes, and Least Privilege for AI Workers

If you deploy AI agents, you've deployed a new kind of privileged worker that can be socially engineered through its inputs. Here's the practical playbook for containing one.

Securing the Agent: Guardrails, Sandboxes, and Least Privilege for AI Workers

Treat an AI agent as what it actually is: a new worker with system access that can be socially engineered through the text it reads. Framed that way, securing it stops being mysterious and starts looking a lot like the disciplines we already apply to privileged insiders — plus a few twists unique to systems that take instructions in natural language. Here is the practical playbook.

Assume the agent will be compromised

The foundational mindset, echoed by 2026 guidance from the Five Eyes alliance and OWASP alike, is that you cannot prevent prompt injection reliably. A determined attacker who can get text in front of your agent can, often enough, bend it to their will. So the goal is not a perfect input filter. The goal is to ensure that a hijacked agent can do very little damage. Everything below flows from that assumption.

Least privilege, enforced

The single most important control is to scope the agent's authority to the absolute minimum its task requires.

  • Read-only where possible. An agent that only needs to read should have no ability to write, delete, or send.
  • Narrow tool access. Give it the specific tools its job needs and nothing more. An agent that summarises documents has no business with a tool that can issue payments.
  • Short-lived, scoped credentials. The tokens an agent uses should expire quickly and grant access to a narrow slice of the world.

Sandbox the actions

When an agent executes code or commands, it must do so in an isolated environment where the worst case is contained. A sandboxed agent that gets hijacked into running a malicious command runs it in a box that can be discarded, not on production infrastructure. The blast radius is defined by your architecture, not by the attacker's imagination.

Keep a human on the loop where it counts

Full autonomy is appropriate for low-stakes, reversible actions. For consequential or irreversible ones — moving money, deleting data, changing security configuration — a verification step is cheap insurance. The agent proposes; a human (or a strong, separate policy check) disposes. This is not a failure of automation; it is mature automation that knows the difference between a routine task and a one-way door.

Monitor like it's an insider

Finally, watch the agent the way you'd watch any privileged account. Log its reasoning and its actions. Baseline its normal behaviour. Flag deviations. An agent suddenly accessing data it never touched before, or calling a tool it never used, is exactly the kind of anomaly that should trigger scrutiny. The same correlation engine that catches a compromised human account catches a compromised agent — if you're feeding it the agent's telemetry. Secure the agent as a worker, contain it as a risk, and watch it as an insider. Do those three things and prompt injection becomes a managed risk rather than an open door.