Skip to main content
OpenClaw is an open-source personal AI assistant that supports multiple LLM providers and messaging channels. E2B provides a pre-built openclaw template with OpenClaw already installed.

CLI

Create a sandbox with the E2B CLI.
Once inside the sandbox, start OpenClaw.

Run headless

Use openclaw agent --message for non-interactive mode. Pass --local to use API keys from environment variables and --thinking to control reasoning depth.

Example: work on a cloned repository

Structured output

Use --json to get machine-readable responses with structured payload and metadata.

Customize SOUL.md

SOUL.md defines the agent’s personality, boundaries, and operating principles. Write it into the workspace before running the agent.

Customize HEARTBEAT.md

HEARTBEAT.md is a periodic checklist the agent reviews on a recurring schedule (roughly every 30 minutes). Use it for background task reminders.

Add skills

OpenClaw supports a skills ecosystem via ClawHub. Skills are markdown files (SKILL.md) that extend the agent with additional tools. Install them with the clawhub CLI or write them directly into the workspace.
Browse available skills at clawhub.com. You can also write a custom skill as a SKILL.md file directly into the workspace.

Launch the gateway

OpenClaw has a built-in web UI and chat interface served by its gateway. Start it inside a sandbox and connect from your browser.
This sandbox is created with a 10-minute timeout and auto-pause enabled. After 10 minutes of inactivity it pauses and can be resumed later. See Sandbox Persistence and Sandbox Lifecycle for more details.

Build a custom template

If you need to customize the environment (e.g. pre-install dependencies, add config files), build your own template on top of the pre-built openclaw template.
Run the build script to create the template.

Sandbox persistence

Auto-pause, resume, and manage sandbox lifecycle

SSH access

Connect to the sandbox via SSH for interactive sessions