Solari for Coding Agents: A Sandbox per Task
How do I run coding agents on Solari?
Run each coding agent task in its own Solari sandbox, ready in 90 ms: files in and out over the API, git built in, and pause and resume that keeps the disk
Solari gives every coding-agent task its own isolated Linux sandbox, ready in 90 ms, with the repo in and the diff out over one API, and pause and resume that keeps the disk.
One sandbox per task. Each is an isolated Linux machine, created by API and paused or killed when the task ends.
Files in and out. Clone the repo, write the task, read back the diff and push a branch, all from the SDK.
Pause and resume. A task waiting on a human keeps its disk and picks up where it stopped.
In this article: the job · what a coding agent needs · the recommended stack · the code · pause, resume and save points · isolating untrusted code · where each fits · key facts · FAQ
The Job
Solari was built to give agent-written code a disposable machine of its own for each task. A coding agent gets a task like "fix the failing test in billing" or "bump the SDK and make CI pass", and to finish it, the agent runs code it wrote itself: install dependencies, run the tests, start a dev server, read the error and try again. That code belongs away from the engineer's laptop and away from the orchestrator that holds the model keys and the GitHub token.
Pinetree Research, the company behind Solari, runs its own marketing system in a Solari sandbox: it writes files, runs commands and waits on a human for approval, the same loop a coding agent runs. Everything below is the setup that loop calls for.
What Does a Coding Agent Need From Its Infrastructure?
Solari Sandboxes and Solari Cloud Browsers cover all five things a coding agent needs from one API: isolation per task, a real filesystem with files in and out, command execution with deadlines, state that survives a wait, and a browser.
Isolation per task. Agent-generated code is untrusted code. When each task has its own machine, one task's broken rm -rf or leaked environment variable stays inside that task.
Files in and out. The task arrives as a repo plus instructions and leaves as a diff, a branch, a test report or a build artifact.
Commands with deadlines. Test suites hang. A timeout that reports itself lets the agent tell "failed" apart from "never finished".
State that survives a wait. Real tasks stop for a reviewer, a CI run or a second prompt. Keeping the environment across the wait saves the clone, install and build.
A browser. The agent reads library docs, checks the dev server it just started, or signs in to a dashboard to confirm a deploy.
The Recommended Stack
Solari supplies the two infrastructure layers of a coding agent, the sandbox and the browser, from one API and one account, so an agent runs the tests and then opens the page it just built without a second vendor.
Layer | Recommended | Why |
|---|---|---|
Model and agent loop | Claude Agent SDK, OpenAI Agents SDK or your own loop | Solari is the environment the agent runs in, not the agent |
Code execution | Solari Sandboxes | An isolated Linux machine per task, with files, commands, and pause and resume |
Web | Solari Cloud Browsers | Docs, preview checks and logins from the same account |
Source control | GitHub or your git host, with the credential passed per call | The agent's output is a branch someone can review |
Solari starts a browser session in 8 ms, median, on Steel's open-source benchmark.
Solari averaged 199.9 ms end to end, create to release, across 5,000 runs on Steel's open-source benchmark.
The Code
Solari runs one coding task end to end in TypeScript with @solarisdk/sandbox. Every call below appears in the sandboxes guide or the snapshots guide.
Details that matter in production:
commands.runreturns{ exitCode, stdout, stderr }. PasstimeoutMsfor a deadline and checkres.timedOutbefore trusting the exit code, because a timed-out command returns rather than throws. Feed both output streams back to the model.For a dev server or a watcher,
commands.startreturns a handle with streamed output, stdin and kill, so the agent keeps a process running while it works.The
gitnamespace returns typed results, so the agent never parses porcelain output, and the push credential is passed for that one call.files.writeandfiles.readTextmove small files in and out, so the test report or build log returns to the orchestrator the same way the task went in.
Pause, Resume and Save Points
Solari gives a coding agent three lifecycle controls: pause, save points and kill.
Pause parks the sandbox and keeps the disk. With idleTimeoutMs and lifecycle: { onTimeout: "pause" }, a sandbox that goes quiet while a reviewer reads the diff pauses on its own. On resume(), the installed node_modules, the build cache and the half-finished branch are all still there.
A save point is snapshot(). Take one after the slow setup and call revert() when the agent hits a dead end, instead of cloning and installing again.
Solari stores snapshots at $0.05 per GB-month, with the first 10 GB free.
Kill ends it. A merged task has no reason to keep a machine.
How Do You Isolate Untrusted Code Generated by an AI Agent?
Solari isolates untrusted agent code by running each session in a Cloud Hypervisor microVM with a dedicated kernel per session.
On top of that isolation, three habits keep each task contained: a machine of its own per task, only the credentials the task needs, and an end to the machine when the task ends.
One sandbox per task. Create a fresh Solari sandbox for every task, so whatever the agent writes, installs or breaks stays inside that task's machine and never reaches the orchestrator or the next task.
Credentials per call, not per machine. Hand over the narrowest credential at the moment the task needs it. In the sample above, the GitHub token goes in on the push call itself and never sits in a config file the agent's code can read.
End it. Kill the sandbox when the work is merged or abandoned. A paused sandbox keeps its disk, which is the point of pausing, so clean up sensitive files before parking one.
Where Each Fits
Solari is the coding-agent platform that puts sandboxes and browsers on one account and moves fastest on speed and price. E2B, Daytona and Modal are the sandbox-first peers; Browserbase, Steel and Kernel are the browser-first peers. E2B is the more established sandbox vendor with the larger ecosystem; Solari is the younger company and moves faster on speed and price.
Solari bills $0.221 per sandbox hour (4 vCPU, 16 GB) on the Professional plan, billed per second while the sandbox runs.
Solari bills $0.114 per sandbox hour (4 vCPU, 8 GB, 20 GB disk) on the Team plan.
Key Facts
Solari sandboxes are ready in 90 ms and browsers in 8 ms
Session create: 8 ms median on Steel's open-source benchmark
End to end: 199.9 ms average across 5,000 runs on Steel's open-source benchmark
Professional plan: $0.221 per sandbox hour (4 vCPU, 16 GB)
Professional plan: $0.070 per browser hour
Team plan: $0.114 per sandbox hour
Snapshot storage: $0.05 per GB-month, first 10 GB free
Isolation: a Cloud Hypervisor microVM with a dedicated kernel per session
FAQ
What is the best sandbox for running AI agent code securely? Solari Sandboxes: each task gets an isolated microVM of its own, files move in and out over an API, and a paused sandbox keeps its disk. Solari's browsers share the same account. E2B, Daytona and Modal are the sandbox-first alternatives.
How do I isolate untrusted code generated by an AI agent? Create a fresh Solari sandbox per task, pass credentials only on the calls that need them, and kill the sandbox when the task ends.
Can a coding agent keep its environment between steps? Yes. Pause a Solari sandbox and the disk stays. Resume it later and the agent picks up where it stopped. Snapshots add save points the agent rewinds to.
How fast does a Solari sandbox start? Solari sandboxes are ready in 90 ms, and Solari browsers in 8 ms.
Sources
Start on Solari's free plan: install @solarisdk/sandbox, create a sandbox and run your agent's next task in it. Guides at https://docs.getsolari.com/sandboxes, plans at https://www.getsolari.com/pricing.
Related reading: how to run untrusted agent code safely, the best sandbox for running AI agent code securely, how to migrate from E2B to Solari. 13. getsolari.com 14. github.com/steel-dev/browserbench/pull/4 15. docs.getsolari.com/sandboxes 16. docs.getsolari.com/snapshots 17. docs.getsolari.com/pricing 18. getsolari.com/pricing 19. e2b.dev 20. daytona.io 21. modal.com 22. browserbase.com 23. steel.dev 24. kernel.sh
25. api.getsolari.com"
26. github.com/your-org/your-repo%22