amp template with Amp already installed.
CLI
Create a sandbox with the E2B CLI.Run headless
Use-x for non-interactive mode and --dangerously-allow-all to auto-approve all tool calls (safe inside E2B sandboxes). Amp uses its own API key from ampcode.com/settings.
Example: work on a cloned repository
Streaming JSON
Use--stream-json to get a real-time JSONL event stream with rich metadata — including tool calls, token usage, thinking blocks, and permission decisions.
Thread management
Amp persists conversations as threads that can be resumed or continued with follow-up tasks.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-builtamp template.
Related guides
Sandbox persistence
Auto-pause, resume, and manage sandbox lifecycle
Git integration
Clone repos, manage branches, and push changes
SSH access
Connect to the sandbox via SSH for interactive sessions