- How you drive the browser — the control surface your code (or your model) uses to act on the page.
- Where the loop runs — the machine your decision-making code runs on, relative to the browser.
1. How you drive the browser
Kernel browsers accept four control surfaces. Pick by what’s driving the page, not by what you know best.
The recommended pattern for agents is Playwright execution with a computer-use fallback: script the deterministic steps, hand the page to a computer-use model when a step doesn’t respond to a selector.
Why the choice matters on hardened sites
CDP is what Playwright and Puppeteer speak, and anti-bot vendors actively scan for its signatures — an attached debugger is one of the cheapest automation signals a page can read. Computer controls carry no CDP connection at all, so there’s no protocol fingerprint to leak. That’s why they’re the stronger option on sites with aggressive detection, and it’s why Kernel’s own managed auth drives logins with coordinate-based input rather than CDP. How much this matters is site-specific, and worth testing before you commit to an approach — see why the same site behaves differently.2. Where the loop runs
Your loop is whatever decides the next action: a script, an agent, a model. It can run in three places.- Your own infrastructure
- Kernel's Playwright execution API
- Kernel App Platform
Connect to
cdp_ws_url (or webdriver_ws_url) from wherever your code already runs. Any CDP client works, and there’s no lock-in.Costs: a network round trip per action, disconnects to handle, screenshot and DOM bandwidth, and the CDP fingerprint above. Fine for low-frequency or deterministic work; it’s the shape that hurts most in a vision loop.CDP connection notes if you take this path:- CDP connections are meant to be long-lived but may eventually close. WebSocket connections typically stay active for up to an hour, after which they may close automatically. The browser session is unaffected — reconnect to the same
cdp_ws_urlto continue. - Browsers persist independently of CDP. Depending on your timeout configuration, a browser keeps running even after its CDP connection closes.
- Implement reconnect logic. Network interruptions and lifecycle events can close a CDP session; detect the disconnect and re-establish the connection.
Where computer use fits
A computer-use agent answers the first question, not the second — it still has to run its loop somewhere. And because every turn ships a screenshot instead of a small script, running that loop off-platform is far more expensive than for a Playwright-driven agent: you pay image bandwidth and a round trip on every step of the loop. So computer use is the strongest case for co-locating your loop with the browser. Model inference sits with the model vendor either way; what you’re deciding is where the screenshot-and-act loop lives.Putting it together
Control reference
Working examples of all four control surfaces.