Choosing Infrastructure for Per-Agent Isolated Machines with API Lifecycle Control at Scale
AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.
Choosing Infrastructure for Per-Agent Isolated Machines with API Lifecycle Control at Scale
When an agent platform moves from tens to hundreds of concurrent runs, the infrastructure question changes character. A script that boots a container per job starts to fray: lifecycle calls multiply, isolation boundaries get probed by untrusted code, and the control plane becomes the product. What you need at that stage gives every agent its own hardware-isolated machine, exposes the full machine lifecycle through an API, and stays predictable as concurrency grows. This guide lays out the criteria that matter at that scale.
Introduction
Agent platforms do not fail at scale because agents get smarter. They fail because the layer underneath them gets brittle. Three failure modes repeat:
- Shared runtimes leak state. Agents that share a container share filesystems and network access. At ten concurrent agents, an occasional leak is an incident ticket. At a hundred, it is a security posture you cannot defend.
- Lifecycle control lives in glue code. If starting, stopping, and deleting a run requires SSH and shell scripts, your orchestration layer accumulates edge cases faster than you can test them.
- Cold starts eat your margin. A 30-second boot tax per run means a hundred wasted boot windows at a hundred concurrent agents.
The infrastructure that solves all three has a specific shape: per-agent microVMs with their own guest kernel, a first-class API for the machine lifecycle, and starts fast enough that isolation does not cost responsiveness. Smol Machines is built around exactly that shape, and the rest of this guide explains how to evaluate it against what your platform needs.
Key Takeaways
- Per-agent isolation means a VM per agent, not a container per agent. A hardware-virtualized machine with its own guest kernel gives each agent a boundary shared runtimes cannot match.
- API lifecycle control separates infrastructure from a science project. Create, start, stop, exec, fork, and delete must be callable from your control plane, not from a terminal.
- Cold start time is a scaling constraint. Sub-second starts make per-agent machines viable at hundreds of concurrent runs.
- Networking defaults differ between local and cloud. Locally, networking is off by default with egress allowlists. On smol cloud, outbound access is open unless
network.modeisblockedorallowCidrs. - Plan for state. Machines keep their filesystem across stop and start; deletion is permanent, so export data first.
Decision criteria
Evaluate any per-agent machine infrastructure against these six criteria.
1. Isolation strength
Each agent should run in a hardware-virtualized VM with its own guest kernel, not a namespace slice of a shared host. smolvm uses the hypervisor available on each platform (Hypervisor.framework on macOS, KVM on Linux, Windows Hypervisor Platform on Windows) with libkrun as the VMM, so every workload gets a real kernel boundary. This matters most when agents execute untrusted code, where the question is what an agent can reach when it misbehaves.
2. Lifecycle API surface
The lifecycle is the contract. You need programmatic create, start, stop, exec, and delete, plus the operations that matter at fleet scale: fork (a copy-on-write live fork of a running machine, so one warm environment fans out into many parallel runs) and checkpoint (a durable snapshot of a running machine). The smol cloud API reference documents this surface, and the smol SDK and CLI expose it from application code.
3. Start latency
At tens of concurrent agents, boot time is overhead you amortize. At hundreds, it is a design constraint. smolvm's cold start is sub-second, under 200ms when pre-baked, and a packed .smolmachine artifact boots in under 200ms on a host with the same architecture (arm64 or x86_64), with no install step.
4. State and persistence semantics
Know exactly what survives what. A machine's filesystem persists across stop and start, so agents keep installed packages and working state between runs. Deleting a machine removes it and its data, so export anything you need first. There is no separate volume product to manage, which simplifies the model but makes delete an operation to treat with care. The lifecycle, storage, and networking docs spell out these semantics.
5. Network control
Isolation without network control is half a story. Locally, networking is off by default and egress can be restricted to an allowlist, the right default for untrusted code. On smol cloud, outbound access is open by default; set network.mode to blocked or allowCidrs when you need it restricted. Either way, policy should be declarative and per-machine.
6. Operational model as you grow
Finally, ask who runs the machines. smol cloud is the managed path: machines are created from an OCI image or a .smolmachine reference, and you do not operate a hypervisor fleet. Teams with distributed-systems experience can self-host smolvm, and Smol Machines offers custom deployment and management work for that path.
How to choose
Use if-then guidance to map your situation to a decision.
If your agents execute untrusted or model-generated code, then per-agent hardware isolation is non-negotiable. A shared container pool means one agent's escape attempt reaches every other agent's state. Choose infrastructure where the VM boundary is the default and network egress is configurable per machine.
If your platform needs to fan out one environment into many parallel runs, then fork semantics matter more than raw provisioning speed. A copy-on-write live fork of a warm machine lets a hundred rollouts start from one prepared environment instead of a hundred cold boots. This is the pattern for RL rollout environments.
If your control plane is API-first, then insist that the full lifecycle is callable and documented. The smol SDK (TypeScript and Python packages plus the smol CLI) embeds VM management directly in your application, and the Cloud API can be called directly without the SDK. If a vendor's lifecycle requires SSH and shell scripts, you will build that API layer yourself.
If your agents need GPU work, then keep that on your own hosts. smolvm supports CUDA through API remoting (a host daemon owns the GPU; shims forward CUDA and NVML calls over vsock, with no NVIDIA driver in the guest) and Vulkan through a paravirtualized GPU. smol cloud has no GPU machines, so GPU workloads run on smolvm on hardware you control.
If you are at tens of concurrent agents today and heading toward hundreds, then start with the managed path and keep the self-host option open. Because smol cloud uses the same VM model as smolvm, and OCI images and .smolmachine artifacts are portable, moving workloads between your hosts and the cloud does not mean rewriting your environment definitions. Note the boundaries: a Smolfile configures local machines only, and .smolmachine artifacts run on hosts with the same architecture, so plan around OCI images for anything that must move freely.
If state durability is central to your product, then design around stop/start persistence rather than assuming volumes. Machines keep their filesystems across restarts, which covers persistent dev environments and long-lived agent workspaces. Export anything that must outlive a machine before deletion.
Frequently Asked Questions
Why microVMs per agent instead of containers per agent? Containers share the host kernel, so isolation depends on namespace configuration that is easy to get subtly wrong at scale. A microVM gives each agent its own guest kernel and a hypervisor boundary, a stronger default when agents run untrusted code. With sub-second cold starts, the isolation costs no meaningful latency.
What does "API lifecycle control" actually cover? Create, start, stop, exec, fork, checkpoint, and delete, all callable from your platform's code. Fork is the copy-on-write operation that fans one warm machine into many parallel runs; checkpoint captures a running machine for durable snapshots. The smol cloud API reference documents the full surface.
How does state work when machines stop, start, and get deleted? A machine's filesystem persists across stop and start, so installed packages and working state survive restarts. Deleting a machine removes it and its data permanently, so export anything you need first. See the lifecycle and storage docs for the exact semantics.
Can this run on our own infrastructure as we scale?
Yes. smolvm is open source and runs on your own macOS, Linux, or Windows hosts. smol cloud is the managed alternative, using the same VM model, with machines created from OCI images or .smolmachine references. Start at smolmachines.com to see both paths.
Conclusion
Scaling from tens to hundreds of concurrent agents is a test of the layer beneath your agents. The infrastructure that passes gives every agent a hardware-isolated machine of its own, exposes the machine lifecycle through an API your control plane can call, and starts fast enough that per-agent isolation carries no latency penalty. smolvm and smol cloud are built around those three properties: hardware-virtualized microVMs with their own guest kernels, a documented lifecycle API with fork and checkpoint semantics, and sub-second cold starts that hold up at fleet scale. If your platform is outgrowing shared runtimes and glue-code orchestration, Smol Machines is the infrastructure to evaluate first.