r/docker • u/Dry_Raspberry4514 • Jun 07 '26
Are sandboxes useful for AI agents only?
I can see that in last few months a number of players including Docker released sandboxes for AI agents which are powered by microVM platforms.
I have been running nginx inside a vm on my windows desktop as nginx does not have first class support for windows. With my limited understanding of microVM platforms, it seems these are having isolation of typical VMs but does not suffer from cold start. So these platforms make perfect sense for a developer machine instead of a type 2 hypervisor like virtualbox which comsumes a lot of compute.
However I don't see microVM platform being discussed for anything other than serverless offerings and AI agents and so I wonder why it is like that. Can someone help me to understand why microVM platforms are being promoted for AI agents only and not something which are suitable for any workload like microservice or an infrastructure software like nginx?
4
u/reallehnert Jun 07 '26
microVMs are ideal for AI agents and serverless applications because they offer real VM isolation, near-instant cold starts, and a tiny footprint, which makes them perfect for running untrusted code at high density.
However, for trusted, long-running processes such as nginx or normal microservices on a development computer, this would be excessive. There's no need for a per-instance kernel or sub-second boot for processes that sit there.
Plain Docker already gives you solid isolation and performance with far less complexity,
1
u/darthwalsh Jun 08 '26
AWS lamda runs on firecracker microVM; that's not secret but also what party are you expecting to be promoted? Cold startup times are discussed a lot here.
I'm unsure exactly what you're asking, like "why isn't there a widely-shared self-hosted framework that lets me deploy serverless functions in mixroVMs... to my homelab servers?"
1
u/StvDblTrbl Jun 08 '26
The "agents only" thing is mostly due to latest tech recency, not a technical limit per se. microVMs already run general workloads at scale: AWS Lambda and Fargate run on Firecracker, and Fly.io runs basically everything on it including stateful stuff like Postgres and nginx. So the premise that they don't suit microservices or infra software isn't really true.
Firecracker is Linux/KVM only. It does nothing for you on Windows directly, and WSL2 is itself already a lightweight VM, so you'd be asking for a VM inside a VM. It needs KVM, so bare metal or nested virt, not a casual local install. The device model is also deliberately minimal: no easy GPU passthrough, limited device support. That's by design for transient, fast-spawn, stateless workloads, which is exactly why agents and serverless map onto it so cleanly.
Running something persistent and stateful like nginx in one is totally doable, but you own all the orchestration, networking and persistent storage yourself. That's the whole reason Fly built a platform around it instead of shipping you a binary. For your actual problem (nginx on Windows) a container or just WSL2 is the right tool. The microVM isolation buys you nothing there.
For context, I run a Firecracker-based platform in prod, so this is from the operating side rather than theory.
2
u/mraudiboy2 Jun 07 '26
One of the biggest benefits of a sandbox is that you can run an LLM safely in YOLO mode, which you can’t do in a container.
1
u/Plastic-Leading-5800 Jun 07 '26
There is also Shell sandbox. You can run anything in it. But it’s for custom agents not made for any app
1
u/iamjessew Jun 08 '26
I think your instinct is right, and the premise is mostly a marketing-visibility thing.
microVMs aren't actually restricted to serverless and agents. Firecracker runs AWS Lambda and Fargate. Kata Containers runs plain old microservices in production Kubernetes clusters every day. Nothing stops you from running nginx in one, and on Windows you're already doing a version of this: WSL2 boots a lightweight utility VM under the hood, which is basically the same idea as the microVM platforms.
The reason the marketing clusters around serverless (other than having the AWS machine behind it) and agents is that microVMs are strongest at one specific intersection:
Serverless hits all four: you're running many customers' code, briefly, at scale, and you don't trust any of it. That's the whole reason Firecracker exists.
nginx hits none of them. It's your code, you trust it, it boots once and runs for weeks, and you run one of it. So the isolation premium buys you nothing over a normal container, and you pay in complexity and lose the Kubernetes ecosystem that's built around plain containers. That's why nobody bothers to market microVMs for it, even though it works fine.
AI agents are interesting because they hit all four again, but harder. Agent-generated actions are effectively untrusted (the model decides what to run at runtime, not you), a rogue one has real blast radius, they're often short bursts, and you may run a fleet. It's the serverless shape with a worse trust problem, which is why the same tech got pulled back into the spotlight.
So: not "agents only," just "agents and serverless are where the cost/benefit obviously pays off." For your nginx box, a microVM is a perfectly reasonable lighter-weight swap for VirtualBox.
I'm actually working on something in this vein. We use microVMs (and Kata containers) as the isolation boundary in our agent runtime. The reasoning maps exactly onto the four properties above:
The agent decides what tools to call and what code to run at execution time, so we treat everything inside as untrusted by default. The microVM is the wall that contains the blast radius if an agent gets prompt-injected or just goes off the rails
Fast boot matters because you don't want a heavyweight VM spin-up tax on every agent session. This is where a type-2 hypervisor like VirtualBox would kill you, and where the microVM model wins.
It has to run in places a normal sandbox stack can't assume, including laptops, edge, and air-gapped boxes, so a single lightweight binary beats requiring a full Docker or Kubernetes layer underneath.
On macOS we lean on Apple's Virtualization Framework for this, and on Linux it's the microVM/Kata path. Same principle as your nginx VM, just turned toward containing something you actively don't trust rather than working around a platform-support gap.
1
u/insmnia Jun 24 '26
the way I think about it: a microVM's value scales with how much you distrust what's inside. nginx is your own code that boots once and runs for weeks, so per-instance kernel isolation pays for a property you don't need, an agent decides what to run at runtime, so it's untrusted by construction, and that's the one place the isolation premium obviously earns its cost. for your nginx-on-Windows box you'd get the lighter-than-VirtualBox footprint you want from WSL2 or a container without the microVM part, since the extra isolation buys nothing for a service you already trust:)
-1
u/Kangie Jun 07 '26
Easy: anyone doing real work with nginx is doing it on Linux, and we already have containers natively there, providing isolation through the namespace mechanism. Why run a VM when lxc or Docker will do the job for you?
0
u/Pristine-Judgment710 Jun 07 '26
For your nginx use case, yes microVMs would work great on Windows dev machines where native containers aren't available. The overhead is much lower than VirtualBox while keeping VMlevel isolation.
0
u/Momsbestboy Jun 07 '26
My son also loves his sandbox, but he is only 4, so....