| title | Browser Use |
|---|
Browser Use is the AI browser agent that empowers anyone to automate repetitive online tasks, no code required. By integrating with Kernel, you can run Browser Use Agents and automations with cloud-hosted browsers.
If you already have a Browser Use implementation, you can easily switch to using Kernel's cloud browsers by updating your Browser definition.
uv add kernelImport the libraries and create a cloud browser session:
from kernel import Kernel
from browser_use import Browser, Agent
# Initialize Kernel client
client = Kernel(api_key="your-api-key")
# Create a Kernel browser session
kernel_browser = client.browsers.create()Replace your existing Browser initialization to use Kernel's CDP URL and display settings:
# Update your Browser definition to use Kernel's CDP URL
browser = Browser(
cdp_url=kernel_browser.cdp_ws_url,
headless=False,
window_size={'width': 1024, 'height': 768},
viewport={'width': 1024, 'height': 768},
device_scale_factor=1.0
)Use your existing Agent setup with the Kernel-powered browser:
# Use with your existing Agent setup
agent = Agent(
task="Your automation task",
llm=your_llm_instance,
browser_session=browser
)
# Run your automation
result = agent.run()
# Clean up
client.browsers.delete_by_id(kernel_browser.session_id)agent = Agent(
task="Your automation task",
llm=your_llm_instance,
browser_session=BrowserSessionCustomResize(cdp_url=kernel_browser.cdp_ws_url)
)Alternatively, you can use our Kernel app template that includes a pre-configured Browser Use integration:
npx @onkernel/create-kernel-app my-browser-use-appChoose Python as the programming language and then select Browser Use as the template.
Then follow the Quickstart guide to deploy and run your Browser Use automation on Kernel's infrastructure.
- No local browser management: Run automations without installing or maintaining browsers locally
- Scalability: Launch multiple browser sessions in parallel
- Stealth mode: Built-in anti-detection features for web scraping
- Session persistence: Maintain browser state across automation runs
- Live view: Debug your automations with real-time browser viewing
- Check out live view for debugging your automations
- Learn about stealth mode for avoiding detection
- Learn how to properly terminate browser sessions
- Learn how to deploy your Browser Use app to Kernel