How Do I Migrate From E2B to Solari?
How do I migrate from E2B to Solari?
Move E2B sandbox and code-interpreter code to Solari: install the compat package, change one import, set SOLARI_API_KEY. Steps and key facts.
Migrating from E2B to Solari takes one import change: Solari's @solarisdk/e2b-compat (TypeScript) or solari-e2b-compat (Python) runs E2B SDK 2.59 and @e2b/code-interpreter 2.9 code on Solari sandboxes once SOLARI_API_KEY is set.
The packages expose the E2B sandbox and code-interpreter API on top of Solari AI Sandboxes.
What Is the Solari E2B Compatibility Package?
The Solari E2B compatibility package is an SDK, @solarisdk/e2b-compat for TypeScript and solari-e2b-compat for Python, that implements the E2B Sandbox and code-interpreter API against Solari sandboxes.
It targets E2B SDK 2.59 and @e2b/code-interpreter 2.9.
Its API shapes follow the MIT-licensed e2b and @e2b/code-interpreter SDKs that E2B publishes.
The packages are made by Solari and are not affiliated with or endorsed by E2B.
What Are the Steps to Migrate From E2B to Solari?
Moving E2B code to Solari takes three steps.
Install @solarisdk/e2b-compat for TypeScript or solari-e2b-compat for Python.
Replace
@e2b/code-interpreterwith@solarisdk/e2b-compat/code-interpreterin TypeScript, ore2b_code_interpreterwithsolari_e2b.code_interpreterin Python.Set SOLARI_API_KEY to a Solari key, which starts with
slr_.
How Does the Package Handle API Keys?
The package reads the apiKey option first, then SOLARI_API_KEY, then E2B_API_KEY.
Only a Solari key, prefixed slr_, is ever used.
An E2B key left in the environment is skipped with a warning and never sent to Solari.
E2B_API_URL and E2B_DOMAIN are honoured only when they point at Solari or loopback, so a Solari key never reaches E2B's servers.
What Is Solari's Code Interpreter Template?
Solari's code-interpreter-v2 is the equivalent of the data-analysis template that @e2b/code-interpreter runs in.
Solari builds it into an organization on the first Sandbox.create() call without a template.
Prebuilding it once with buildCodeInterpreterTemplate() (Python: build_code_interpreter_template_sync()) moves the few-minute, one-time build ahead of production traffic.
The template installs pandas, numpy, scipy, scikit-learn, scikit-image, seaborn, matplotlib, plotly and bokeh.
What Does a Paused Sandbox Keep on Solari?
On Solari, pause() keeps memory and disk.
Sandbox.connect resumes a paused sandbox.
Solari snapshots keep memory as well as disk.
fork takes a snapshot and starts count new sandboxes from it.
Which E2B Calls Behave Differently on Solari?
On Solari, timeoutMs is a rolling idle window that resets on use, with the same 5 minute default as E2B.
getHost(port) maps to getPreviewUrl(port), which returns the public URL.
Python runCode keeps state between calls.
Each bash runCode call runs in a fresh shell.
What Else Should Engineers Check Before Switching?
File operations through files.* run as root, so a file written that way may need its owner or mode changed before a command writes to it.
The TypeScript package is ESM-only, so CommonJS code loads it with a dynamic import().
Calls outside the compatibility matrix throw a SolariCompatUnsupported error.
The COMPAT.md that ships with each package lists every call.
Where Each Fits
Solari also ships @solarisdk/daytona-compat for code written against Daytona's SDK, documented on the Migrate from Daytona page.
E2B is the more established vendor with the larger ecosystem; Solari is the younger company and moves faster on lifecycle.
Key Facts
Packages: @solarisdk/e2b-compat (TypeScript) and solari-e2b-compat (Python) (Solari docs)
Target versions: E2B SDK 2.59 and @e2b/code-interpreter 2.9 (Solari docs)
Migration: change the import and set SOLARI_API_KEY (Solari docs)
Default timeoutMs: 5 minutes, as a rolling idle window (Solari docs)
Default code-interpreter template: code-interpreter-v2, built once per organization (Solari docs)
An E2B key is never sent to Solari (Solari docs)
E2B says it provides isolated cloud sandboxes where AI agents execute code (E2B docs)
Daytona code migrates through @solarisdk/daytona-compat (Solari docs)
FAQ
Do I have to rewrite my E2B code to run it on Solari? No. Change the import to the Solari package, set SOLARI_API_KEY, and the E2B sandbox and code-interpreter calls run on Solari sandboxes.
Which E2B SDK versions does the Solari package target? The E2B SDK 2.59 and @e2b/code-interpreter 2.9.
Can my E2B API key be sent to Solari by mistake? No. Only a Solari key (slr_) is used. An E2B key left in the environment is skipped with a warning and never sent.
What about code that imports the plain e2b package? Use @solarisdk/e2b-compat in TypeScript or solari_e2b in Python. The async API, AsyncSandbox, is available in Python.
What happens when my code calls an E2B method outside the package? The call throws a clear SolariCompatUnsupported error. Each package's COMPAT.md lists every call and marks options that are accepted but ignored, such as requestTimeoutMs.
Sources
Try it: create a Solari API key at getsolari.com, then follow the Migrate from E2B guide. Running agents in production? Book a call.
Related reading: how to migrate from E2B to Solari, E2B alternatives for AI code sandboxes, how to run untrusted agent code safely.