Before you give an AI agent access
AI agents don't just generate content: they can plan, make decisions and take actions on your behalf. If an agent is over-privileged or poorly designed, a single failure can quickly become a serious incident (UK NCSC).
What government cyber-security agencies advise
- Start small: use agents only for low-risk and non-sensitive tasks, and never give them broad or unrestricted access, especially to sensitive data or critical systems (joint guidance by six national cyber-security agencies).
- Least privilege: give an agent only the minimum access it needs, for the shortest time required, and revoke elevated access when the task is complete (UK NCSC).
- Decide in advance when the agent must stop and ask a human for approval, and make sure those approvals are guaranteed and gated (UK NCSC).
- Run agents in a sandbox that controls what they can and cannot communicate with, both locally and over a network (UK NCSC).
- Log and monitor what the agent does, so it can be stopped if necessary (UK NCSC).
- Be wary of content the agent reads: an email, a file or a website can contain malicious instructions intended to "hijack" the agent into a different and potentially harmful task. This is a type of indirect prompt injection (CAISI).
Practical steps
- Count every login you hand over. The credentials an agent can use, such as API keys, app authorisations (OAuth grants) and any signed-in sessions, are part of the damage it could do if it behaves unexpectedly. Give it only the permissions the task needs (UK NCSC).
- The wider the access, the greater the potential impact if the agent malfunctions or is compromised, so restrict it to the resources needed for the task (UK NCSC).
- Say what it must not do. An AI agent does not have common sense and may interpret instructions in literal or unexpected ways, so instruct it in both what it should do and what it should not do (UK NCSC).
- Don't rely on built-in safeguards alone: safety controls built into AI models may be bypassed (UK NCSC).
Sources
- "Careful adoption of agentic AI services", joint guidance co-authored by ASD's ACSC, CISA, NSA, the Canadian Centre for Cyber Security, NCSC-NZ and NCSC-UK.
- UK National Cyber Security Centre, "Thinking carefully before adopting agentic AI" (15 May 2026).
- UK National Cyber Security Centre, "Managing the cyber risk of agentic AI" (20 August 2026).
- Center for AI Standards and Innovation (CAISI), "Technical Blog: Strengthening AI Agent Hijacking Evaluations" (17 January 2025).