Running AI agents in sandboxes vs. isolated VMs with full desktops what's your setup?

Posted by Different-Degree-761@reddit | LocalLLaMA | View on Reddit | 7 comments

I've been experimenting with different ways to give AI agents access to a real computer (not just code execution) and wanted to share what I've found.

The problem: Most agent sandboxes (E2B, containers, etc.) work fine for running Python scripts, but they break down when your agent needs to:

What actually works: Giving the agent a full Linux desktop inside an isolated VM. It gets a real OS, a screen, a file system, persistence and the isolation means it can't touch anything outside its own workspace.

Three approaches I've looked at:

  1. DIY with QEMU/KVM Full control, but you own all the infra (image management, VNC, networking, cleanup)
  2. Cloud VMs (EC2/GCE) Isolation out of the box, but slow to provision and no built-in screen capture for Computer Use
  3. Purpose-built platforms Sub-second provisioning, native Computer Use API, persistent workspaces

For those running agents that need more than code execution what's your isolation setup? Anyone else moved from sandboxes to full VMs?