Technical Guidelines for AI Agent Containment

For the development, testing, and evaluation of cyber-capable AI agents

AI agents are increasingly being used to perform tasks in both personal and professional settings. While these systems can offer benefits, they can also introduce new safety and security risks, particularly when they behave in unexpected ways. To help organizations address these risks, the Canadian Artificial Intelligence Safety Institute (CAISI) has published technical guidelines for containing AI agents. Drawing on proven cybersecurity approaches, the guidance covers security policies, technical tools and human oversight of these systems to support their safe development and use. It will also help reduce risks and protect Canadians from potential harm.

Developed for the Canadian AI Safety Institute (CAISI) by:

Meenatchi Sundaram Muthu Selva Annamalai
Jonas Guan
Thomas Ristenpart
David Lie
Gururaj Saileshwar
Nicolas Papernot

Table of Contents

Executive Summary

Artificial Intelligence (AI) agents are the latest in a long line of AI technologies that are increasingly deployed in the real world across a wide range of tasks from answering emails to discovering software vulnerabilities. However, in pursuit of these tasks, AI agents sometimes execute harmful actions contrary to their users' intentions, such as deleting a user's email inbox or exploiting software vulnerabilities in systems where they do not possess appropriate authorization.

The two main mitigations currently in place, alignment and sandboxing, have so far proven ineffective at eliminating such incidents. This is due to the challenges in precisely defining alignment goals and the fact that alignment can be removed through jailbreaking and abliteration. Furthermore, sandbox environments are difficult to specify and implement correctly thus resulting in several reports of misconfigurations in the sandbox environment. These failures are compounded by the absence of standardized security practices for developing, testing, and deploying agents, which has left AI agents without reliable safeguards.

To help address this gap, the Canadian AI Safety Institute (CAISI) is publishing technical guidelines for AI agent containment systems, developed by a team of cybersecurity and AI experts at the University of Toronto and the Vector Institute. These guidelines adapt over 50 years of lessons from computer security and related fields to designing systems that limit and mitigate harm from AI agents. Nevertheless, no containment system can be perfectly secure. These guidelines aim to reduce the likelihood of AI agents causing real-world harm, and to limit the damage when containment fails.

The guidelines are organized in three categories:

  1. Security policies: The principles a containment system should enforce, including least privilege, default deny, network isolation and defense-in-depth. Policies should be verifiable, agent actions should be observable, and a human overseer should be able to halt the agent.
  2. Enforcement mechanisms: How to implement security policies at each layer of the environment, including a restricted and monitored agent harness, hardware-isolated virtual machines on a hardened host, and network controls that replace live internet access with a static cache.
  3. Human procedures: The processes people follow to select, deploy and monitor technical controls correctly. Procedures should define who authorizes a run, how the environment is automatically checked against approved policies before an agent acts, how incidents are handled, and how risk is assessed across the complete deployed system.

The guidelines are modular: organizations should select and calibrate them based on their own risk assessment and are not expected to implement every practice in every context. That said, when implemented together, the full set reflects the posture appropriate for the highest-risk activities, such as training and testing frontier cyber-capable AI agents. Each area of the guidelines is illustrated using the concrete example of cyber-capability evaluation of AI agents.

1. Introduction

Artificial intelligence (AI) technologies are constantly being developed, tested, and deployed in real-world environments. Following the rapid rise in capabilities of large language models (LLMs), AI agents have emerged as the newest wave of such deployments. Put simply, an AI agent is a computer program in which a harness runs a loop working toward completing a task: an AI model decides on actions (e.g., calling software tools), and the harness executes them and returns the results to the model, which in turn decides what to do next. By carefully engineering the inputs to the model, the software tools, and the loop, AI agents have been deployed across a wide range of tasks including answering emails,Footnote 1 operating a computer,Footnote 2, Footnote 3 coding,Footnote 4, Footnote 5, Footnote 6, Footnote 7 and discovering software vulnerabilities.Footnote 8, Footnote 9, Footnote 10

However, in the pursuit of accomplishing the task, AI agents sometimes execute unintended and harmful actions. For instance, one agent deleted a user's email inbox when tasked with making suggestionsFootnote 11 and several have conducted unauthorized probes and exploited software vulnerabilities while performing benign tasks.Footnote 12, Footnote 13, Footnote 14

To mitigate such incidents, the AI community has largely relied on two main interventions: alignment and sandboxing. Alignment is the process by which a model is trained to conform to the designers' expectations about desirable behaviors. However, even though the current state-of-the-art alignment techniques might be effective in reducing the overall incidence of harmful actions taken by models contrary to user intent,Footnote 15 they do not eliminate themFootnote 16 and, in particular, did not prevent many of the aforementioned security incidents. Additionally, alignment can often be weakened or removed by jailbreaking or uncensoring (also referred to as abliteration) models.

Therefore, agent deployments also rely on isolating the agent from the wider network and heavily restricting the software tools available to the models to further reduce the likelihood of harm caused by agents. This approach is often referred to as sandboxing. Designing sandboxes is challenging as sandbox policies have to carefully balance, on one hand, providing enough flexibility to allow the agent to accomplish useful tasks and, on the other, restricting it sufficiently to block harmful actions. For instance, an air gapped system (a computer that is physically isolated from unsecured networks) can dramatically reduce the likelihood of agents taking harmful actions but in practice may not be able to accomplish any tasks.

Moreover, even after sandbox policies have been carefully tuned to the requirements of the task, they have to be implemented correctly in order for the policies to be effective at preventing harmful actions. For instance, there have been several publicly reported incidents of AI agents circumventing their sandboxes by finding bugs or vulnerabilities in themFootnote 17, Footnote 18, Footnote 19.

All the above becomes more acute in high-risk settings such as cyber-offensive testing against authorized targets. Here, additional measures have been used in practice to further limit the potential damage that can be caused by the agent. These mostly involve technical measures such as heavily restricting internet access to the agentFootnote 20. However, several high-profile security incidents have been reported where AI agents have circumvented these added technical measures as well and compromised real-world websites.Footnote 21, Footnote 22, Footnote 23, Footnote 24, Footnote 25, Footnote 26 The leading cause of these incidents (seven of eight incidents) was a misconfiguration in the sandbox environment that enabled a path for agents to access and compromise hosts on the internet.

Overall these incidents show that current containment practices across the AI agent lifecycle (development, testing, and deployment) have not consistently provided sufficient security guarantees. Crucially, agent containment measures should go beyond purely technical measures and include human procedures as well in order to be effective, thus motivating more focus on developing and institutionalizing robust security practices throughout the AI agent lifecycle.

1.1. Purpose, Scope, and Audience

This document sets out technical guidelines for designing AI agent containment systems. These guidelines are drawn from the wealth of security policies, technical mechanisms, and procedures that have been developed by the computer security and related communities over the last 70 years. For the purpose of this document, an AI agent containment system is defined as a system that restricts the agent from performing harmful actions, reduces the likelihood that the agent circumvents the restrictions—a containment breach—and mitigates the damage caused in the event of a containment breach.

Prior research dictates that it is impossible to design a perfectly secure containment system for real-world AI agent deployments. The reason is that vulnerabilities in any sufficiently complex software or hardware system cannot be ruled out. These guidelines therefore assume fallibility, and the goal is to minimize the likelihood of AI agents circumventing restrictions and to reduce any potential harm that results.

The guidelines seek to help organizations incorporate current cybersecurity practices when developing, testing, and deploying AI agents. Because purely technical mechanisms have failed previously, a holistic approach is being proposed for both technical mechanisms and human procedures that, when implemented together, would more robustly contain AI agents.

These guidelines do not prescribe a single posture. Organizations should perform their own risk assessments based on factors such as the capabilities of the models, the task and the environment, and tune their containment measures accordingly. Lower-risk deployments may reasonably adopt a subset, or less restrictive versions, of the practices described in this document. Where this document describes the most restrictive version of a practice, such as no live internet access, it reflects the posture appropriate for the highest-risk activities, including training and testing frontier cyber-capable models. Stronger containment carries costs, including operational complexity, infrastructure cost and, for evaluations, reduced realism; these trade-offs are part of the risk assessment. Practices should be strengthened as risks increase, for example as model capabilities advance.

While the guidelines apply directly to the development and evaluation of cyber-capable models, a few of the restrictive measures may not be appropriate to carry over directly to production deployments. This includes, for example, the recommendation to isolate agents from live internet access (as discussed in Sections 2.5, 3.4, and 3.5). However, most of the security principles and practices do carry over to production deployment contexts, such as, for example, least privilege (Section 2.2), default deny egress (2.3), external stop (4.1.4 and 4.1.6), pre-run verification (2.7 and 4.2), tamper-evident logging (2.4 and 2.8), and the need for systematic cyber risk assessment (4.3). Additionally, while these guidelines raise important considerations for agentic containment in general, agentic deployments in the context of operational technology and physical processes implicate additional considerations beyond the scope of these guidelines.

Alignment techniques are considered distinct from the practices described here since they do not provide hard guarantees from a systems security perspective. Nevertheless, improvements in alignment techniques may enhance the predictability of model actions, potentially easing the containment policy required for safe use.

Finally, this document focuses on honest development, testing and deployments of models. Specifically, it assumes that the models are deployed and tested without malicious intent on the part of the developer or evaluator and are not deliberately or adversarially engineered to cause harm (e.g., malware). The containment practices outlined here assume and address the possibility of untrusted inputs, such as hostile instructions in an agent’s task data, but it may be that they are not enough for maliciously designed AI agents, that operate covertly, stealthily, and actively seek to circumvent both technical and human measures, particularly when equipped with knowledge of the containment system put in place to contain them. This raises further questions about the potential for supply chain compromise of the model, agentic harness, and the tools made available in an agentic containment system – a risk that may not be fully mitigated by the containment measures outlined in this document.

The target audience for this document includes model developers, evaluators, security architects, and others responsible for developing, deploying, testing, or regulating AI agents, particularly those with advanced cyber capabilities.

1.2. Running Example

Figure 1 : Architectural diagram for an example containment system. Layers are bolded and arrows indicate authorized data flows.

Architectural diagram for an example containment system

The figure shows an AI model running inside nested layers of isolation. A containment boundary surrounds the whole environment, and every connection to the outside world crosses it at a controlled point.

Containment boundary. It encloses two areas: the host machine and the local network.

Host machine, from the inside out:

The model runs inside an agent harness.

The agent harness runs inside a virtual machine (VM).

The VM exchanges data in both directions with the host stack (operating system, kernel and hypervisor).

The host stack sits between the host machine and the local network, and all of the host machine's local traffic passes through it.

Local network:

An artifact cache holds packages, webpages and databases, and supplies them to the host stack.

An experiment log store receives logs from the host stack.

Connections that cross the containment boundary:

Internet to artifact cache. Only approved artifacts come in. There is no direct internet access from the host machine.

Experiment control to host stack. An external control system sends instructions in.

Experiment logs to experiment control. Logs go out to the control system.

Model to and from API server. The model connects directly to an external API server in both directions. This is the only connection that does not pass through the host stack.

Throughout this document, cyber-security evaluationsFootnote 27, Footnote 28, Footnote 29, Footnote 30, Footnote 31, Footnote 32 serve as a running example to illustrate how the practices described in this document should be applied in the real-world.

Example: Cyber-capability Evaluation of AI Agents

Developers are testing a model, using an agent harness, to perform offensive cybersecurity tasks in a particular environment.

In this example, "developers" refers to the people who set up and run the testing; these could be AI model engineers, industry security teams, vulnerability researchers, or others. The running example covers a broad range of settings, including open-weightFootnote 33 or closed-weightFootnote 34 models and general-purpose harnesses or harnesses designed specifically for cybersecurity tasksFootnote 35, Footnote 36. The cybersecurity task could also broadly involve developing exploits against software,Footnote 37 compromising intentionally vulnerable machines within the environment,Footnote 38, Footnote 39, Footnote 40 or other cybersecurity operations.Footnote 41, Footnote 42 The environment in this case would consist of a list of machines (controlled by the developers) that the agent can access (e.g., intentionally vulnerable machines, package repository, internet cache, etc.). An example of such a deployment is provided in Figure 1.

The goal of these guidelines is to minimize the likelihood of unintended harmful actions taken by the agent in pursuit of its task, specifically, compromising machines not part of the testing environment.

For the purposes of simplicity, the description focuses on a single agent. In practice, multiple agents might be used when solving the task, but the practices described here extend to multi-agent settings as well, given that they are applied to the entire multi-agent system as a whole (see Section 3.6.7).

1.3. Document Structure

Section 2 introduces the security policies required for an AI agent containment system. Section 3 covers the current state-of-the-art technical mechanisms available to achieve such security policies and analyze the attack surface that remains when using such mechanisms. Lastly, Section 4 discusses how this residual attack surface can be mitigated through human procedures.

Throughout the document, specific products and services – such as harnesses, hypervisors, tools, proxies, and monitoring and detection software – are mentioned as illustrative examples. These examples do not imply any endorsement or recommendation of these products and services over alternatives.

2. Defining Security Policies

The policies in this section are principles that apply at any level of risk. How strictly each is implemented should follow the organization's risk assessment. Where an example is given, it reflects the most restrictive posture.

2.1. Clear Rules of Engagement

Similar to "rules of engagement" standards used for penetration testing,Footnote 43 all stakeholders that are part of the development, deployment or testing should be identified and the full agent environment should be enumerated and communicated to them. Specifically, stakeholders would include the model and harness developers, model evaluators, containment system designers, deployment infrastructure operators, and data owners. The full agent configuration should include the task, model characteristics (model class, safeguards, alignment, and cyber-capability), environment details (e.g., server topology), and the containment specifications (e.g., what the model can and cannot access). Furthermore, these specifications along with appropriate approvals from stakeholders should be documentedFootnote 44 so that all stakeholders can be on the same page about the risks involved and the adopted security posture to mitigate the risks.

2.2. Principle of Least Privilege (PoLP)

The principle of least privilege dictates that each part of a system is given only the access necessary to complete its task.Footnote 45 For instance, prison guards assigned to a cell block should only receive keys to that cell block not the entire prison. When applied to AI agent containment, this reduces not only the attack surface that the agent potentially has but also reduces the scale of damage if the agent starts taking unintended harmful actions.

2.3. Default Deny

All access policies should be denied by default if not specified in the configuration.Footnote 46 This ensures that the damage caused is limited to the set of included entities and not all connected machines.

2.4. Enforcement Domain

In order for enforcement mechanisms to be robust, tamper-resistant and tamper-evident,Footnote 47 they should have more authority (privilege domain) than what they are enforcing (scope). For instance, inmates should not be employed to enforce policies on other inmates, as they lack the authority to do so. This ensures that even if the enforcement scope is compromised, the enforcement mechanism can still enforce its security policies.

2.5. Network Isolation

For the highest-risk activities, live internet access should be disabled during the lifecycle of cyber-capable models (see Sections 3.4 and 3.5 for examples). At a systems level this, by design, limits the machines affected by the model's actions to ones explicitly within the control of the entity.

2.6. Defense-in-Depth

For any security policy, multiple enforcement mechanisms at different privilege domains should enforce it as a form of redundancy and to ensure that misconfigurations at one level do not completely break containment for the system as a whole.

2.7. Verifiability

Security policies should be verified through a formal threat model analysis,Footnote 48 if possible, and by empirical tools before, during, and after the agent is run. Verifiability reduces the likelihood of accidental misconfigurations that result in a security posture that is different on the ground from what was intended.

2.8. Observability

All actions performed by the model should be observed and recorded for post-run audit. The model’s narrated reasoning should not be treated as a reliable audit record. Even if no security incidents were detected during the run, the model’s actions should be analyzed to identify and understand the attempts made by the model to subvert the containment system and adjust the system accordingly. Notice that this calls for secure, tamper-evident logging. Logs and monitoring should be stored and enforced outside the agent’s reach, with access controlled to ensure that the logs cannot become an unauthorized store of information for the agent.

2.9. Human-in-the-Loop

The containment system should be designed around a dedicated human overseer who observes the agent run, is alerted to incidents, and can interfere with the model’s actions in real-time. At the end of the day, human observers are best at deciding whether an action is truly harmful or not, and therefore, ambiguous model actions should be mediated by a human observer. As humans are subject to approval fatigue, automation bias, and limited reaction time, human oversight should be proportionate and focus on high-impact or irreversible actions, with automated fail-closed controls to ensure that such actions cannot be executed autonomously prior to human review (see Sections 4.1.4 and 4.1.6). Crucially, the containment system should provide a verifiable way to halt or pause the agent run when the human overseer suspects that harmful actions have been performed or are imminent.

2.10. Incremental Policy Relaxation

Containment systems should admit a security scale that dictates the strength of protections. Testing of cyber-capable models should initially use the strongest relevant containment (e.g., no live internet access near one end of the spectrum). As agent capabilities and safeguard performance become better understood empirically, the containment system can use more relaxed policies (e.g., limited internet access). Incidents should trigger reversion to stricter policies.

3. Implementing Enforcement Mechanisms

This section discusses how the security policies described previously can be implemented using enforcement mechanisms. It first defines and provides an overview of enforcement mechanisms, followed by detailed descriptions of various enforcement mechanisms and examples of how these mechanisms could be applied with respect to the running example. Lastly, it covers the residual attack surface that is left uncovered by the enforcement mechanisms and practices to mitigate this attack surface.

3.1. Overview

At a high level, an enforcement mechanism is characterized by the layer and scope of enforcement, together with the security policies enforced. Specifically, the enforcement layer refers to where the mechanism is implemented, and scope refers to what the mechanism constrains. A metaphorical example is a prison guard posted at the perimeter of a prison (layer) and constrains the inmates (scope).

In the context of agent containment, there are six main components of a computing environment that can serve as a layer or scope: model, agent harness, virtual machine (VM), host stack (host OS, host kernel, and hypervisor), host machine, and local network. These include the model and agent, as well as all components between the agent and other computing systems that are not part of the environment (see Figure 1). These layers guide the design of enforcement mechanisms ensuring that security policies are enforced at several layers (defense-in-depth) and the enforcement layer is always one privilege domain above its scope (enforcement domain). Table 1 provides a summary of the recommended enforcement mechanisms.

Table 1 : Summary of mechanisms to enforce security policies
Mechanism Layer Scope Policies
Secure Agent Harness Agent Harness Model PoLP
observability
human-in-the-loop
Periodic Integrity Checks Host Stack VM verifiability
Isolated VM Network Host Stack VM network isolation default deny
Hardened OS Host Stack VM default deny
Hardware-Isolated VM Host Stack VM PoLP
Hardware Firewall Network Machine default deny
network isolation
Network Monitoring Network Machine observability
Intrusion Detection System Network Machine observability
verifiability
Static Internet Cache Network Machine network isolation
default deny

3.2. Model

One popular model-layer enforcement mechanism is alignment. Specifically, during model training, models are fine-tuned in an attempt to ensure that model behaviors meet the designers' expectations. For instance, safety alignment penalizes models for failing to avoid prescribed outputs (e.g., assisting with offensive hacking, creation and dissemination of misinformation, etc.). However, alignment is an open research question and current alignment techniques can lower the likelihood, but not eliminate, unwanted agent actions.Footnote 49Furthermore, from a containment perspective, alignment techniques are unsatisfactory as they do not abide by the principle of appropriate enforcement domain.

Another popular model-layer enforcement mechanism, safeguards that detect and block harmful model inputs and outputs, may also be inappropriate, as they are typically disabled to enable meaningful offensive cyber testing (e.g.,Footnote 50, Footnote 51).

None of the above is to say that alignment and guardrails are unimportant. They can help with predictability of behavior and prevent some unwanted actions, potentially easing the containment policy required for safe use. Rather, containment mechanisms should be designed under the conservative assumption that alignment/guardrails are ineffective or inapplicable.

3.3. Agent Harness

The first line of defense is the agent harness since it immediately controls how a model interfaces with the real-world. Specifically, the agent harness dictates the side-effects a model can have through tool calls, how long and persistent a model is through the agentic loop, and the persona and scope of the task presented to the model through the prompts. Therefore, careful design of a “secure” agent harness can reduce the attack surface and level of damage potentially caused by the model. While it is the first line of defense and useful for implementing some constraints and early warning monitoring, it is important to recognize that the agent harness is not a fully trustworthy defense layer and is within the agent’s reach for tampering (see Section 3.6.1).

3.3.1. Limit tool calls.

Tool calls should be limited to a select few that are necessary for the task at hand instead of enabling broad Bash (or Python) scripting access to a model. This ensures that the model has only the level of access required to complete its task (PoLP).

Example: Cyber-capability Evaluation of AI Agents

Agent harness gives model direct access to tools such as John the Ripper,Footnote 52 WireShark,Footnote 53 Ghidra,Footnote 54 etc. instead of enabling the model to download arbitrary packages by itself.

3.3.2. Tool call monitoring.

The agentic loop should be engineered to observe interactions between the model and the system, identify potentially harmful interactions, and raise security alerts to a human supervisor. This ensures that the model's actions are constantly tracked (observability) and a human can step in before the model takes harmful actions (human-in-the-loop). Some harnesses that have these functions built in are NVIDIA OpenShell.Footnote 55 and AISI InspectFootnote 56

Example: Cyber-capability Evaluation of AI Agents

Tool calls made by the agent are filtered based on an IP address or domain name allowlist and the agent pauses and raises security alerts if machines outside the allowlist are mentioned or attempted to be accessed. An agent harness with inbuilt monitoring and filtering rules (NVIDIA OpenShell)Footnote 57 is used.

3.4. Host Stack

3.4.1. Periodic Integrity Checks.

A periodic integrity checker should run in the host stack (either the host OS or the host kernel) that periodically checks that the containment controls for the VM (e.g., the network isolation) remain in their approved state (verifiability). Failure of a required control should raise a security alert to a human (human-in-the-loop) and potentially pause or halt the agent run.

Example: Cyber-capability Evaluation of AI Agents

A periodic integrity checker running on the host OS checks the active firewall rules (nftables) and routing configuration and verifies that no unauthorized route to the internet is available. Failed checks pause the run and raise a security alert.

3.4.2. Isolated VM Network.

The first line of network isolation should happen at the host stack. Specifically, the VM should be configured on a restricted and isolated network that explicitly lists the network resources it has access to (e.g., through nftables,Footnote 58 eBPF,Footnote 59 or user-mode networking with restrict=on). This ensures that the agent running in the VM does not have unrestricted access to the internet (network isolation) and can only access resources based on explicitly allowed rules (default deny).

Example: Cyber-capability Evaluation of AI Agents

Agent VM is setup with restricted user-mode networking (restrict=on) and explicit guestfwd rules to provide access to contained services. nftables rules are also set up to restrict the host OS's access to the internet. When the agent is running both VM and OS should have the same level of network isolation.

3.4.3. Hardened Host OS.

Machines hosting agents should use hardened OS-es (e.g., SELinux,Footnote 60 AppArmor)Footnote 61 that operate on a default deny policy for resources (file, sockets, etc.) to ensure that accidental mis-configuration do not allow agents to obtain further privileges on the host OS than intended. This means that even if agents escape the VM boundary, they can only reach resources labeled for the VM thus reducing the radius of impact (default deny).

Example: Cyber-capability Evaluation of AI Agents

Machine hosting agent runs on SELinux.Footnote 62

3.4.4. Hardware-Isolated VMs.

The standard method of providing a hard boundary between the agent and the rest of the system is through a VM. Specifically, hardware-isolated VMs are recommended instead of containers (e.g., Docker) or user-space kernel sandboxes (e.g., gVisor), which only offer weaker isolation: containers share a kernel with the host OS, so kernel-level exploits can result in a container escape and compromise the host. Hardware-isolated VMs (e.g., KVM,Footnote 63 Xen,Footnote 64 VMWare ESXi,Footnote 65 Microsoft Hyper-V)Footnote 66 on the other hand, run their own kernel and rely on hardware-assisted virtualization features to enforce the boundary between guest and host, which provides much stronger isolation. For particularly risky workloads (e.g., cyber-offensive testing), microVMs (e.g., Firecracker),Footnote 67 which remove many potentially unnecessary features of a VM (e.g., BIOS, USB passthrough), can be used to reduce the attack surface available to the agent.

Example: Cyber-capability Evaluation of AI Agents

Agent VM is configured and run on Firecracker.Footnote 68

3.5. Network

3.5.1. Hardware firewall.

The final backstop for network isolation should include a hardware firewall that sits outside the machine running the agent entirely. Similar to the host stack-layer network isolation, the firewall should deny all requests by default, except for explicitly listed network resources. This ensures that any possible misconfiguration at any of the lower layers on the machine can be caught at a privilege domain that the machine cannot reach (default deny and network isolation).

Example: Cyber-capability Evaluation of AI Agents

A dedicated hardware firewall device with a default deny policy and an IP or domain name based allowlist is installed to sit in between the machine and the internet.

3.5.2. Network monitoring.

Beyond machine level monitoring and filtering, network traffic (including headers and payloads) should also be passively monitored, logged, and audited to ensure not only that the security policies have not been violated but also analyze attempts to violate or subvert security policies (observability).

Example: Cyber-capability Evaluation of AI Agents

A dedicated network monitoring machine is installed (e.g., Zeek)Footnote 69 to sit on the machine's local network and log network traffic.

3.5.3. Intrusion detection system.

An intrusion detection system should also be installed to detect intrusion signatures in network egress traffic and proactively mitigate it by blocking all network access to the machine (observability and verifiability).

Example: Cyber-capability Evaluation of AI Agents

A dedicated intrusion detection system is installed (e.g., Suricata)Footnote 70 to sit on the machine's local network and detect potential intrusion signatures.

3.5.4. Static internet cache.

Even though agents should not be given unrestricted access to the internet, they can be given access to a static internet cache, provided that the cache machine is contained by the same practices set out here. Specifically, the cache machine should itself not have access to the internet, have appropriate network filtering mechanisms in multiple layers, and live within the hardware firewalled network (network isolation and default deny). This would ensure that even if the cache machine is compromised, the agent would not obtain unrestricted access to the internet.

For practical purposes, the cache can be warmed up using a less-capable agent run with human oversight. Caching requests should also be monitored and approved. Once the cache is warmed up, the internet access to the cache machine should be disabled, with the agent only able to access relevant files and packages from the (now offline) cache.

Example: Cyber-capability Evaluation of AI Agents

A dedicated machine running a SquidFootnote 71 proxy is set up inside the agent machine's hardware-firewalled local network. All VM and OS HTTP/HTTPS traffic on the agent machine is routed through the proxy. During the warm-up phase, a less-cyber capable model is used to perform either the actual task or adjacent "knowledge gathering" tasks to populate the cache. A human fully mediates this warm up run and ensures that the agent does not attempt to compromise machines outside the network. For the actual run with cyber-capable models, the cache is frozen and internet connectivity to the cache is cut off. Any requests for resources outside of the populated cache are dropped.

3.6. Residual Surface

Even under the most restrictive security posture described here, the enforcement mechanisms described above may not always be reliable.

3.6.1. Zero-day exploitation.

Crucially, since state-of-the-art models today are capable of discovering and exploiting previously unknown security vulnerabilities (i.e., zero-day vulnerabilities)Footnote 72, Footnote 73, Footnote 74 and any containment system is ultimately built on software, which might itself contain bugs or vulnerabilities, there always remains a residual risk that agents enter higher privilege domains than intended and circumvent containment mechanisms.

3.6.2. Cloud/API-dependent models.

State-of-the-art models (both open- and closed-weight) may not necessarily fit on GPUs that are physically connected to the machine and are often accessed through separate inference servers and APIs. Ideally, these machines (similar to the internet cache) should also be designed to fall within the containment boundaries. However, this may not always be possible (e.g., third-party evaluations), thus leaving the residual risk that the inference server is compromised. One method to mitigate this residual risk on the host is to design a restrictive HTTP proxy that only forwards requests to approved API endpoints. The proxy should also inspect each request to verify that it is well-formed and does not contain payloads indicative of attacks such as server-side request forgery (SSRF)Footnote 75. If the evaluators themselves deploy these inference servers in the cloud, then additional cloud-side hardening measures (e.g., authentication and access control, rate limiting, secure model deployment, etc.) should also be implemented. However, cloud-side hardening is out of scope for this document because it requires an entirely separate security architecture. Organizations should refer to applicable cloud security guidance (e.g.,Footnote 76).

3.6.3. Peripheral I/O.

Containment systems must also account for I/O interfaces exposed by peripheral devices assigned to the VM. For instance, GPUs can be assigned whole to VMs (GPU passthrough), and SR-IOV NICs can be partitioned among VMs. In such configurations, isolation depends on the host's device-assignment stack (e.g., VFIO on Linux), IOMMU-enforced DMA isolation, interrupt remapping, and safe management of the device lifecycle. Access to devices may additionally involve host-side management code (e.g., NVIDIA vGPU). Therefore, these guest-reachable assignment and management interfaces remain potential residual attack surfaces for the agent.

3.6.4. Side-channel attacks.

Despite strong hardware-level isolation, covert channels may enable agents to circumvent their isolation boundaries. For instance, in a red-teaming experiment, OpenAI reported that agents running inside separate microVMs on a shared host established a covert communication channel by using cache-timing side channels.Footnote 77 Mitigating such microarchitectural side channels requires stronger microarchitectural isolation, including limiting shared microarchitectural states (e.g., disable hyperthreading, enable cache partitioning),Footnote 78 deploying advanced hardware features (e.g., Indirect Branch Prediction BarrierFootnote 79), and disabling optimizations (e.g., cross-VM memory deduplication).Footnote 80 Nevertheless, covert channels extend beyond microarchitectural leakage to virtually any observable physical or logical medium, including acoustic, optical, and thermalFootnote 81 channels, making them difficult to exhaustively anticipate or eliminate,Footnote 82 thus leaving a persistent residual attack surface.

3.6.5. Adopted security posture.

Depending on individual risk assessments performed by stakeholders, they may choose to relax the security posture e.g., enabling heavily restricted internet access to agents. This would introduce further residual risks with respect to vulnerabilities that may be present in the software mediating internet access and open the possibility for misconfigurations to enable unrestricted internet access for agents.

3.6.6. Harms within environment.

The primary goal of these guidelines is to prevent harm to machines not part of the environment (see Section 1.2). Defenses at lower layers within the environment should be assumed to be breakable, thus leading to the potential for some level of harm within the environment. For instance, the agent harness is not expected to provide strong security guarantees: since processes inside the VM are assumed to be within the agent’s reach, the agent could disable or bypass harness-level controls and tamper with any data or monitoring running inside the VM. Similarly, the host machine, host stack (OS, kernel, and hypervisor), and machines running in the local network should all be assumed to be breakable, with varying levels of likelihood. Consequently, harms within the containment boundary, such as lateral movement and tampering with monitoring, should also be considered and mitigated alongside harms outside it.

These guidelines already limit these harms by default: each component is strictly given only the necessary privileges and access (PoLP), there are multiple layers of defenses (defense-in-depth), and all unspecified actions are prohibited (default deny). However, where in-environment harms are a serious concern, these measures can be further hardened. For example, the host's general-purpose OS can be replaced with a minimal hypervisor,Footnote 83 so that an escaping agent reaches only the hypervisor rather than a full OS, and access between machines can be tightly controlled with short-lived, revocable credentials.

3.6.7. Multi-agent systems.

These guidelines extend to settings where multiple agents are simultaneously solving tasks. Crucially, all machines hosting the agents should fall inside the containment boundary, each subject to the same host stack-layer and network-layer enforcement mechanisms. Additionally, when using cloud/API-dependent models, all connections should flow through a single network-layer proxy (preferably contacting a single provider), since each additional provider adds an egress path and trust dependency that multiplies residual risk. Furthermore, when several agents share the same resources (e.g., host machine or artifact cache) then the residual side- and possibly covert-channel risks are elevated, weakening the level of isolation between agents. One possible avenue for decreasing this risk could include giving agents dedicated hardware resources, or providing an authorized, monitored communication platform so that agents have no need for covert channels.

Overall, when designing the enforcement mechanisms, the environment and the residual risks have to be taken into account and mitigated through stricter security policies or additional procedures as explained in the coming section.

4. Containment Procedures

Technical controls depend on people selecting an appropriate containment policy, deploying it correctly, and responding when its assumptions fail. Human procedures should therefore establish who can authorize a run, how the deployed environment is checked, what conditions require intervention, and how affected infrastructure is returned to service. These procedures should apply to the complete agent system, including tools, supporting services, and any additional processes or agents it creates. They should translate the policies in Section 2 into recorded decisions and operational checks, rather than depend on an operator recognizing every harmful action as it occurs.

4.1. Operational Planning and Response

4.1.1. Assign responsibility and authority.

The organization should identify an evaluation owner, an operator responsible for containment, an incident-response lead, and a decision maker authorized to accept residual risk. The people responsible for stopping a run should have the access and authority to do so without waiting for the evaluation owner to approve an emergency action. For security-critical configurations, independent review should be used where practicable, separating preparation of a change from its approval. Roles, delegated permissions, and escalation contacts should be documented, including arrangements for unattended runs and third-party infrastructure. These guidelines adapt established controls for separation of duties, authorization, and incident-response planningFootnote 84 AC-5, CA-6, and IR-8.

4.1.2. Establish written rules of engagement.

Before execution, the evaluation owner should approve a run plan identifying the permitted targets and actions, excluded systems, model and harness versions, available tools, credentials, authorized services, and execution limits. The plan should distinguish deliberate compromise of an experimental target from prohibited compromise of the infrastructure that enforces containment. It should also specify stop and resume criteria, emergency communications, evidence handling, and the people authorized to make these decisions. This follows the assessment-planning and rules-of-engagement approach in NIST SP 800-115Footnote 85 Sec. 6.5 and Appendix B. The approved plan should cover data sent through inference and telemetry channels, since a permitted connection may still disclose sensitive information.

4.1.3. Review preparation and changes.

The organization should maintain a versioned baseline for the containment configuration and record the images, network interfaces, dependencies, credentials, and services associated with each run. Changes to that baseline should receive security-impact review and renewed checks before execution, consistent with configuration change controlFootnote 86 CM-3 and CM-4. Preparation activities that require external connectivity should be performed separately from the contained run. For example, dependency acquisition should finish before the catalog is frozen and upstream access is removed. An unavailable package during execution should trigger a later preparation cycle, rather than an ad hoc change that opens internet access.

4.1.4. Define supervision and stop conditions.

The run plan should distinguish a blocked out-of-scope attempt from a containment failure. A blocked attempt may be an expected observation in a cybersecurity evaluation; unauthorized connectivity, loss of a required safety control, or inability to establish the deployed state should trigger isolation and suspension. The organization should specify who monitors alerts, how quickly they are escalated, and what automated action occurs when a human cannot respond within the required interval. Where monitoring is required only to score a benchmark, its failure may instead invalidate the result under a documented policy. The stop mechanism should operate outside agent-controlled systems and cover already launched processes and descendant agents.

Stopping model requests alone does not stop commands or services that are already executing.

4.1.5. Prepare and test incident response.

The organization should exercise its response plan before high-risk evaluations, covering containment, investigation, evidence preservation, communication, and recovery.Footnote 87 Exercises should include controller outage, stale safety evidence, unexpected external reachability, and a guest that ignores a stop request. The organization should measure the delay from failure to detection and from detection to confirmed isolation and suspension under the supported workload. Records should distinguish an intervention command from evidence that the intervention took effect. The response should preserve relevant off-host records and identify affected third parties and the applicable notification channels. Evidence collection should not unnecessarily delay urgent containment.

When an agent exceeds its authorized boundary or affects an external system — even if the operating organization itself has not been compromised — the organization should (1) preserve evidence in a store the agent cannot reach; (2) take all reasonable steps to contain the effects; (3) notify affected parties promptly; and (4) coordinate remediation through existing national and sector channels. In Canada, cyber incidents can be reported to the Canadian Centre for Cyber Security.

4.1.6. Control recovery and reuse.

Routine closure should revoke run access, stop controlled execution, and reset or isolate run-specific writable state. Suspected compromise of an enforcement component requires incident recovery and verification before reuse.Footnote 88 Rebuilding target VMs alone is insufficient after suspected host, gateway, or trusted-service compromise. A named owner should approve resumption after the cause has been addressed and the required containment checks have passed. Lessons from incidents and near misses should feed back into the policy, risk assessment, and launch checks.

Example: Cyber-capability Evaluation of AI Agents

A cybersecurity evaluation has a recorded target network, a frozen dependency catalog, a designated inference service, and an execution deadline. The operator confirms that the external stop mechanism works before admitting the run. If a required containment check later fails, the supervisor isolates and suspends the affected VMs, including descendant execution. Restart requires review and fresh authorization; it does not follow automatically from a period integrity checker restoring a firewall rule.

4.2. Containment Attestation Service

4.2.1. Purpose.

A Containment Attestation Service (CAS) automates the decision that an environment satisfies the approved containment conditions before an agent is allowed to act. The AI-driven worm study illustrates this approach using a launch interlock that checks the execution environment and obtains a signed response from a containment service outside the guestFootnote 89. Under the most restrictive posture, admission should require evidence that unauthorized internet access is unavailable, including through other machines and services reachable by the agent. An intended firewall configuration, an operator's assurance, or a prompt stating that the environment is simulated is insufficient to establish that property.

4.2.2. Lessons from recent incidents.

Anthropic's July and September 2026 disclosures describe four incidents in which agents conducting cybersecurity evaluations obtained unauthorized access to real third-party systems. Its investigation attributes the unintended internet connectivity to a configuration error in the outermost containment layer, despite the agents being told that their environment had no internet access.Footnote 90, Footnote 91 These incidents demonstrate a mismatch between the intended containment policy and the deployed environment. A correctly implemented, mandatory launch gate checking the complete reachable environment against a no-egress policy would have refused authorization for these configurations while the live internet path remained available. This prevention claim assumes that the checks cover the relevant network paths and that a trustworthy admission mechanism enforces the launch decision.

The UK AI Security Institute reported a different case: unsanctioned activity during an evaluation in which internet access was deliberately enabled, without a VM sandbox escape.Footnote 92 This distinguishes a configuration that violates its policy from a policy that authorizes excessive access. The most restrictive posture described here would reject that internet-enabled configuration. More generally, attestation can verify compliance with a policy only after the organization has selected an appropriate policy. The Institute's subsequent account describes automated pre-evaluation checks for monitoring and disabled internet access, supporting the use of explicit admission checks.Footnote 93

4.2.3. Admission conditions.

The organization should define a machine-checkable policy for each supported run. CAS should check the running environment against the approved containment policy, using information collected outside the agent-controlled systems. These checks should inspect the firewall rules and routes currently in use, and test whether permitted connections succeed and prohibited connections are blocked. VM and interface identities should be established from trusted host observations, with permitted source addresses enforced at host-controlled virtual ports or equivalent boundaries. Guest-supplied identifiers or an address within the expected subnet should not establish authorization. The checks should cover:

  1. Identity & configuration: the authorized run, current VM and host identities, interfaces and network placement, approved images, device profile, and configuration version.
  2. Effective connectivity: filtering, forwarding, routing, address-family handling, DNS, and access to management, storage, other evaluations, and public destinations.
  3. Intermediary services: isolated proxies and dependency services, frozen catalogs, approved inference destinations and operations, and denial of unauthorized upstream or fallback paths.
  4. Safety controls: current monitoring evidence, controller and periodic integrity checker availability, external isolation and suspension capability, and sufficient resources to sustain these controls.
  5. Validation evidence: representative permitted requests and prohibited requests tested from the actual execution environment, together with the configuration observations supporting the result.

Reachability checks should use organization-controlled destinations and benign requests, without probing unrelated third-party systems. A timeout to one destination does not demonstrate the absence of other outbound paths. Missing, stale, ambiguous, or failed evidence should deny admission. Any approved external inference connection should remain confined to the designated service and operations; it should not authorize arbitrary URL fetching, redirects, or general forwarding.

4.2.4. Protect the authorization decision.

Authorization should apply only to the approved run and checked environment, remain current, and be invalidated by relevant configuration changes or restart. The external controller should maintain the decision in protected state or obtain it through an authenticated channel, rejecting stale or unrelated approvals. The policy, observations, and authorization state should be protected from agent modification and unauthorized changes. Where approvals are transferred as signed tokens, the organization should protect the signing keys and define revocation procedures. Authentication establishes the source of a decision; its assurance depends on the checks and observations supporting it.

4.2.5. Make authorization enforceable throughout execution.

The supported launcher or external controller should require valid authorization before enabling agent execution, supported resumes, and model access. This gate should sit outside the guest so that an agent cannot bypass it by editing its own launch code. Relevant topology or configuration changes should invalidate approval and require new checks. During execution, authorization should be renewed only on fresh evidence, and a separate supervisor should isolate and suspend affected workloads if authorization expires or a required safety condition fails. The supervisor should cover the specified controller-outage cases and continue to enforce the restrictive network state; controls should be fail-closed. An expired token alone does not suspend a VM; cutting off inference leaves already launched code running.

4.2.6. Record evidence and assurance limits.

CAS should record the policy, supporting observations, decision, validity interval, and subsequent renewal or revocation events. Where feasible, accepted records should be protected outside the evaluation host, with host credentials unable to alter or delete earlier records. A compromise before collection can still falsify observations or suppress their delivery. The organization should consequently document the trusted components, evidence freshness, check coverage, and measured stopping interval. Software attestation should not be described as hardware-backed platform attestation unless the run provides and validates that additional mechanism. CAS reduces the configuration errors its checks can detect; host compromise, unexamined interfaces, and common dependencies among controls remain subjects for risk assessment.

Example: Cyber-capability Evaluation of AI Agents

Before the agent starts, CAS verifies its registered VM, network placement, approved service paths, offline dependency catalog, and current safety evidence. If the guest, another reachable target, or the package service has an unauthorized live internet route, CAS withholds authorization and the external launcher keeps execution disabled. Required inference is permitted through a restricted relay whose approved connection does not grant guests general internet access. A later containment failure revokes authorization and triggers external isolation and suspension.

4.3. Cybersecurity Risk Assessment

The organization should assess risk before admitting an agent run and revisit the assessment when its assumptions or environment change. NIST SP 800-30 provides a method for establishing assessment scope, identifying threat events and vulnerabilities, assessing likelihood and impact, communicating results, and maintaining the assessmentFootnote 94 Secs. 3.1–3.4. For agent containment, the unit of assessment should be the complete deployed system: the model, harness, tools, reachable services, enforcement infrastructure, people, and external dependencies.

4.3.1. Identify assets, boundaries, and failure scenarios.

The assessment should identify what is to be protected, who could be affected, and which interfaces connect the experimental environment to those assets. Relevant scenarios include accidental misconfiguration, unintended agent actions, hostile instructions in task data, credential exposure, resource exhaustion, and compromise of a supporting service or virtualization boundary. The good-faith origin of a model does not remove the possibility that it will generate harmful actions or code. The assessment should also cover descendant agents, residual processes, shared services, sensitive data in permitted model requests, and operator privileges.

4.3.2. Assess capability and uncertainty.

The assessment should estimate how likely the agent is to defeat a containment boundary under the conditions of the proposed run. Giving an agent shell access can expose interfaces that restricted tools keep inaccessible, while additional time and compute can let it sustain attempts to find and exploit weaknesses. This judgment should account for both the agent's capabilities and the weaknesses of the systems it can reach. Observed limitations should be recorded with their evidence and the conditions under which they were measured. An unsuccessful escape test, a model's alignment, or the ability to run on one GPU should not be treated as proof that an enforcement component is unreachable or secure. Uncertainty about agent capability, undiscovered weaknesses, and control dependencies should be explicit in the risk conclusionFootnote 95 Sec. 2.3.1, p. 13.

4.3.3. Assess consequences and control dependencies.

The assessment should trace what the agent could reach or change if a containment boundary fails. Compromise of a shared service could expose another evaluation's data or credentials and disrupt its operation; an unauthorized internet connection could put third-party systems at risk. Stopping model inference may leave processes or replicas running, so the assessment should also examine whether the stop procedure ends their activity. Each safeguard should be linked to the failure it constrains and evidence that it works in the deployed configuration. A host firewall and periodic integrity checker that rely on the same kernel could both be disabled by kernel compromise, so they should not be counted as independent protections against that event. Where host compromise is credible, the assessment should examine enforcement and protected evidence outside the affected host. It should distinguish controls that prevent a prohibited action from those that detect it or support a response after it occurs.

4.3.4. Document residual risk and decisions.

For each material scenario, the organization should record the affected assets, boundary crossed, controls and validation evidence, likelihood and impact assessment, uncertainty, residual risk, owner, and treatment decision. The decision maker should compare residual risk with the organization's documented risk tolerance and approve, require further mitigation, or decline the proposed agent runFootnote 96 GV.RM-02 and ID.RA-06. Exceptions should identify their scope, compensating controls, accountable approver, expiration, and reassessment conditions. An exception to the no-egress baseline requires a separate decision about authorized external effects; it should not be introduced by an ordinary operator overriding a failed launch check.

4.3.5. Maintain the assessment.

The rapid advancement of agent capabilitiesFootnote 97 means that controls and risk assessments judged sufficient for one generation may soon be insufficient for the next. For example, an earlier assessment might treat hypervisor compromise as unlikely given the agent's observed capabilities. A later agent capable of finding and exploiting previously unknown vulnerabilities in the hypervisor would require that assumption to be revisited, even if the infrastructure had not changed. Changes to the agent's tools or access, including newly reachable services, should also trigger reassessment. Changes in data handling require a review of what could be disclosed or affected. Newly disclosed vulnerabilities, containment incidents, or failed control checks should trigger a review of the assumptions they challenge. The approved configuration and CAS launch conditions should then be updated to reflect the decision. Evaluation reports should describe the model and harness configuration and the conditions under which the agent ran, consistent with the reporting and qualified-claim practices in the initial public draft of NIST AI 800-2Footnote 98 Practices 3.2–3.3. Execution limits and containment restrictions, such as a finite dependency catalog or active intervention, may affect measured performance and should be reported with the results.

Example: Cyber-capability Evaluation of AI Agents

A target VM deliberately contains a known vulnerability, while the hypervisor and inference relay remain outside the target scope. The assessment examines whether compromise of the target exposes device interfaces, infrastructure credentials, or another outward path. If a new model or tool expands the plausible threat to the trusted boundary, the existing approval is reviewed and additional containment is required where residual risk exceeds the approved tolerance.