From a0f1ffb694694bfd130e9914cfb0beb221e6efb0 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 01:03:52 +0000 Subject: [PATCH 1/4] Update integrations/agent-browser.mdx Co-Authored-By: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> --- integrations/agent-browser.mdx | 105 +++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 integrations/agent-browser.mdx diff --git a/integrations/agent-browser.mdx b/integrations/agent-browser.mdx new file mode 100644 index 0000000..04a5cdf --- /dev/null +++ b/integrations/agent-browser.mdx @@ -0,0 +1,105 @@ +--- +title: "Agent Browser" +--- + +[Agent Browser](https://github.com/vercel-labs/agent-browser) is a headless browser automation CLI for AI agents built by Vercel. It provides a fast Rust CLI with Node.js fallback, making it ideal for AI-powered browser automation. By integrating with Kernel, you can run Agent Browser automations with cloud-hosted browsers. + +## Adding Kernel to existing Agent Browser implementations + +If you already have an Agent Browser implementation, you can easily switch to using Kernel's cloud browsers by connecting via CDP. + +### 1. Install the Kernel SDK + +```bash +npm install @onkernel/sdk +``` + +### 2. Initialize Kernel and create a browser + +Import the libraries and create a cloud browser session: + +```typescript +import Kernel from '@onkernel/sdk'; + +const kernel = new Kernel(); + +const kernelBrowser = await kernel.browsers.create({ stealth: true }); + +console.log("Live view url: ", kernelBrowser.browser_live_view_url); +``` + +### 3. Connect Agent Browser to Kernel + +Use Agent Browser's `connect` command to connect to Kernel's CDP WebSocket URL: + +```bash +agent-browser connect +``` + +Where `` is the `cdp_ws_url` from your Kernel browser session. + +### 4. Use Agent Browser commands + +Once connected, use Agent Browser's commands with the Kernel-powered browser: + +```bash +agent-browser open example.com +agent-browser snapshot # Get accessibility tree with refs +agent-browser click @e2 # Click by ref from snapshot +agent-browser fill @e3 "test@example.com" # Fill by ref +agent-browser get text @e1 # Get text by ref +agent-browser screenshot page.png +``` + +### 5. Clean up + +When you're done, close the browser and clean up the Kernel session: + +```bash +agent-browser close +``` + +```typescript +await kernel.browsers.deleteByID(kernelBrowser.session_id); +``` + +## Programmatic usage + +You can also use Agent Browser programmatically with Kernel: + +```typescript +import Kernel from '@onkernel/sdk'; +import { execSync } from 'child_process'; + +const kernel = new Kernel(); + +// Create a Kernel browser session +const kernelBrowser = await kernel.browsers.create({ stealth: true }); + +console.log("Live view url: ", kernelBrowser.browser_live_view_url); + +// Connect Agent Browser to Kernel +execSync(`agent-browser connect ${kernelBrowser.cdp_ws_url}`); + +// Run your automation +execSync('agent-browser open https://example.com'); +execSync('agent-browser snapshot'); + +// Clean up +execSync('agent-browser close'); +await kernel.browsers.deleteByID(kernelBrowser.session_id); +``` + +## 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](/browsers/profiles) +- **Live view**: Debug your automations with real-time browser viewing + +## Next steps + +- Check out [live view](/browsers/live-view) for debugging your automations +- Learn about [stealth mode](/browsers/bot-detection/stealth) for avoiding detection +- Learn how to properly [terminate browser sessions](/browsers/termination) From d33c9e9e85039dc9a81429cc74b393ae8fdc6aff Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 01:04:01 +0000 Subject: [PATCH 2/4] Update docs.json Co-Authored-By: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> --- docs.json | 1 + 1 file changed, 1 insertion(+) diff --git a/docs.json b/docs.json index 39e76ed..73afb19 100644 --- a/docs.json +++ b/docs.json @@ -137,6 +137,7 @@ "group": "Integrations", "pages": [ "integrations/overview", + "integrations/agent-browser", "integrations/browser-use", "integrations/claude-agent-sdk", { From f969575bbe2673147fdfa09d1dd15bea776e2110 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 01:04:07 +0000 Subject: [PATCH 3/4] Update integrations/overview.mdx Co-Authored-By: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> --- integrations/overview.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/integrations/overview.mdx b/integrations/overview.mdx index bf6441d..5ee7c0f 100644 --- a/integrations/overview.mdx +++ b/integrations/overview.mdx @@ -17,6 +17,7 @@ Kernel browsers work with any framework or tool that supports the Chrome DevTool Kernel provides detailed guides for popular agent frameworks: +- **[Agent Browser](/integrations/agent-browser)** - Browser automation CLI for AI agents - **[Browser Use](/integrations/browser-use)** - AI browser agent framework - **[Claude Agent SDK](/integrations/claude-agent-sdk)** - Run Claude Agent SDK automations in cloud browsers - **[Stagehand](/integrations/stagehand)** - AI browser automation with natural language From f851b73307a88cb30af3993d9993068459ca606a Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 01:31:28 +0000 Subject: [PATCH 4/4] Update integrations/agent-browser.mdx Co-Authored-By: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> --- integrations/agent-browser.mdx | 48 ++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/integrations/agent-browser.mdx b/integrations/agent-browser.mdx index 04a5cdf..b994bee 100644 --- a/integrations/agent-browser.mdx +++ b/integrations/agent-browser.mdx @@ -4,9 +4,53 @@ title: "Agent Browser" [Agent Browser](https://github.com/vercel-labs/agent-browser) is a headless browser automation CLI for AI agents built by Vercel. It provides a fast Rust CLI with Node.js fallback, making it ideal for AI-powered browser automation. By integrating with Kernel, you can run Agent Browser automations with cloud-hosted browsers. -## Adding Kernel to existing Agent Browser implementations +## Using the native Kernel provider -If you already have an Agent Browser implementation, you can easily switch to using Kernel's cloud browsers by connecting via CDP. +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: + +```bash +export KERNEL_API_KEY="your-api-key" +agent-browser -p kernel open https://example.com +``` + +Or use environment variables for CI/scripts: + +```bash +export AGENT_BROWSER_PROVIDER=kernel +export KERNEL_API_KEY="your-api-key" +agent-browser open https://example.com +``` + +Get your API key from the [Kernel Dashboard](https://dashboard.onkernel.com). + +### Configuration options + +Configure Kernel via environment variables: + +| Variable | Description | Default | +|----------|-------------|---------| +| `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 + +When `KERNEL_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. + +```bash +export KERNEL_API_KEY="your-api-key" +export KERNEL_PROFILE_NAME="my-profile" +agent-browser -p kernel open https://example.com +``` + +## Connecting via CDP (alternative) + +If you need more control, you can connect Agent Browser to Kernel via CDP directly. ### 1. Install the Kernel SDK