Table of Contents
- microVM vs container: What is the actual difference?
- When a container sandbox is the right fit
- What gVisor changes, and what to test
- When a full VM is worth choosing
- Compare cost per useful workload
- Persistence, snapshots, and startup need separate checks
- Agent37 supports containers and full VMs
- A practical way to choose
- Frequently asked questions
- Is a microVM the same as a container?
- Do all AI agents need a full VM?
- Are containers always cheaper or faster?
- Does Agent37 support both options?
Do not index
Do not index
For many AI agents, a sandboxed container is an efficient, affordable place to run. A full VM becomes useful when the workload needs its own Linux kernel, broader system compatibility, or a VM isolation boundary. The practical answer to microVM vs container is to choose the environment your agent actually needs. Agent37 supports both gVisor-based container sandboxes and full VM sandboxes, so you can make that choice around your workload.
An agent that calls models, edits files, and runs ordinary scripts has different requirements from one testing kernel-dependent software. Paying for capabilities the first agent never uses adds cost. Trying to squeeze the second into an incompatible runtime adds debugging time.
Here is how to choose, including where microVMs fit, what gVisor changes, and how to compare the bill.
microVM vs container: What is the actual difference?
A conventional Linux container packages an application and its dependencies while sharing the underlying Linux kernel. A virtual machine runs a guest operating system with its own kernel. Docker's container overview explains that distinction and also shows why containers and VMs can be used together.
A microVM is a kind of VM, optimized to reduce the machinery needed to run a workload. It still has a guest kernel. Firecracker, for example, uses KVM and a deliberately small virtual device model. See the Firecracker project for its architecture.
A full VM generally offers a more conventional machine environment. The precise difference depends on the provider: device support, administrative access, operating systems, and supported configurations vary. A provider calling something a full VM does not automatically promise nested virtualization or any kernel you choose.
Then there is gVisor. It adds an application kernel between a containerized workload and the host. That changes the isolation model substantially compared with an ordinary container runtime. Treating every container sandbox as plain Docker misses an important part of the decision. The gVisor architecture overview describes how it mediates application system calls.
Environment | Main architectural distinction | Useful starting point |
Conventional container | Applications share the underlying Linux kernel | Controlled application workloads with suitable surrounding protections |
gVisor sandbox | An application kernel mediates access to host services | Agent scripts, tools, and compatible Linux applications |
MicroVM | A guest kernel runs inside a minimal virtual machine | Workloads needing a VM boundary with a compact machine model |
Full VM | A guest kernel runs in a broader machine environment | Workloads needing supported system features beyond the container runtime |
These are architectural categories, not a ranking from cheap and bad to expensive and good. Match the environment to the job, then compare the implementation and price.
When a container sandbox is the right fit
Start by listing what your agent does after receiving a request.
Does it call an LLM, fetch data from an API, write files, execute Python, or run a Node application? Does it clone a repository, change code, and run a normal test suite? Those are good candidates for a sandboxed container, subject to dependency compatibility.
Consider an agent that prepares a daily sales report. It retrieves records, transforms a CSV, calls a model, and saves the result. A separate guest Linux kernel does not inherently improve that workflow. Reliable execution, persistent files, suitable access controls, and a sensible bill matter more.
The same reasoning applies to a coding agent working in a supported application stack. Needing a shell, installing packages, or running a local development server does not by itself require a VM.
Container sandboxes are especially worth evaluating when:
- Your software uses ordinary Linux application interfaces.
- Your agent spends substantial time waiting for model or tool responses.
- You want separate workspaces for separate agents or customers.
- You need to keep the cost of retained workspaces manageable.
- Your workload passes realistic compatibility and performance checks.
Our recommendation is to evaluate the container option first when it meets your isolation requirements and runs your stack correctly. A low fixed resource footprint can help make that choice economical, but the provider's actual rates and billing rules decide what you pay.
What gVisor changes, and what to test
With gVisor, the application interacts with a sandbox-specific implementation of Linux interfaces. It does not directly make arbitrary system calls against the host kernel in the same way as a conventional container. That extra boundary is why gVisor deserves its own line in a sandbox comparison.
There are tradeoffs. gVisor does not implement every Linux interface, and compatibility depends on the application. Check its application compatibility documentation for relevant limitations, then test the versions you deploy.
Performance is also workload-dependent. The gVisor performance guide explains the additional costs of system-call handling, networking, and filesystem operations. A workload dominated by those operations deserves closer measurement than one mostly waiting on a remote model response.
Run your agent's actual setup and task sequence: install dependencies, start its tools, execute a representative job, and inspect failures. If a build is slow, measure where the time goes before assuming that all containers, or all VMs, behave the same way.
The useful question is whether this runtime supports your application reliably at the performance you need.
When a full VM is worth choosing
A VM is a strong candidate when you can name a requirement that the container sandbox cannot satisfy.
You need specific kernel behavior. Low-level systems work, kernel-dependent tooling, and software requiring interfaces absent from the sandbox may need a guest Linux kernel. Confirm that the VM product exposes the permissions and kernel configuration your task requires.
Your environment needs machine-level setup. Some development or testing workflows assume control over services, mounts, networking, or other operating-system facilities. A suitably configured VM can be a better match. Administrative access and supported operations remain provider-specific.
Your security requirements call for a VM boundary. Some teams explicitly require hardware virtualization between workloads. Use that requirement as a selection criterion, then evaluate the platform's full security design. The label alone does not describe its network controls, patching, or handling of credentials.
You have measured a compatibility or performance problem. If the container runtime blocks an essential dependency, or a VM completes your real workload more reliably at an acceptable total cost, that is a concrete reason to choose it.
Imagine an agent validating a repository that depends on unusual Linux features. If its test environment cannot run those features, a cheaper hourly rate is irrelevant: the job cannot finish. Paying for a compatible VM is the economical choice when it removes that blocker.
A VM is still not an automatic answer to every advanced feature. Verify requirements such as nested virtualization, custom kernels, GPU access, or privileged networking before selecting a particular offering.
Compare cost per useful workload
Architecture influences resource use, but it does not determine a provider's price. A container service can be expensive. A VM service can be competitive. Compare equivalent resources and the way your agent actually runs.
Use four questions:
- What do CPU, memory, and retained disk cost?
- Do you pay while the environment is awake but idle?
- What remains billable when it stops or sleeps?
- Which costs sit outside hosting, such as models, tools, or networking?
As checked on October 10, 2026, Agent37's published standard sandbox pricing is $0.80 per vCPU, $0.70 per GB of RAM, and $0.09 per GB of disk per 730-hour month, metered by the minute.
A standard container sandbox with 2 vCPU, 4 GB RAM, and 4 GB disk therefore totals $4.76 for 730 running hours. Retaining that disk for the same period while stopped or sleeping costs $0.36. An awake instance still incurs compute charges when its CPU is idle. Model and tool usage is separate.
Those figures describe the standard container configuration; use the current quote for your selected full VM configuration when comparing the two.
For an intermittently used agent, sleep behavior may matter more to the bill than a small startup difference. For a busy coding agent, task duration and reliability may matter more than either. Measure successful work completed within your latency budget.
For a broader buying comparison, see our guide to sandbox providers and costs.
Persistence, snapshots, and startup need separate checks
A container can retain a workspace when the platform provides persistent storage. A VM can lose its workspace when the platform deletes its disk. Architecture alone does not tell you what survives a restart or how long a session can run.
Ask what the product preserves: files, installed dependencies, running processes, or memory state. These are different promises.
A disk snapshot is not the same as resuming a paused process. Firecracker's snapshot documentation distinguishes VM state and memory from the disk resources needed to restore a machine. A managed service must define how it handles those pieces.
Likewise, a VM boot measurement is not an agent-ready measurement. Your user waits for the runtime, dependencies, credentials, and application to be ready. Compare that complete path.
Before committing, test a cold start, a warm start, and a restart after saving work. If the product offers sleep, test wake behavior too. A short test using your own agent is more useful than assuming an architecture guarantees instant startup or complete persistence.
Agent37 supports containers and full VMs
We offer both gVisor-based container sandboxes and full VM sandboxes because agent workloads have different requirements.
Choose the container option when you want an affordable environment for compatible agent workloads. Choose a full VM when its isolation boundary or supported system capabilities better fit your application. You can make that choice within Agent37.
For the container path, our create an instance documentation explains the API, templates, resource settings, and optional auto-sleep. Use it as the starting point for provisioning an agent environment.
For workloads that need a full VM, choose Agent37's VM offering and confirm the configuration against your requirements. Container resource settings and prices should not be treated as a specification for every VM option.
We recommend testing one representative task before expanding to a fleet. Check that dependencies install, tools run, files survive the lifecycle you need, and the bill matches your usage. That gives you evidence for the choice before you multiply it across customers.
A practical way to choose
Write down three things before comparing providers: the task your agent must finish, the system features it requires, and the isolation boundary your application needs.
If a gVisor container satisfies all three, compare its cost and reliability against the alternatives. If it fails a necessary requirement, evaluate a VM that supports it. Keep the decision tied to a reproducible task.
For example, run the same repository checkout, dependency installation, test suite, and artifact save on each candidate. Record time to readiness, completion time, errors, and billed resources. Repeat with the workspace already prepared so you understand both first-run and everyday behavior.
This makes the tradeoff tangible: you are selecting an environment that finishes your work at an acceptable cost. You can also use different environments for different jobs rather than forcing every agent into one configuration.
Frequently asked questions
Is a microVM the same as a container?
No. A microVM runs a guest kernel inside a lightweight virtual machine. A conventional container shares the underlying kernel. A gVisor container uses an additional application-kernel boundary, making it a distinct sandboxing approach.
Do all AI agents need a full VM?
No. Many agents use standard application runtimes, model APIs, and ordinary file operations. A compatible sandboxed container can serve those needs. Choose a VM when your workload or security requirements justify it.
Are containers always cheaper or faster?
No. Compare published rates and measure your application. Resource allocation, idle billing, storage, compatibility, and workload behavior all affect the result.
Does Agent37 support both options?
Yes. Agent37 supports gVisor-based container sandboxes and full VM sandboxes. Start with your workload's requirements, then choose the environment that fits.
Ready to run your agent? Explore Agent37 Cloud and use the instance creation guide to get started. Use an affordable container where it fits, with the full VM option available for workloads that need it.
