Atlas
PluginsSandboxes

E2B

Managed Firecracker microVM sandbox isolation via the E2B cloud API.

Managed Firecracker microVM isolation via the E2B API. Each agent session gets an ephemeral VM -- semantic layer files are uploaded at creation time and the VM is destroyed when the session ends. No infrastructure to manage; E2B handles provisioning, scaling, and cleanup.

Installation

bun add @useatlas/e2b e2b

Configuration

// atlas.config.ts
import { defineConfig } from "@atlas/api/lib/config";
import { e2bSandboxPlugin } from "@useatlas/e2b";

export default defineConfig({
  plugins: [
    e2bSandboxPlugin({
      apiKey: process.env.E2B_API_KEY!,
      template: "my-custom-template", // optional
      timeoutSec: 60,                 // optional
    }),
  ],
});

Options

OptionTypeRequiredDefaultDescription
apiKeystringYes--E2B API key
templatestringNoE2B defaultSandbox template ID for custom VM images
timeoutSecnumberNo30Per-command timeout in seconds

Security

PropertyValue
Network isolationYes
Filesystem isolationYes (ephemeral VM filesystem)
Unprivileged executionYes
Priority90

E2B Firecracker microVM (managed). Ephemeral VM with isolated network and filesystem. Semantic files uploaded at sandbox creation. No host access -- the VM is destroyed after use.

Troubleshooting

e2b package not found

The e2b package is an optional peer dependency -- it is lazy-loaded at runtime. Install it explicitly: bun add e2b.

Health check API costs

Health checks create and immediately destroy a sandbox instance, so they do incur a small API cost. Avoid high-frequency health checks.

Symlinks in the semantic layer that escape the semantic root are skipped during file upload for safety. If entity files are missing in the sandbox, check for symlinks in your semantic/ directory.

Custom templates

Use the template option to specify a custom E2B sandbox template with additional tools or language runtimes pre-installed. Create templates via the E2B dashboard.

On this page