Skip to content

Add Kernel browser use case#159

Open
beran-t wants to merge 17 commits intomainfrom
add-app-preview-example
Open

Add Kernel browser use case#159
beran-t wants to merge 17 commits intomainfrom
add-app-preview-example

Conversation

@beran-t
Copy link
Contributor

@beran-t beran-t commented Mar 17, 2026

Add a new example documentation page demonstrating how to deploy a web application in an E2B sandbox and use a Kernel cloud browser to take screenshots of every route.

The example includes:

  • Complete architecture overview
  • Step-by-step walkthrough using <Steps> component
  • Full working Python example with FastAPI and Playwright
  • Key concepts reference table
  • Adaptation guidelines for other use cases

@beran-t beran-t changed the title docs: Add app preview example Add Kernel browser use case Mar 17, 2026
Combines browser-use.mdx and agent-browser.mdx into one page at
docs/integrations/kernel.mdx. Adds new Integrations section to sidebar.
Lead with why (no sandbox compute wasted, zero install, CAPTCHA handling,
parallel browsing), show two approaches upfront, then streamlined walkthroughs.
- Add Note distinguishing remote vs local browser (computer use)
- Restructure into three card-linked examples: screenshot endpoints,
  agent data extraction, live browser preview
- Fix all examples so Kernel code runs inside the sandbox, not the orchestrator
- Add CodeGroup tabs (Python + JS) throughout
- Remove MCP tools table, Kernel skills section, and LLM chooser
- Add live view example with iframe embedding and read-only mode

await sandbox.files.write('/home/user/app.py', FASTAPI_APP)
await sandbox.commands.run(
'pip install --break-system-packages fastapi uvicorn',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why --break-system-packages?

```typescript JavaScript & TypeScript
import { Sandbox } from 'e2b'

const sandbox = await Sandbox.create('kernel-browser', {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure it's public

const AGENT_SCRIPT = `
import asyncio
from kernel import Kernel
from browser_use import Agent, Browser, ChatAnthropic
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you import the browser_use package but there's no installation?

Copy link
Member

@mishushakov mishushakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved with minor nits

Remove unnecessary --break-system-packages flag from pip install commands
and clarify that Browser Use comes pre-installed in the kernel-browser template.
Add copy-pasteable full examples using expandable CodeGroups for the
screenshot and agent data extraction sections. Define the missing
FASTAPI_APP constant in the step-by-step code blocks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants