All Products
Search
Document Center

Function Compute:All-In-One Template

Last Updated:Sep 16, 2026

The All-In-One template layers the Code Interpreter service on top of the browser capabilities of the browser template. Within a single sandbox session, it can drive a cloud browser via CDP/VNC and also execute Python/JavaScript code, process files, and run terminal commands. It is ideal for AI Agent scenarios that require coordinated "browser automation + code execution."

Like the browser template, the All-In-One template is not a ready-to-use built-in template: you must first build a named custom template from the official All-In-One image, then create sandboxes from it. This page describes only the differences from the browser template: image and ports, building the image, Code Interpreter verification, and combined-workflow recommendations. Browser capabilities, the health check, CDP probing, and noVNC authentication are identical to the browser template — see the Browser template. For the full best practice of AIO scenarios, see Use AIO Sandbox.

Differences from the browser template

Comparison

Browser Template

All-In-One Template

Core positioning

Lightweight browser automation environment

Integrated browser automation + code execution environment

Code Interpreter service

Not supported

Supports Python/JavaScript execution, context persistence, and result output

File processing

Basic file access

File APIs with in-context read/write and processing

Ports

3000 (browser entry)

3000 (browser entry) / 5000 (code and file entry)

Default image

runtime/browser (Beijing region example)

runtime/all-in-one (Singapore region example)

Default configuration

Configuration

Default

Description

Container image

fc-e2b-registry.ap-southeast-1.cr.aliyuncs.com/runtime/all-in-one:v0.0.44

Prebuilt All-In-One sandbox image

Browser port

3000

Browser service listening port for /health, CDP, and VNC

Code execution port

5000

Code Interpreter/envd service listening port

CPU

4 vCPU

Recommended spec to support both browser and code execution

Memory

8192 MB

Recommended spec

Disk size

10240 MB

10 GB recommended for browser cache, screenshots, downloaded files, and code execution results

Note

The example uses the Singapore image. For another region, replace the region segment in the image address with the FC Agent Sandbox endpoint region and keep the v0.0.44 tag. Set E2B_API_URL and E2B_DOMAIN to that same region; the SDK reads them automatically, so you do not need to pass them explicitly in method calls. Cross-region image builds fail. Local environment setup and how to obtain X-Access-Token are the same as in the Browser template.

Build the All-In-One template

The build flow is the same as the browser template; only the image and template name change. Specify CPU and memory (4 vCPU / 8192 MB recommended) at build time.

Python:

"""All-In-One template build example."""

from dotenv import load_dotenv
from e2b import Template, default_build_logger

load_dotenv()

# The SDK reads E2B_API_KEY / E2B_API_URL / E2B_DOMAIN automatically.
FROM_IMAGE = "fc-e2b-registry.ap-southeast-1.cr.aliyuncs.com/runtime/all-in-one:v0.0.44"

build = Template.build(
    Template().from_image(FROM_IMAGE),
    name="my-all-in-one-template",
    cpu_count=4,
    memory_mb=8192,
    on_build_logs=default_build_logger(),
)
print(f"template_id: {build.template_id}")

Node.js:

// All-In-One template build example.
import { Template, defaultBuildLogger } from 'e2b';

// The SDK reads E2B_API_KEY / E2B_API_URL / E2B_DOMAIN automatically.
const FROM_IMAGE =
  'fc-e2b-registry.ap-southeast-1.cr.aliyuncs.com/runtime/all-in-one:v0.0.44';

const build = await Template.build(Template().fromImage(FROM_IMAGE), 'my-all-in-one-template', {
  cpuCount: 4,
  memoryMB: 8192,
  onBuildLogs: defaultBuildLogger(),
});
console.log(`template_id: ${build.templateId}`);

Verify combined capabilities

The browser part (create sandbox, wait for /health, connect over CDP, take a screenshot) is identical to the Browser template. The additional capability of the All-In-One template is executing code through Code Interpreter within the same sandbox: after the browser phase, use run_code / runCode to process the browser artifacts.

Python:

# Continuing with sbx from the browser template flow (same sandbox), run a Python snippet to verify code execution.
execution = sbx.run_code(
    "import json\n"
    "print(json.dumps({'status': 'ok', 'source': 'all-in-one'}, ensure_ascii=False))"
)
print("".join(execution.logs.stdout))

Node.js:

// Continuing with sbx from the browser template flow (same sandbox), run a Python snippet to verify code execution.
const execution = await sbx.runCode(
  "import json\nprint(json.dumps({'status': 'ok', 'source': 'all-in-one'}, ensure_ascii=False))",
);
console.log(execution.logs.stdout.join(""));
Note

To use Code Interpreter, the SDK must be e2b_code_interpreter / @e2b/code-interpreter, and the sandbox must be created from my-all-in-one-template.

Limitations

Limitation

Constraint

Browser support

Currently ships with Chromium/Chrome

Resource spec

4 vCPU / 8192 MB or higher is recommended to avoid resource contention between browser and code execution

Authentication requirement

CDP, VNC, and data-plane APIs all require a valid API key or X-Access-Token