When to Use Kernel
- Bot detection avoidance (stealth mode)
- Persistent login sessions across runs
- Cloud deployment without local browser
- Fingerprint resistance
- Enterprise-grade browser infrastructure
Prerequisites
- Kernel account (sign up)
- API key from Kernel Dashboard
Setup
1
Get your API key
- Visit the Kernel Dashboard
- Navigate to API settings
- Create and copy your API key
2
Set environment variable
Usage
Via CLI Flag
Use the-p kernel flag:
Via Environment Variable
Set the provider globally:Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
AGENT_BROWSER_PROVIDER | Set to kernel | - |
KERNEL_API_KEY | Your Kernel API key | Required |
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 |
Stealth Mode
Stealth mode (enabled by default) helps avoid bot detection:Persistent Profiles
Use profiles to persist cookies, logins, and session data across browser restarts:When
KERNEL_PROFILE_NAME is set, the profile is created if it doesn’t exist. Cookies, logins, and session data are automatically saved when the browser session ends.Features
All standard agent-browser commands work with Kernel:- Navigation: Full page navigation support
- Snapshots: Accessibility tree with refs
- Interactions: Click, fill, type, press, hover
- Screenshots: Standard and annotated screenshots
- State Management: Cookies, localStorage, sessionStorage
- Network Control: Route, intercept, mock responses
Example: Persistent Login Session
Example: Stealth Scraping
Example: CI/CD with Persistent Auth
Profile Management
Profiles are managed server-side by Kernel:- Auto-creation: Profiles are created automatically on first use
- Persistence: Session data persists across browser restarts
- Isolation: Each profile name is isolated from others
- Cleanup: Profiles expire based on your Kernel plan settings