npm install @codesandbox/sdk
import { CodeSandbox } from "@codesandbox/sdk";
const sdk = new CodeSandbox();
const sandbox = await sdk.sandbox.create();
const result = await sandbox.shells.python.run("print(1+1)");
// Live clone the sandbox to a second version
const sandbox2 = await sandbox.fork();
// Checkpoint the sandbox by hibernating it
await sandbox.hibernate();
Give agents a Devbox to resolve user prompts, or create autonomous agents running on Devboxes. You can run multiple agents in parallel without them interfering with each other. Using the forking mechanism, you can also A/B test different agents.
Create a Devbox for each developer or student, and run their code in the Devbox. This way, you can run multiple development environments in parallel without them interfering with each other.
Run code in a Devbox to interpret it. This way, you can run untrusted code without worrying about it affecting your system. You can also run popular evals on any piece of code.
Run tests inside a Devbox, and hibernate the Devbox when the tests are done. This way, you can quickly start the Devbox again when you need to run the tests again or evaluate the results.
Use our API to create isolated development environments (Devboxes) that can run any type of code you need.
Every environment runs in isolation, so you can safely run untrusted code without it affecting your system.
We can handle millions of concurrent VMs and make it easy to provision, manage and decommission VMs.
Resume development within the same Devbox after periods of inactivity. With no loss thanks to our snapshots.
Our microVM infrastructure allows us to spin up entire VMs, clone them and restore snapshots within 2 seconds.
Gain total control over periods of inactivity before auto hibernation kicks in.
Yes. You need a CodeSandbox API key to use CodeSandbox SDK, which you can get by creating a CodeSandbox account.