Migrate from E2B
This page shows how to move a program from E2B to Kibotos: check that what it uses is available, point the SDK at the gateway, and replace what differs. For the full behavior of each call, see the other pages in this section.
Prerequisites
Ask the deployer for these:
- The gateway's API key and domain.
- The names of the available Templates.
- The CA certificate file, if the gateway certificate comes from a private CA.
Steps
1. Check your SDK package
Compatibility is measured against the official JavaScript SDK. See Compatible versions.
| Package or tool | On Kibotos |
|---|---|
e2b for JavaScript | Passes acceptance at 2.46.1. Use this version |
e2b for Python | Not tested. Run your own tests before you rely on it |
@e2b/code-interpreter | runCode needs the Code Interpreter server in the sandbox, and no Kibotos Template includes it. Run your code with sandbox.commands.run instead |
@e2b/desktop | Not tested. For screenshots and input, use the desktop interface of the native API or kibo |
| E2B CLI | Template builds and sandbox logs are not available through the gateway. Templates are built with kibo-build; see the table below |
2. Check the features you use
An unsupported option fails with an error instead of being ignored, so a test run shows what you still need to change. See How unsupported calls fail.
| You use | On Kibotos | What to do |
|---|---|---|
| Your own Template | Published by an Operator, not through the SDK | Hand the deployer a container image to build a Template, then pass its name to Sandbox.create |
envs in Sandbox.create | Returns 501 | Pass envs to each sandbox.commands.run call |
| Memory pause | sandbox.pause() works, but memory and processes are not kept | Keep state on a Volume and start your processes again after Sandbox.connect. See Pause and resume |
autoResume | Returns 501 | Call Sandbox.connect before you use the sandbox |
Snapshots and Sandbox.fork | Return 501 | No replacement in the SDK. To copy data, export and restore with kibo or the native API |
Domain names in network.allowOut, or network.rules | Return 501 | Use addresses and CIDRs, or send traffic through network.egressProxy. See Network |
Recursive files.watchDir | Returns unimplemented | Watch each directory separately |
cpuCount or memoryMB of a Template | The gateway's settings apply to every sandbox | Ask the deployer. See Resources |
| Teams and per-team API keys | One API key serves the whole deployment | Separate users in your own program. Team metrics return 501 |
| MCP configuration, IAM tokens | Return 501 | No replacement in the gateway |
Files over 1 GiB cannot be uploaded in one call, and one process or file request message is limited to 4 MiB. See the notes in Commands and files.
3. Point the SDK at the gateway
Install the accepted SDK version. The acceptance tests run on Node.js 22 or later:
npm install e2b@2.46.1Set the connection settings. Your code needs no change for these:
export E2B_API_KEY="$(cat e2b-api-key.txt)"
export E2B_DOMAIN=sandbox.example.com
export NODE_EXTRA_CA_CERTS="$PWD/sandbox-ca.pem"Leave out NODE_EXTRA_CA_CERTS when the certificate comes from a public CA.
4. Change the Template name
Replace the E2B Template name with one from the deployer:
const sandbox = await Sandbox.create('kibotos-minimal');Sandbox.create without a name asks for the Template base. If the deployment has no such Template, the call returns 404.
5. Run your program
Run your tests against the deployment. A 501 names the capability that needs a change from step 2. A plain 404 from an endpoint the gateway does not implement reaches you as a missing sandbox. See How unsupported calls fail.
Behavior differences
These calls work but behave differently from E2B:
- Network access: the SDK requests public internet access by default. UDP other than DNS, such as QUIC and NTP, is not allowed. See Guarantees and limits.
- Data: keep data you need on a Volume.
/tmpand/runare empty after a resume, and the rest of the root file system is kept on a best-effort basis. - Volumes: a sandbox created without
volumeMountsgets its own Volume at/data, deleted with the sandbox. See Volumes. - Capacity: when no node has room, create and
connectreturn 503. See Insufficient capacity.
Next steps
- E2B compatibility: everything the gateway provides and does not provide.
- Sandboxes and lifecycle: creation, pause and resume, and expiration.
- Agent platform integration: identity, session mapping, and failure handling.
- API overview: capabilities only the native API provides.
E2B compatibility
The E2B gateway kibotos-e2b translates the E2B control API and the envd protocol into the Kibotos native API, so programs written with the official E2B SDK run on Kibotos. These pages show which SDK calls and endpoints work, how they behave on Kibotos, and what is not supported.
Sandboxes and lifecycle
With the E2B SDK you create, pause, resume, extend, and kill sandboxes on Kibotos with the same calls as on E2B. This page covers how each lifecycle call behaves on Kibotos, what resources a new sandbox gets, how expiration and Idempotency-Key retries work, and what queries return.