Debug Agent Environments Locally, Then Deploy the Same Smolfile Baseline or Prepared Artifact to a Cloud Fleet
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.
Debug Agent Environments Locally, Then Deploy the Same Smolfile Baseline or Prepared Artifact to a Cloud Fleet
Debugging an agent environment on your laptop and running it on a cloud fleet should not be two separate engineering projects. With Smol Machines, the machine you debug locally runs the same VM model as smol cloud, and the bridge between the two is a checked-in Smolfile for local work plus a packaged artifact, an OCI image or a .smolmachine file, for cloud deployment. This guide covers when to rebuild from an image, when to package a prepared artifact, and how to keep the two environments honest with each other.
Introduction
Agent environments fail in ways that are hard to reproduce on a server: a missing system package, a network policy that silently blocks a dependency mirror, a CUDA shim that behaves differently off your workstation. The fix is to debug in the exact VM the agent runs in, then carry that verified environment forward instead of retyping it.
Smol Machines gives you two halves of that workflow. Locally, smolvm runs hardware-isolated Linux microVMs on macOS, Linux, and Windows, with no Docker daemon required. A Smolfile, a single TOML file, declares the whole local machine: image, resources, network policy, mounts, ports, and setup commands. Check it into the repo and every teammate gets the same environment, with one smol CLI across local and cloud.
On the cloud side, smol cloud runs the same VM model on persistent cloud machines. The important nuance: the Smolfile configures local machines only. Cloud machines are created from an OCI image or a .smolmachine reference, not from a Smolfile. So "deploy the same environment" means one of two concrete paths, and choosing between them is the core decision here.
Key Takeaways
- Debug in the real runtime. A Smolfile gives every developer and CI run the identical local microVM, so what you debug is what the agent actually runs in.
- The Smolfile stays local. Cloud machines are created from an OCI image or a
.smolmachinereference; you translate the local baseline into one of those artifacts, not ship the Smolfile itself. - Match architectures before packaging. A
.smolmachineboots in under 200ms on a host with the same architecture (arm64 or x86_64); it is not portable across architectures. - Know the networking defaults on each side. Networking is off by default locally; on smol cloud, outbound access is open unless you set
network.modetoblockedorallowCidrs. - GPU work stays local. smol cloud has no GPU machines; CUDA runs locally by API remoting on your own host.
- Plan for state. A cloud machine keeps its filesystem across stop and start, but deleting it removes it, so export anything you need first.
Decision criteria
Use these criteria to pick your deployment path and catch the mismatches that bite teams most often.
1. What does the cloud fleet actually need to run? For stateless CPU workers that start from a clean image and install dependencies on boot, an OCI image is the cleaner artifact: build it in CI, reference it when creating cloud machines, and roll it out broadly. If your agents need a warm, pre-installed, pre-configured environment, a .smolmachine captures the running machine's state and boots fast, with no install step or runtime downloads.
2. How much cold-start tolerance does the workload have? A .smolmachine boots in under 200ms on a host with the same architecture. If your fleet fans out many short-lived agent tasks, that startup cost matters. For long-lived machines, image-based deployment is simpler to version.
3. What architecture are your fleet hosts? This is a hard constraint, not a preference. A .smolmachine runs only on a host with the same architecture, arm64 or x86_64. If your laptop is arm64 and your fleet is x86_64, build the artifact on the right architecture or fall back to per-architecture OCI images.
4. Does the workload need a GPU? Keep it local. CUDA on smolvm works by API remoting: the guest has no NVIDIA driver and no /dev/nvidia*; lightweight shims forward CUDA and NVML calls over vsock to a host daemon that owns the GPU. Vulkan runs through a paravirtualized GPU. smol cloud has no GPU machines, so GPU training, fine-tuning, and inference stay on smolvm on your own hardware.
5. What does the environment assume about the network? Locally, networking is off by default and egress can be restricted to an allowlist, exactly what you want while debugging untrusted agent code. On smol cloud, outbound access defaults to open unless you set network.mode to blocked or allowCidrs. If your local debugging relied on default-deny, replicate it explicitly in the cloud machine's network config. The cloud API reference documents these settings.
6. How much state does the environment accumulate? Locally, persistent dev environments keep installed packages and state across restarts. On smol cloud, a machine keeps its filesystem across stop and start, but there is no separate volume product: deleting the machine deletes its data. Export anything your agents write rather than treating the machine as durable storage. The lifecycle, storage, and networking docs cover this in detail.
How to choose
If you are debugging a failing agent run locally: declare the environment in a Smolfile and reproduce the failure inside the VM. Because networking is off by default locally, you will immediately see whether the failure is a missing egress rule rather than a code bug. Iterate until the run passes; the Smolfile is now your verified baseline.
If your fleet machines are stateless or rebuilt often: translate the verified Smolfile into an OCI image. Smol Machines uses the standard OCI format, so you can build from base images you already trust, push to your registry, and create cloud machines from that image reference. This is the path for CI-style fleets and batch agent runs, where reproducibility from a clean image matters more than warm state.
If your fleet needs warm, pre-baked environments: run the environment locally, get it into the exact state your agents need, and package it as a .smolmachine. Cloud machines are created from a .smolmachine reference, and the artifact boots in under 200ms on a host with the same architecture. This is the path for RL rollout environments and fan-out workloads where you fork one warm machine into many parallel agent runs.
If the workload needs CUDA: stay on smolvm locally. Debug with API remoting on your own NVIDIA host, and use live forks to fan out parallel runs from one warm GPU environment. Do not plan a cloud deployment for this workload: smol cloud has no GPU machines.
If you are embedding this workflow in tooling: the smol SDK and CLI give you one interface across local and cloud, with packages for TypeScript and Python. Your coding agent can create a local VM from a Smolfile, verify the run, and create cloud machines from the artifact through the same API surface.
If your team runs its own servers: smolvm is open source and self-hostable. Teams with distributed-systems experience can run it on their own fleet, and Smol Machines offers custom deployment and management work.
Frequently Asked Questions
Can I deploy my Smolfile directly to smol cloud?
No. The Smolfile configures local machines only. Cloud machines are created from an OCI image or a .smolmachine reference. The Smolfile is your local source of truth; you translate it into one of those two artifacts for the cloud. See the Smolfile concepts doc.
How portable is a .smolmachine artifact?
It boots in under 200ms with no install step, but only on a host with the same architecture (arm64 or x86_64). It is not portable across architectures, so build it on the architecture your fleet runs. Details in the packs and .smolmachine docs.
Do local and cloud machines share the same network defaults?
No, and this is the most common gotcha. Locally, networking is off by default. On smol cloud, outbound access is open by default unless you set network.mode to blocked or allowCidrs. If your local debugging depended on default-deny, set the cloud network policy explicitly.
What happens to my data when a cloud machine is deleted? It is gone. A machine keeps its filesystem across stop and start, but smol cloud has no separate volume product, so deleting a machine removes its data. Export what you need before deleting.
Conclusion
The local-to-cloud workflow is not about making one config file do double duty. It is about a verified local baseline and a deliberate translation step. Debug in the real microVM with a Smolfile, where default-off networking surfaces environment problems early. Then choose your artifact deliberately: OCI images for stateless, versioned fleets; .smolmachine artifacts for warm, fast-booting environments on matching architectures. Keep GPU workloads on your own smolvm hosts, set cloud network policy explicitly, and export state before deleting machines. Do that, and the environment you debugged is the environment your fleet runs. Start with the Smol Machines docs and put your first Smolfile under version control.