All Products
Search
Document Center

Function Compute:Base Template

Last Updated:Sep 16, 2026

The base template provides a minimal cloud sandbox runtime environment with the built-in E2B envd-compatible base service. It is suitable for scenarios that require managing sandbox lifecycle, running basic commands, accessing the file system via E2B-compatible SDKs, or serving as a baseline for custom capabilities.

The base template aligns with E2B's Commands, Filesystem, and Sandbox lifecycle capabilities, and serves as the common foundation for the code-interpreter-v1 template, browser template, and All-in-One template.

Features

FeatureDescription
envd Base ServiceBuilt-in E2B envd-compatible service for sandbox creation, connection, basic commands, and file access
Lightweight RuntimeNo pre-installed data science libraries or higher-level dependencies, and no browser automation service
Secure IsolationEach sandbox instance has an independent file system and process space
Extensible BaselineSuitable as a foundation for custom toolchains, business runtimes, or higher-level capabilities

Use Cases

Use CaseDescription
Basic Command ExecutionRun simple Shell commands via envd for environment checks, file preparation, and other tasks
Custom Runtime BaselineInstall or wrap your own dependencies and tools on top of a minimal sandbox environment
SDK Connectivity VerificationValidate API Key, region, template creation, sandbox creation, and teardown workflows
Lightweight TasksTasks that do not require pre-installed data science libraries or browser automation capabilities

Default Configuration

The default configuration for the base template is as follows:

ConfigurationDefault ValueDescription
Default PortNo business portProvides envd base service
CPU2 vCPUMinimum requirement
Memory2048 MBMinimum requirement
Disk Size10240 MBRoot filesystem available space, suitable for command execution and temporary files

Quick Start

If you need code interpreter, browser automation, or a combination of both, please choose the Code Interpreter v1 Template, Browser Template, or All-in-One Template respectively.

When template is not explicitly specified, a base sandbox is created by default.

from e2b import Sandbox

sbx = Sandbox.create(timeout=600)

result = sbx.commands.run("echo hello from base template")
print(result.stdout)

sbx.kill()

TypeScript example:

import { Sandbox } from "e2b";

const sbx = await Sandbox.create({ timeoutMs: 600_000 });

try {
  const result = await sbx.commands.run("echo hello from base template");
  console.log(result.stdout);
} finally {
  await sbx.kill();
}