Every time you open DevTools on a page, the panel you see is a separate program talking to the page over the Chrome DevTools Protocol. Puppeteer, Playwright, Lighthouse and ChromeDriver talk the same protocol. A client sends a JSON message such as {"id":1,"method":"Page.navigate","params":{"url":"https://example.com"}}, the browser does it and answers with the same id, and in between the browser pushes events the client asked to hear about.

How the Chrome DevTools Protocol is organised

The protocol documentation splits it into domains: Page, DOM, Network, Input, Runtime, Emulation, Target and dozens more. Each domain has commands you call and events you receive. Many domains stay silent until the client sends their enable command, and from then on the browser does extra work to report what happens in that domain.

There are three versions of the reference. Tip-of-tree follows Chromium's source and changes all the time. The "stable" protocol is a snapshot from Chrome 64. A third covers the V8 inspector that Node.js uses. The documentation is blunt about the first one: CDP "is not a public or supported API for Chrome, and it does not guarantee backwards compatibility". That is the main reason people use Puppeteer or Playwright rather than raw messages, since the library takes on the breakage.

Everything the window does, from a script on your own computerIn Mosaic: REST API. Everything the window does, from your own scripts. Free covers 3 profiles with no card, and Pro is $25 a month for any number of them.

How it works: REST API

How a client connects

A Chrome that should accept clients has to be started with --remote-debugging-port=9222. Since Chrome 136 that switch also needs a non-default --user-data-dir, because, as Google's Chrome blog explains, infostealers had been using the port to pull cookies out of people's everyday profiles. Once it listens, http://127.0.0.1:9222/json/version returns the browser's WebSocket address and /json/list returns one per tab, worker and frame. Connect to a WebSocket and start sending commands.

The port step by step, with the Playwright and Puppeteer calls and the usual connection failures, is in connecting to an existing Chrome with CDP.

What a page can see of it

Most commands leave nothing a page can measure. Page.navigate looks like a person typing an address, and Input.dispatchMouseEvent arrives as a trusted event. A few commands do leave traces. The Runtime domain, once enabled, makes the browser serialise what the page logs to its console so it can report it to the client, and a page can build an object whose serialisation runs its own code. Puppeteer and Playwright both enable Runtime when they attach.

We measured this on our own engine in September 2026. Against the public detector deviceandbrowserinfo, Page.enable, Runtime.evaluate without enabling the domain and Input.dispatchKeyEvent all left the verdict at not-a-bot. Runtime.enable alone flipped it to isAutomatedWithCDP. The mechanism and the rest of that table are in CDP detection.

How Mosaic uses CDP

Mosaic starts every profile with its own debugging port. POST /profiles/:id/start on the local REST API returns debugPort and wsEndpoint for that profile, so ten running profiles are ten separate CDP endpoints, each already carrying its own fingerprint, proxy and cookies. Puppeteer's browserWSEndpoint and Playwright's connectOverCDP take that address as it is.

Driving a Mosaic profile from Playwright: start it over the local API and attach to its DevTools socket
API › Automation shows the Playwright, Puppeteer and raw CDP calls

Mosaic's own page tools, which the REST API and the MCP server share, drive pages over CDP too, but they never send Runtime.enable, and the build fails if that string appears anywhere in the source. They read the page from an isolated world and send clicks and keys through Input with human timing. A library you attach yourself is a different matter: Playwright will enable Runtime as it always does, and Mosaic cannot change what it sends. Using Playwright with an anti-detect browser shows both routes. The API and MCP are part of Pro, $25 a month; automate only accounts and sites whose terms allow it.