Your coding agent runs its code in Modal Sandboxes today, and you want it on Solari. Moving it takes three steps: rebuild your Modal Image as a Solari template, swap Sandbox.create and sb.exec for Solari's create and commands.run, then move your volumes and snapshots.
The move matters now because code execution has become a standard agent tool. OpenAI added native sandbox support to its Agents SDK, and Anthropic shows agents handling more tools with fewer tokens by writing code. This guide maps each Modal concept to Solari, walks through the code side by side, and covers what changes for your agents.
Why Teams Move Agent Sandboxes Off Modal
Teams move Modal sandboxes to Solari once the sandbox does most of the agent's work instead of a side task. Modal is a serverless platform built around functions and GPU jobs, and its Sandboxes are one product on it. An agent that runs code all day needs a machine that starts instantly, keeps its state and costs little to leave open.
Three things usually start the search. Modal bills its sandboxes at non-preemptible rates, above the list price of its functions. Modal caps each sandbox's lifetime and recommends saving a filesystem snapshot and restoring it into a new sandbox for longer runs. And Modal runs most sandboxes on gVisor, a userspace kernel, with a separate VM runtime for workloads that need a full Linux kernel.
Solari answers all three with one design. Every Solari sandbox is a microVM with its own kernel by default, it pauses instead of terminating when idle, and it resumes with its memory and processes intact.
How Do Modal Concepts Map to Solari?
Every Modal sandbox call has a direct Solari equivalent, so most migrations change only the lines that create, run and release a sandbox.

The biggest change is the lifecycle. On Modal a finished sandbox is gone; on Solari an idle sandbox pauses, and resume() brings it back exactly as it was.
How to Migrate From Modal to Solari, Step by Step
The migration is a code change, not a rewrite. Run these steps in order and keep Modal live until the last one.
One key. Run
pip install solari-sandboxand exportSOLARI_API_KEY. The same key works for Solari browsers, sandboxes and desktops, so an agent that also browses the web needs no second vendor.Templates. A Modal Image built with
pip_installbecomes a Solari template built withaptInstall,pipInstallandrunCommands, or straight from a public image on Docker Hub or GHCR. You build it once, and every sandbox starts with your tools already installed.Create and run. Replace
modal.Sandbox.createwithclient.create,sb.execwithsb.commands.runandsb.terminatewithsb.kill. For Python snippets that should remember variables between calls,run_codekeeps state the way a notebook does.Idle policy. Modal terminates a sandbox at its timeout or idle timeout. Set
idle_timeout_mson Solari and an idle sandbox pauses instead, so a long-running agent picks up where it stopped rather than rebuilding its environment.Volumes and snapshots. Recreate each Modal Volume as a Solari volume and mount it at the same path; data written there outlives the machine. Where you used Modal's filesystem snapshots, take a Solari snapshot, which saves disk and memory while the sandbox keeps running.
Cutover. Route a share of agent jobs to Solari behind a flag, compare outputs and cost for a week, then switch the rest. Rolling back is a flag change.
Here is the same job on both platforms. On Modal:
On Solari:
No App object is needed on Solari: the template id and your key are enough.
What Role Does Solari Play?
Solari is the infrastructure your coding agent runs on: sandboxes, cloud browsers and desktops from one API. Your agent brings the model and the logic; Solari gives it a fast, isolated machine for every task.
Fast starts. Every Solari sandbox starts from a memory snapshot instead of booting, so it is live in milliseconds. Your agent runs code the moment the model asks for it.
Isolation. Each sandbox runs as a hardware-isolated microVM, and the hardened tier blocks all outbound network. Untrusted, agent-written code never shares a kernel with another customer's code.
Pause and resume. Pause saves memory and processes, and resume brings the sandbox back exactly as it was. A stopped sandbox keeps its files, so your agent's work is never lost to an idle timer.
Forks. Install everything in one sandbox, snapshot it, then start as many ready copies as you need with
fromSnapshot. Test runs reset to a clean state withrevert.Fleets. With Solari you can run up to 100,000 sandboxes at once, so you can fan an evaluation or a data job out across thousands of machines.
Code is only part of most agent jobs. Solari cloud browsers keep logins across runs, and Solari desktops give computer-use models a full Linux screen, all on one account and one bill. More on the platform is in the Solari launch post.
It also costs less to run. A 4 vCPU, 8 GB Solari sandbox costs less per hour than the same size on Modal at list price.
What Comes Next for Agent Sandboxes?
Over the next year, the sandbox stops being a place to run one snippet and becomes the agent's workspace:
Longer lives. Agents will keep a machine across a whole project, pausing between tasks, so lifetime caps and rebuilds will matter more than raw compute rates.
Forks as reasoning. An agent will snapshot its machine, try three fixes in three forks and keep the one that passes the tests.
Code, web and screen. One agent will run code, read a site in a browser and operate a desktop app in the same job, on the same account.
Isolation by default. As more agent-written code reaches production systems, a dedicated kernel per task will become the baseline buyers ask for first.
What stays human is the judgment: which tasks an agent may run unattended, which code reaches production, and who reviews it. The teams that win will spend their engineers there and hand the machines to agents.
Get Started With Solari
Start with one agent's code-execution step, such as the tool that runs tests or analyses a file, and move it to Solari behind a flag. Modal is the more established platform with a wider serverless and GPU toolkit; Solari is the younger company and moves faster on speed and price. Solari is the fastest and cheapest way to run cloud browsers and VMs for coding agents. Get started with a free account and start running your agents today.
