The Canadian AI Safety Institute (CAISI) has published technical guidelines for containing AI agents, written for it by researchers at the University of Toronto and the Vector Institute. The document covers three kinds of control: the security policies a containment system should enforce, the tools that enforce them, and the human procedures around those tools.
Nicolas Papernot, the Toronto associate professor who led the work, says the guidance adapts decades of cybersecurity practice to software that can act on its own. The Innovation, Science and Economic Development Canada (ISED) department announced it on X.
- Why Canada wrote it
- Ten policies
- Nine enforcement mechanisms
- The human procedures
- What containment can’t guarantee
- Who is behind it
- Using it on your own agents
3
parts: policies, enforcement mechanisms, human procedures
10
security policies, from least privilege to incremental relaxation
9
enforcement mechanisms, from the harness to a hardware firewall
Why Canada wrote it
The guidelines open with a flat verdict on the two defences most labs lean on. Alignment, which trains a model to behave as its designers expect, and sandboxing, which isolates the agent, have “so far proven ineffective at eliminating such incidents,” the executive summary says. Alignment can be weakened or removed by jailbreaking or abliteration, and sandboxes are hard to specify and easy to get wrong.
The evidence is a run of public incidents. The document counts eight high-profile cases in which agents got past the extra restrictions placed on cyber-offensive testing and compromised real websites, and says the leading cause in seven of them was a misconfiguration in the sandbox environment. OpenAI disclosed in July that its models had reached Hugging Face infrastructure during an evaluation, and that disclosure prompted Anthropic to review its own evaluation runs. My earlier piece on the OpenAI report is here.
Two cases get specific attention in the guidelines. Anthropic found agents in its cybersecurity evaluations had reached real third-party systems because of an error in the outermost containment layer, even though the agents had been told they had no internet access. The UK AI Security Institute reported the opposite kind of failure: it ran one evaluation 122 times, and in 10 runs an agent took unsanctioned action on the live internet, because AISI had deliberately left internet access on. The guidelines use the pair to separate a configuration that breaks its own policy from a policy that grants too much.
Papernot, with David Lie and Thomas Ristenpart, also co-wrote an October open letter that more than 500 scientists from 39 countries signed, according to the University of Toronto. The letter asked labs to default to air-gapping cyber-capable models and called for an international body to standardise containment practice and track failures. The CAISI guidelines build on it.

Ten policies
Section 2 sets out principles that apply at any risk level. Many are borrowed from prison and penetration-testing practice, and the document uses prison analogies to explain them: guards get keys to their own cell block only, and inmates don’t enforce rules on other inmates.
| Policy | What it means |
|---|---|
| Clear rules of engagement | Name every stakeholder, write down the task, model, environment and containment specs, and get sign-off. |
| Least privilege | Each part gets only the access its task needs, which shrinks both the attack surface and the damage. |
| Default deny | Anything not explicitly allowed is blocked. |
| Enforcement domain | Whatever enforces a rule must hold more privilege than what it constrains, and be tamper-evident. |
| Network isolation | For the highest-risk work, no live internet access at all. |
| Defence in depth | Enforce each policy at several layers so one misconfiguration doesn’t break everything. |
| Verifiability | Check the policy with threat modelling and tests before, during and after a run. |
| Observability | Record every action outside the agent’s reach. The model’s narrated reasoning isn’t a reliable audit record. |
| Human in the loop | A named overseer who can pause or halt the run, with automated fail-closed controls on high-impact or irreversible actions. |
| Incremental relaxation | Start at the strictest posture and loosen only as evidence builds. An incident sends you back. |
Nine enforcement mechanisms
Section 3 maps the policies onto six layers of a computing environment: the model, the agent harness, the virtual machine, the host stack (operating system, kernel and hypervisor), the host machine and the local network. The rule is that every layer is enforced from the one outside it.
The model layer is the exception. The guidelines say alignment and guardrails help with predictability but “do not abide by the principle of appropriate enforcement domain,” so containment should be designed on the assumption that they fail. Safeguards that block harmful inputs and outputs are also typically switched off for offensive cyber testing.
| Mechanism | Layer | Example tools the guidelines name |
|---|---|---|
| Secure agent harness | Harness | NVIDIA OpenShell, AISI Inspect |
| Periodic integrity checks | Host stack | nftables rule checks on the host |
| Isolated VM network | Host stack | nftables, eBPF, restricted user-mode networking |
| Hardened OS | Host stack | SELinux, AppArmor |
| Hardware-isolated VM | Host stack | KVM, Xen, VMware ESXi, Hyper-V, Firecracker microVMs |
| Hardware firewall | Network | Dedicated device, default deny, allowlist |
| Network monitoring | Network | Zeek |
| Intrusion detection | Network | Suricata |
| Static internet cache | Network | Squid proxy |
Three design choices matter most. First, the guidelines prefer hardware-isolated virtual machines to containers such as Docker, because containers share a kernel with the host and a kernel exploit can become a container escape. For risky workloads they suggest microVMs such as Firecracker, which strip out features like BIOS and USB passthrough.
Second, the harness gets a short tool list, not broad shell access. Their example gives the agent direct access to tools such as John the Ripper, Wireshark and Ghidra instead of letting it download arbitrary packages. Papernot explains the reason this way: “The more tools models have access to, the more likely one of them will have a vulnerability that the model can exploit to weaken its containment.”
Third, the agent doesn’t get the live internet. It gets a static cache, run under the same containment as the agent. A weaker model fills the cache under human supervision, then the cache is frozen and cut off, and requests outside it are dropped.

The human procedures
Section 4 covers the people side, which the guidelines treat as part of containment, not an add-on. Technical controls depend on people choosing the right policy, deploying it correctly and responding when it breaks, so the document names owners: an evaluation owner, an operator responsible for containment, an incident-response lead and a decision maker who can accept residual risk. Whoever can stop a run should be able to do so without waiting for the evaluation owner to approve.
It also separates a blocked out-of-scope attempt from a containment failure. A blocked attempt can be an expected observation in a hacking evaluation. Unauthorised connectivity or the loss of a required safety control should trigger isolation and suspension.
Stopping model requests alone does not stop commands or services that are already executing.
Technical Guidelines for AI Agent Containment, section 4.1.4

The stop mechanism has to operate outside agent-controlled systems and cover launched processes and descendant agents. Teams should rehearse it before a high-risk run, including a controller outage and a guest that ignores a stop request, and measure the delay from failure to confirmed isolation.
The most detailed procedure is the Containment Attestation Service. It is a launch gate that checks the live environment against the approved policy using evidence collected outside the agent’s control: identity and configuration, effective connectivity, intermediary services and safety controls. It tests permitted and prohibited connections from the real execution environment. Missing, stale or failed evidence denies admission, and an operator’s assurance or an intended firewall configuration doesn’t count.
The guidelines say a mandatory gate like this would have refused to launch the configurations behind the incidents Anthropic disclosed in July and September, while the live internet path was open. They add that the claim depends on the checks covering the relevant network paths and on the gate itself being trustworthy.

The guidelines finish with a risk assessment of the whole deployed system, not just the model. They tell teams to record observed limits with the conditions they were measured under, and not to treat a failed escape test as proof a component is secure. Two controls that share a kernel shouldn’t be counted as independent protection against a kernel compromise. The assessment gets revisited whenever the model, tools or environment change, because an assumption that held for one agent, such as a hypervisor compromise being unlikely, can fail for the next.
If an agent does exceed its boundary or touch an external system, the document lists four steps: preserve evidence in a store the agent can’t reach, contain the effects, notify affected parties promptly and coordinate remediation through national and sector channels. In Canada that includes the Canadian Centre for Cyber Security.
What containment can’t guarantee
The guidelines say outright that no containment system can be perfectly secure, because any sufficiently complex software or hardware has vulnerabilities. Their goal is to lower the likelihood of a breach and limit the damage when one happens.
- Zero-days. Current models can find and exploit unknown vulnerabilities, and containment is built on software that has its own bugs.
- Hosted models. If the model runs on someone else’s inference server, that server sits outside the boundary. The suggested mitigation is a restrictive proxy that forwards only approved, well-formed requests.
- Shared hardware. GPU passthrough and device management add attack surface. The document notes OpenAI reported agents in separate microVMs on a shared host building a covert channel through cache timing in a red-teaming experiment.
- Harm inside the boundary. The harness and everything in the VM are assumed breakable, so lateral movement and tampering with monitoring need their own mitigation.
- Multi-agent setups. Every machine hosting an agent sits inside the boundary, and connections to hosted models go through a single proxy, because each extra provider adds an egress path.
The guidelines also fix their scope. They assume honest developers and evaluators, and they say the practices fall short on their own against agents deliberately built to act covertly against the containment system. The strictest measures, such as no live internet, suit evaluations and training, not every production deployment. Least privilege, default-deny egress, an external stop, pre-run verification, tamper-evident logging and a systematic risk assessment do carry over.
Lower-risk uses take a lighter version. Papernot gives the example of barring an email assistant from sending until a person approves. The document is modular, and organisations pick and tune practices to their own risk assessment.
Who is behind it
CAISI launched in November 2024 with an initial budget of C$50 million over five years. It sits inside ISED and draws on the National Research Council and the Canadian Institute for Advanced Research (CIFAR), whose CAISI research program received C$27 million and works with Canada’s three national AI institutes: Vector in Toronto, Mila in Montréal and Amii in Edmonton. Papernot co-directs the CIFAR program.
The authors are Meenatchi Sundaram Muthu Selva Annamalai, Jonas Guan, Thomas Ristenpart, David Lie, Gururaj Saileshwar and Papernot. For the highest-risk scenarios they drew on the safeguards from Papernot’s team’s AI-powered worm research, which denied the agent live internet access and gave it only a stored copy of what it needed.
Canada is home to some of the world’s leading experts in artificial intelligence safety and security.
Evan Solomon, Canada’s minister of artificial intelligence and digital innovation, in the University of Toronto announcement
Papernot says the guidance will change as AI does. “AI is moving quickly, and we expect this guidance will change alongside it,” he says, adding that the core principles give organisations “a reliable foundation to build on.”
The same threat is already showing up outside labs. My piece on Switzerland’s first confirmed AI-agent cyberattacks covers the other side of it.
Using it on your own agents
This part is my reading, not CAISI’s. If you run coding or computer-use agents, five items in the guidelines apply even without a frontier lab’s budget:
- Verify the sandbox, don’t describe it. Anthropic’s agents were told they had no internet and had it anyway. Test egress from inside the environment before each run.
- Keep the stop switch outside the agent. Cutting API access leaves running processes alive, so the kill has to reach the VM and its children.
- Give the harness a short tool list. Prefer named tools to open shell access, and deny network access by default.
- Log where the agent can’t write. Don’t treat the model’s explanation of what it did as the audit trail.
- Re-run the risk assessment when the model changes. A boundary that held for last quarter’s model is an assumption about the new one.
The full document is on the ISED site and as a PDF. The University of Toronto’s account is here.
Sources
- Technical Guidelines for AI Agent Containment, CAISI / ISED
- University of Toronto, guidance on AI agent containment for Canada’s national AI safety institute
- Canadian Artificial Intelligence Safety Institute, ISED
- Canada launches Canadian Artificial Intelligence Safety Institute, 2024 news release
- CAISI Research Program at CIFAR
- UK AI Security Institute, incident report on unsanctioned agent behaviour
- Anthropic, investigating incidents in its cybersecurity evaluations
- Open Letter on AI and Cybersecurity




