The sandbox runs a Debian/Ubuntu base image. You can install software with apt-get via the Process API or by customizing your Docker image. This page covers commonly needed packages and how to install them.
Browsers
Chromium
await sdk.runProcess({
command: "apt-get",
args: ["install", "-y", "chromium", "chromium-sandbox"],
});
// Launch headless
await sdk.runProcess({
command: "chromium",
args: ["--headless", "--no-sandbox", "--disable-gpu", "https://example.com"],
});
Use --no-sandbox when running Chromium inside a container. The container itself provides isolation.
Firefox
await sdk.runProcess({
command: "apt-get",
args: ["install", "-y", "firefox-esr"],
});
Playwright browsers
Playwright bundles its own browser binaries. Install the Playwright CLI and let it download browsers for you.
await sdk.runProcess({
command: "npx",
args: ["playwright", "install", "--with-deps", "chromium"],
});
Languages and runtimes
Node.js
await sdk.runProcess({
command: "apt-get",
args: ["install", "-y", "nodejs", "npm"],
});
For a specific version, use nvm:
await sdk.runProcess({
command: "bash",
args: ["-c", "curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash && . ~/.nvm/nvm.sh && nvm install 22"],
});
Python
Python 3 is typically pre-installed. To add pip and common packages:
await sdk.runProcess({
command: "apt-get",
args: ["install", "-y", "python3", "python3-pip", "python3-venv"],
});
await sdk.runProcess({
command: "pip3",
args: ["install", "numpy", "pandas", "matplotlib"],
});
await sdk.runProcess({
command: "bash",
args: ["-c", "curl -fsSL https://go.dev/dl/go1.23.6.linux-amd64.tar.gz | tar -C /usr/local -xz"],
});
// Add to PATH for subsequent commands
await sdk.runProcess({
command: "bash",
args: ["-c", "export PATH=$PATH:/usr/local/go/bin && go version"],
});
Rust
await sdk.runProcess({
command: "bash",
args: ["-c", "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y"],
});
Java (OpenJDK)
await sdk.runProcess({
command: "apt-get",
args: ["install", "-y", "default-jdk"],
});
Ruby
await sdk.runProcess({
command: "apt-get",
args: ["install", "-y", "ruby-full"],
});
Databases
PostgreSQL
await sdk.runProcess({
command: "apt-get",
args: ["install", "-y", "postgresql", "postgresql-client"],
});
// Start the service
const proc = await sdk.createProcess({
command: "bash",
args: ["-c", "su - postgres -c 'pg_ctlcluster 15 main start'"],
});
SQLite
await sdk.runProcess({
command: "apt-get",
args: ["install", "-y", "sqlite3"],
});
Redis
await sdk.runProcess({
command: "apt-get",
args: ["install", "-y", "redis-server"],
});
const proc = await sdk.createProcess({
command: "redis-server",
args: ["--daemonize", "no"],
});
MySQL / MariaDB
await sdk.runProcess({
command: "apt-get",
args: ["install", "-y", "mariadb-server", "mariadb-client"],
});
Most compiled software needs the standard build toolchain:
await sdk.runProcess({
command: "apt-get",
args: ["install", "-y", "build-essential", "cmake", "pkg-config"],
});
This installs gcc, g++, make, cmake, and related tools.
Desktop applications
These require the Computer Use desktop to be started first.
LibreOffice
await sdk.runProcess({
command: "apt-get",
args: ["install", "-y", "libreoffice"],
});
GIMP
await sdk.runProcess({
command: "apt-get",
args: ["install", "-y", "gimp"],
});
VLC
await sdk.runProcess({
command: "apt-get",
args: ["install", "-y", "vlc"],
});
VS Code (code-server)
await sdk.runProcess({
command: "bash",
args: ["-c", "curl -fsSL https://code-server.dev/install.sh | sh"],
});
const proc = await sdk.createProcess({
command: "code-server",
args: ["--bind-addr", "0.0.0.0:8080", "--auth", "none"],
});
Git
await sdk.runProcess({
command: "apt-get",
args: ["install", "-y", "git"],
});
Docker
await sdk.runProcess({
command: "bash",
args: ["-c", "curl -fsSL https://get.docker.com | sh"],
});
await sdk.runProcess({
command: "apt-get",
args: ["install", "-y", "jq"],
});
tmux
await sdk.runProcess({
command: "apt-get",
args: ["install", "-y", "tmux"],
});
FFmpeg
await sdk.runProcess({
command: "apt-get",
args: ["install", "-y", "ffmpeg"],
});
ImageMagick
await sdk.runProcess({
command: "apt-get",
args: ["install", "-y", "imagemagick"],
});
Poppler (PDF utilities)
await sdk.runProcess({
command: "apt-get",
args: ["install", "-y", "poppler-utils"],
});
// Convert PDF to images
await sdk.runProcess({
command: "pdftoppm",
args: ["-png", "document.pdf", "output"],
});
Pre-installing in a Docker image
For production use, install software in your Dockerfile instead of at runtime. This avoids repeated downloads and makes startup faster.
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y \
chromium \
firefox-esr \
nodejs npm \
python3 python3-pip \
git curl wget \
build-essential \
sqlite3 \
ffmpeg \
imagemagick \
jq \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install numpy pandas matplotlib
See Docker deployment for how to use custom images with Sandbox Agent.