Using the native Kernel provider
Agent Browser has built-in support for Kernel as a cloud browser provider. This is the simplest way to use Kernel with Agent Browser.Quick start
Use the-p flag to enable Kernel:
Configuration options
Configure Kernel via environment variables:| Variable | Description | Default |
|---|---|---|
AGENT_BROWSER_PROVIDER | Set to kernel as an alternative to the -p kernel flag | (none) |
KERNEL_HEADLESS | Run browser in headless mode (true/false) | false |
KERNEL_STEALTH | Enable stealth mode to avoid bot detection (true/false) | true |
KERNEL_TIMEOUT_SECONDS | Session timeout in seconds | 300 |
KERNEL_PROFILE_NAME | Browser profile name for persistent cookies/logins | (none) |
Profile persistence
WhenKERNEL_PROFILE_NAME is set, the profile will be created if it doesn’t already exist. Cookies, logins, and session data are automatically saved back to the profile when the browser session ends, making them available for future sessions.
Connecting via CDP (alternative)
Use this approach when you need full control of the Kernel browser session creation logic beyond what the agent-browser environment variables support.Programmatic usage
Use this approach if you want to use agent-browser as an alternative to Playwright within a Node.js or Python application while maintaining programmatic control over browser session lifecycle.- TypeScript
- Python
Benefits of using Kernel with Agent Browser
- 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 state: Maintain browser state across runs via Profiles
- Live view: Debug your automations with real-time browser viewing
Next steps
- Check out live view for debugging your automations
- Learn about stealth mode for avoiding detection
- Learn how to properly terminate browser sessions

