From browser state to automation tools
Lightpanda Browser exposes the same page state through several control surfaces, and this chapter asks which one fits a real automation job. The choice is not a contest between protocol brands. CDP and WebDriver BiDi serve networked automation clients; MCP and native agent mode turn browser state into higher-level tools; saved scripts turn exploration into replay. Comparing their ownership, session, and side-effect boundaries helps you choose deliberately rather than treating every interface as interchangeable.
CDP and BiDi are different views of a networked browser
Chrome DevTools Protocol is the most direct fit when an existing automation client already speaks CDP. Lightpanda’s CDP server accepts a WebSocket connection, creates an inspector-enabled browser, parses commands, dispatches supported domains, and emits events from the same browser notifications that track navigation, frames, network activity, runtime output, and protocol state. A client can ask for DOM or runtime operations, control input, observe network requests, and coordinate page lifecycle events without embedding a second browser.
WebDriver BiDi approaches the same underlying state through a standards-oriented session and browsing-context model. The implementation has session, browser, browsing-context, script, and input modules, with event subscriptions and a WebSocket path. An HTTP-created WebDriver session can outlive one WebSocket link and be connected again later. That lifecycle is useful when a test runner or service separates session creation from the connection that drives it.
The practical difference is not that one protocol sees a “real” browser and the other sees a fake one. Both are control planes over Lightpanda’s browser state. Their concepts, command shapes, event models, and client ecosystems differ. The right choice depends first on the software that must connect and second on the operations that the current Lightpanda surface actually supports.
Lightpanda’s compatibility boundary matters here. The CDP dispatcher exposes a specific set of domains rather than every command available in Chrome, and the BiDi implementation documents a constrained browser/session model. A client that uses common navigation, runtime, DOM, input, or network operations may fit well; a client that assumes every Chrome target type, multi-context pattern, or obscure domain exists may not. “CDP-compatible” or “BiDi-compatible” should therefore mean compatible with the supported surface, not automatically interchangeable with every browser implementation.
That constraint can be an advantage for a focused service because it makes the resource model easier to reason about, but it changes migration work. A test suite that assumes many independent browser contexts, persistent targets, or a particular Chrome-only domain needs an explicit compatibility check before it is moved. The right comparison is between the workflow’s actual commands and Lightpanda’s supported state model, not between protocol names on a feature matrix.
Why the server uses workers and inboxes
A protocol connection is an external event source, but V8 and page state have an ownership thread. Lightpanda’s server separates the socket-facing loop from protocol workers.