← Back to PRs

#15304: feat(browser): add browser-use no-relay profile driver

by rajanrengasamy open 2026-02-13 08:02 View on GitHub →
docs cli stale size: M
## Summary Add an optional `browser-use` browser profile driver to support direct CDP attachment without Chrome extension relay/tab attach. This introduces a no-relay backend path while keeping current defaults unchanged. ## What changed - Add `browser-use` as a supported profile driver in browser config/types/schema. - Route runtime behavior by driver: - `browser-use` skips managed browser launch. - `browser-use` skips extension relay startup. - Validates direct CDP reachability and emits driver-specific guidance. - `stop`/`reset-profile` are non-destructive for external browser sessions. - Wire profile creation support in API + CLI for `driver=browser-use`. - Require explicit `cdpUrl` when creating `browser-use` profiles. - Keep existing `chrome` relay path as default behavior. ## Docs - Update browser tool docs for direct CDP mode setup + security notes. - Update browser CLI docs with `browser-use` profile examples. ## Tests Executed locally: ```bash corepack pnpm exec vitest run \ src/browser/config.test.ts \ src/browser/profiles-service.test.ts \ src/browser/server-context.browser-use-driver.test.ts ``` Result: 21 passed / 0 failed Executed locally: ```bash corepack pnpm exec oxlint --type-aware \ src/browser/client.ts \ src/browser/config.ts \ src/browser/profiles-service.ts \ src/browser/routes/basic.ts \ src/browser/server-context.ts \ src/cli/browser-cli-manage.ts \ src/config/types.browser.ts \ src/config/zod-schema.ts \ src/browser/config.test.ts \ src/browser/profiles-service.test.ts \ src/browser/server-context.browser-use-driver.test.ts ``` Result: 0 warnings / 0 errors ## Backward compatibility - Default browser flow remains unchanged (`chrome` relay path). - New behavior only applies when profile driver is explicitly set to `browser-use`. ## Follow-ups (optional) - Expose profile `driver` in status/list output for visibility. - Add localized docs parity for browser-use examples. <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR adds a new `browser-use` browser profile driver that attaches directly to an existing CDP endpoint (no managed Chrome launch and no extension relay). It updates the config types/schema/docs and routes runtime behavior in `src/browser/server-context.ts` so `browser-use` profiles only perform reachability checks, while `stop`/`reset-profile` are non-destructive for externally-managed sessions. Profile creation paths are wired through the API/CLI and tests cover the new driver resolution and runtime branching. Main issue spotted: `BrowserProfileConfig.driver` was widened to include `"clawd"` in `src/config/types.browser.ts`, but runtime/config resolution still only meaningfully handles `openclaw|extension|browser-use` (and treats anything else as `openclaw`). That makes the public type/schema misleading and can mask misconfiguration unless it’s either removed or fully supported end-to-end. <h3>Confidence Score: 4/5</h3> - This PR is close to safe to merge, with one config-type/schema inconsistency to address. - Runtime branching for the new `browser-use` driver is straightforward and covered by targeted tests, but the config type was widened to include `"clawd"` without corresponding routing semantics, which can mislead users and silently change behavior on misconfiguration. - src/config/types.browser.ts (and any related config typing/export points) <sub>Last reviewed commit: ebc98c9</sub> <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs