Skip to main content
This guide covers cloud browsers powered by Kernel — cloud Chromium instances your code controls via CDP or the Kernel SDK. For local browser automation using a virtual desktop, see Computer use.
Cloud browsers run on Kernel’s managed infrastructure, not inside your sandbox. This gives you sub-second browser startup, persistent sessions you can pause and resume across hours or days, and reusable browser state. Your agent connects to them over the network via CDP, BiDi, or their CUA API. Kernel handles CAPTCHA solving, residential proxies, authentication, and observability out of the box.

Prerequisites

Set your keys in the environment:
.env
E2B provides a pre-built sandbox template with the Kernel SDK and Playwright already installed:
TemplateWhat’s includedBest for
kernel-browserKernel SDK, Playwright, Browser UseScreenshots, scraping, app previews, autonomous agents

Examples

Here are three common patterns for using cloud browsers with E2B sandboxes.

Screenshot app endpoints

Deploy a web app in a sandbox, screenshot every route

Agent data extraction

Let an LLM autonomously browse and extract data

Live browser preview

Watch the browser in real time via Kernel’s live view

Screenshot app endpoints

Deploy a web app inside an E2B sandbox, get a public URL, then use a Kernel cloud browser to screenshot every route.
1

Create the sandbox and start your app

2

Screenshot each route with Kernel

E2B exposes any sandbox port as a public HTTPS endpoint. Write a browsing script into the sandbox that creates a Kernel browser and screenshots each route.
Full example:

Agent data extraction

Use Browser Use to let an LLM autonomously browse a website and extract data. The agent sees the page via screenshots and decides what to click, type, and navigate. This requires an additional LLM API key:
.env
1

Create the sandbox with API keys

2

Write and run the agent

The agent script runs inside the sandbox. Browser Use and its dependencies come pre-installed in the kernel-browser template. The script creates a Kernel browser, connects Browser Use, and completes the task autonomously.
Full example:

Live browser preview

Kernel provides a live view URL for every browser session — you can watch the browser in real time or embed it in your app. This is useful for debugging, demos, or letting users see what the agent is doing.
The live view URL stays active until the browser is deleted or times out. For more details, see the Kernel live view documentation.

Computer use

Local browser automation with virtual desktops

Sandbox lifecycle

Create, manage, and control sandbox lifecycle

Running commands

Run terminal commands inside the sandbox