cdpUrl() returns an authenticated Chrome DevTools Protocol WebSocket URL that Playwright, Puppeteer, or Stagehand can connect to directly. There is no browser to install and nothing to manage.
Playwright
playwright-core is enough here, since you connect to the box’s Chromium instead of launching one locally:
Puppeteer
scrape.ts
Stagehand
Stagehand can use the box browser as its local browser:agent.ts
Mixing CDP and SDK control
CDP clients and the SDK drive the same browser and the same tabs. A page opened by Playwright shows up inbox.browser.listTabs(), and a tab created by the SDK is visible to Playwright. You can script the predictable steps like login and pagination with Playwright, hand the tab to act or run for the steps that are easier to describe in natural language, and watch either through Live View.
As a rule of thumb: use CDP when you want precise, repeatable scripting with no LLM in the loop. Use AI Actions when describing the task is easier than scripting it.