CloakBrowser vs. Camoufox vs. Undetected-Chromedriver: A Stealth Browser Comparison for AI Agents
A stealth browser is a browser-automation tool that makes an automated session look human to the website. An AI agent can fail mid-session. In our tests, a stealth browser loaded a protected site's landing page and was blocked on page 2. This guide compares CloakBrowser, Camoufox, and undetected-chromedriver on multi-step sessions and shows which fits your agent.
Justinas Tamasevicius
Last updated: Oct 20, 2026
12 min read

TL;DR
- CloakBrowser fits Playwright and Puppeteer agents best because it keeps Chromium and the Chrome DevTools Protocol (CDP), and Browser-use attached to it in our test.
- Camoufox has the most complete fingerprint control and runs on Firefox, so CDP-only frameworks such as Browser-use 0.13.11 can't attach to it.
- undetected-chromedriver still works for existing Selenium code, though its last release dates from 2024 and its author calls nodriver the official successor.
- No tool we tested held a full session on every protected site, and complete sessions also needed a clean residential IP. On a 3-page login task, code that sent public pages to a scraping endpoint cut our agent's time from 314 s to 41 s.
What agentic browsing requires that scraping doesn't
Agentic browsing is an LLM-driven loop that reads a page, decides on an action, performs it, and repeats until the goal is met. Frameworks such as Browser-use and most Model Context Protocol (MCP) servers drive Chromium over CDP.
A scraper and an agent fail in different ways:
- A scraper works from a known list of requests and retries a failed URL cheaply.
- An agent discovers its next action from the page it loaded, so a block at step 30 of 40 can waste steps 1 to 29.
- An agent holds state, such as cookies and a logged-in session, for minutes.
Failed runs cost browser time and tokens. To reduce both, agent workflows that call live web data can send some steps to a scraping API endpoint instead of the browser.
The 3 tools change the browser, not the agent loop, so it helps to know how headless browsers work. Each tool is measured on 4 axes:
- Session survival. Whether the session runs 30 or more actions without a block or challenge.
- Step latency. Milliseconds per action, multiplied by the steps in a task.
- Framework compatibility. Whether an agent framework that drives CDP can attach to the browser.
- Operational cost. Memory per session, update frequency, and licensing.
Our tests ran in an 8-core Linux arm64 Docker VM on an Apple host, mostly from one home broadband IP. Every test used CloakBrowser's free keyless build (Chromium 146, 58 patches, no license key), Camoufox 156.0.1-beta.36, and undetected-chromedriver on Google Chrome 155. Sessions ran 12 steps on an unprotected site and up to 30 pages on protected ones.
Live tests ran headless unless noted, which makes a browser easier to detect. Our sample was small, so confirm the survival results on your own targets.
The 4 signal layers, and which ones a stealth browser covers
Anti-bot systems commonly collect signals from 4 layers to profile a session:
- IP reputation. The IP's type, history, and location, scored before any JavaScript runs.
- Browser fingerprint. Canvas, WebGL, audio, fonts, hardware values, and CDP leaks such as navigator.webdriver.
- Transport fingerprint. The TCP/IP stack, the JA4 TLS fingerprint, and HTTP/2 frame settings, which should match the device the session claims to be.
- Behavioral signals. Cursor paths, scroll patterns, and keystroke timing across the session.
Detection systems check whether these layers agree. CloakBrowser, Camoufox, and undetected-chromedriver all work on the fingerprint layer, and CloakBrowser and Camoufox also handle the behavior layer. Input at exact, regular intervals across dozens of agent steps is a recognizable pattern for systems that score a session over time, such as DataDome. The IP layer comes from your proxy setup, because a clean fingerprint on a flagged IP can still fail.
The TCP/IP stack belongs to the machine that opens the connection, so a browser patch can't change it. The container's traffic used the macOS host's network stack. A TCP/IP classifier therefore identified CloakBrowser, Camoufox, and stock Playwright as the same Apple device, even when they claimed Windows.
Behind a proxy, the site sees the proxy exit's TCP/IP stack instead of your machine's. That stack is part of what Cloudflare checks before it serves a page.
CloakBrowser: Source-patched Chromium behind the Playwright API
CloakBrowser is a custom Chromium binary with fingerprint changes compiled into the browser source. MIT-licensed wrappers for Python, JavaScript, and .NET launch it through the standard Playwright and Puppeteer APIs. Wrapper 0.6.3 downloads a Chromium 154 build with a free or paid key, and its README keeps the current patch list. CloakBrowser's Windows fingerprint needs Windows fonts, so install them first on Linux.
Our test page runs 3 checks that detect an attached CDP client. CloakBrowser triggered none. Stock Playwright triggered 1 and reported navigator.webdriver as true:

The humanize=True flag covers the behavior layer. Per the README and changelog, it adds curved mouse paths, typing delays modeled on a 136M-keystroke study, and wheel scrolling. The flag costs time, because our median 12-step CloakBrowser task took 19.52 s with humanize and 6.31 s without it. Practitioners usually enable it on targets that score behavior, such as anti-fraud checks.
In wrapper 0.6.3, the flag also changes how clicks behave. A stock Playwright click waits until the next page starts to load. In a several-run check with humanize on, the click returned while the next page was still loading, and an immediate check found 0 quotes. An explicit navigation wait fixes it:
With the wait, the script reached page 2 and counted its 10 quotes:
CloakBrowser scores best on framework compatibility. We attached Browser-use through cdp_url, and the page still read navigator.webdriver as false. Humanize runs in the wrapper, so it doesn't apply when a framework drives raw CDP. The third-party stealth browser MCP server cloakbrowser-mcp wraps CloakBrowser as an agent tool.
The attach takes a debugging port and a matching cdp_url:
For logged-in agents, the wrapper's persistent context kept the same fingerprint in 4 of 4 restarts. CloakBrowser also has 5 trade-offs for agent work:
- The binary is proprietary. The binary license allows internal Docker and CI use, but embedding it for third parties needs an OEM or SaaS license.
- Pricing depends on concurrent sessions. A free GitHub sign-in unlocked the current build for 1 session when we tested. Paid plans add concurrent sessions, with current prices on the CloakBrowser site. The keyless build we tested reported Chrome 146, 9 versions behind stable.
- Crashed sessions keep their license seats. Per the wrapper source, a killed session frees its seat after 4 to 30 minutes. After connect_over_cdp(), browser.close() only disconnects, so close the browser from the process that launched it.
- Each fingerprint needs its own process. In 1 browser, 8 contexts shared 1 fingerprint, so separate fingerprints cost 170 MB each instead of 96 MB.
- You handle CAPTCHA solving and proxy rotation. Pair CloakBrowser with a proxy pool.
In wrapper 0.6.3, the Playwright request client ignores a proxy passed as a browser flag (issue #579). With the proxy passed as –proxy-server, page.goto() went through it, and page.request.get() bypassed it. A context-level proxy covers both kinds of requests:
The script prints the proxy's exit IP, confirming that page.request uses the proxy. See how driver-level patching of Playwright and Puppeteer works and our guide to fingerprint defense with a patched browser build.
Camoufox: Engine-level fingerprint injection on Firefox
Camoufox is a modified Firefox build that injects navigator values, screen metrics, fonts, and WebGL data at the engine level. Playwright drives it through Juggler, the Firefox automation protocol that replaces CDP.
Camoufox is built for targets that check fingerprints closely. It doesn't add noise to canvas output. Stock Firefox draws the same pixels every time, so a browser whose canvas results change looks fake. On Linux, Camoufox's Windows fingerprint still had Segoe UI and Calibri, fonts that CloakBrowser leaves you to install.
The Firefox engine changes 3 things for agents:
- Browser-use 0.13.11 is CDP-only. It has no Firefox support, and Camoufox has no CDP endpoint.
- Playwright MCP accepts a Firefox target, so an agent loop built on Playwright is the practical option.
- Page variables need main_world_eval. Camoufox runs scripts apart from the page by default, so agent code needs it to read the page's own variables.
A CAPTCHA provider's script created a Worker from the Juggler package. Stock Firefox doesn't have that package, so the script could detect Camoufox. In beta.36, the release Camoufox ships as stable, the fix that hides Juggler from pages was only in prerelease builds. Check new stable releases for it.
The Camoufox input-dispatch notes record 4 input deadlocks, where one lost mouse event froze every tab with no error. The deadlock fix drops such events after 5 s.
Camoufox uses more memory. After the 12-step task, Camoufox used a median of 762 MB of memory against 348 MB for CloakBrowser across 5 runs. We measured proportional set size, which divides shared memory among the processes that use it.
For fleets, Camoufox's NewContext() helper creates a new fingerprint for each browser context, so many fingerprints can share 1 process. Only 6 of our 8 were distinct.
Pin a device preset to keep the same fingerprint. In beta.36, a restarted profile kept its cookies and localStorage but returned as a different device in 5 of 6 restarts. A logged-in agent on a new device can trigger a re-check. Camoufox ships recorded real-device presets, so pin one per profile:
Across 3 launches, the script printed the same fingerprint, a Linux preset, the same OS as the host:
Spoofing another OS needs canvas noise, which the project says no real machine produces.
Licensing is the simplest of the 3. The browser is MPL-2.0, a file-level copyleft, so you can ship it in a product if you make the source of its MPL files available.
If you need a Camoufox alternative that CDP agent frameworks can attach to, CloakBrowser and Patchright, a patched Playwright driver for Chromium, both qualify. For installation and launch code, follow our full Camoufox setup walkthrough.
undetected-chromedriver: Driver-level patching for Selenium
undetected-chromedriver is a patched Selenium ChromeDriver that removes the automation flags a stock driver exposes. Its patcher deletes the cdc_ block that ChromeDriver injects.
It still works for existing Selenium code on lightly protected sites. For agent work, 3 limits make other tools a better fit:
- The WebDriver layer remains, and it leaves traces that detection scripts can find.
- Updates have slowed. The last PyPI release, 3.5.5, dates from 2024.
- A successor exists. Its author describes nodriver as the official successor.
Headless mode can expose the automation. On the GPU-less test container, the headless session reported HeadlessChrome/155 in its user agent and used SwiftShader, a software renderer. It also reported an 800x600 screen with a larger 1920x993 window, which no real device has.
The tool had the lowest step latency in our benchmark, at 386 ms, and it works with Selenium tooling only. On 2 protected sites in our live tests, it stopped at page 1, so it fits lightly protected targets.
For an existing project, see our undetected ChromeDriver setup in Python. For new work, read how nodriver replaces the ChromeDriver layer entirely.
Side-by-side: Stealth browsers compared on agent workloads
Both tables cover the 3 tools plus 4 related projects. Latency comes from our benchmark, and the other cells from each project's docs, code, and license:
Tool
Engine and bindings
Agent framework compatibility
Step latency (mean, 12-step task)
Switching from stock code
CloakBrowser
Chromium with Python, JavaScript (Playwright, Puppeteer), and .NET
CDP, Browser-use attached in our test
528 ms, or 1,658 ms humanized
Change the launch call, and Playwright code stays
Camoufox
Firefox with Python and TypeScript
Playwright over Juggler, no CDP
512 ms, or 771 ms humanized
Change the launch call, and CDP-based code needs rework
undetected-chromedriver
Installed Chrome with Python (Selenium)
Selenium WebDriver only
386 ms
Change the driver constructor, and Selenium code stays
Patchright
Chromium or Chrome with Python and Node.js
CDP, through the Playwright API
Not in our benchmark
Change the import
nodriver
Chrome with Python
CDP, through its own API
Not in our benchmark
Rewrite to its async API
playwright-stealth
Playwright browsers with Python
CDP, through the Playwright API
Not in our benchmark
Add it to existing Playwright code
SeleniumBase (UC Mode)
Chrome with Python
Selenium, plus CDP Mode
Not in our benchmark
Switch to its Driver class, and Selenium calls stay
CloakBrowser vs. Camoufox vs. undetected-chromedriver, with 4 related projects, on the agent axes. Latency is the mean per step across 10 headless runs, with the keyless CloakBrowser 146 build.
The second table covers the stealth and its cost:
Tool
Where the stealth is applied
Behavior layer
Licensing and redistribution
Cost model
CloakBrowser
Binary (C++ source patches) plus wrapper
humanize=True in the wrapper, not over raw CDP
Proprietary binary with MIT wrappers, OEM license to redistribute
Keyless build free, paid plans by concurrent sessions
Camoufox
Engine (C++ Firefox patches)
Cursor humanization
MPL-2.0 browser (LGPLv3+ cursor component), MIT launchers
Free license, runs on your servers
undetected-chromedriver
Driver patch
None built in
GPL-3.0
Free license, runs on your servers, no release since 2024
Patchright
Driver (patched Playwright)
None built in
Apache-2.0
Free license, runs on your servers
nodriver
CDP library with no WebDriver
None built in
AGPL-3.0
Free license, runs on your servers
playwright-stealth
JavaScript injection (baseline)
None built in
MIT
Free license, runs on your servers
SeleniumBase (UC Mode)
Driver patch plus CDP Mode
None built in
MIT
Free license, runs on your servers
Both tables support a short decision path:
- If your Playwright or Puppeteer agent gets flagged and you can pay per concurrent session, start with CloakBrowser.
- If you run a purpose-built scraper on a target that checks fingerprints closely and want stealth code you can review, start with Camoufox.
- If you maintain legacy Selenium code on lightly protected sites, keep undetected-chromedriver and plan a move to nodriver.
- If you embed a browser in a product you distribute, compare licenses before performance.
- If your agent mostly reads public pages, fetch those pages through a scraping endpoint and keep the browser for logins.
Compare how Playwright and Selenium differ as automation layers, and see configuring stealth on stock Playwright for the baseline row.
How to benchmark stealth browsers against your own targets
Fingerprint test pages are a first check, not a full benchmark for agents:
- They cover one page load, which can't show a block that arrives later in a session.
- They don't test navigation, form input, or state that persists between steps.
A harness that measures each step
A multi-step harness runs 1 task through the 3 tools and measures each step:
- Load quotes.toscrape.com, move to pages 2 and 3, and log in.
- Read a view that only renders after login.
- Repeat N times per browser, and record completion rate, wall-clock time, time per step, and the step index of each failure.
Install the tested versions. Python 3.12+ also needs setuptools, because undetected-chromedriver imports distutils:
Save the script as stealth_bench.py. It reads an optional proxy from an environment variable and prints a summary table:
Without humanize, all 10 headless runs completed on all 3 tools:
With –humanize, the same 10 runs took 3.1x longer on CloakBrowser and 1.5x longer on Camoufox:
The step index caught the click bug early, because humanized CloakBrowser stopped at step 4 in all 5 runs without the navigation wait. A tool that fails at the same step every time has a specific, fixable problem. A tool that fails at random steps has a bot-detection problem that code changes rarely fix. The cause is often a challenge page that appears mid-run.
Session survival on protected sites
Protected sites show what the harness can't. On 4 sites behind different bot-protection products, 5-page sessions from our home IP loaded these pages before the first block:
Pages before the first block, of 5
CloakBrowser
Camoufox
Stock Playwright
Site A (retail)
1 of 5
5 of 5
1 of 5
Site B (real estate)
5 of 5
1 of 5
0 of 5 headless, 1 of 5 headed
Site C (B2B reviews)
0 of 5
0 of 5
0 of 5
Site D (classifieds)
0 of 5
0 of 5
0 of 5
Over 30 pages on sites A and B, with 5 to 9 s of reading per page, sessions ended like this:
30-page session
CloakBrowser
Camoufox
undetected-chromedriver (Google Chrome)
Site A (retail)
Blocked at page 2 (HTTP 403)
30 of 30
Page 1 timed out after 45 s
Site B (real estate)
30 of 30
Blocked at page 2 (HTTP 403)
Blocked at page 1
An agent built on Playwright can keep both engines and choose per domain. Keep watching each domain's block rate, because results change over time.
Every block in these tests returned HTTP 403. Practitioners also report challenge pages served with HTTP 200, so check the page for the fields you need. That check also catches pages built to mislead automated readers.
Adding a clean IP changes the results. Each 8-page session ran on its own sticky residential IP from the site's country, kept for the whole session. Both stealth browsers' geoip option matched timezone and locale to that IP:
Sessions that loaded all 8 pages, out of 4
CloakBrowser
Camoufox
Stock Playwright
Site A (retail)
0 of 4, blocked at page 2
2 of 4
0 of 4
Site B (real estate)
1 of 4
0 of 4
0 of 4
Site D (classifieds)
3 of 4
3 of 4
0 of 4
The table leaves out site C, which stopped every browser at page 1 in both tests. Site D needed both layers. The stealth browsers completed sessions on clean residential IPs, and stock Playwright on the same kind of IPs did not. Our home IP worked on site D only until it was flagged after a day of test traffic.
On site A, Camoufox completed sessions on the same kind of IPs, so CloakBrowser's block at page 2 points to the fingerprint layer. That layer included our keyless build's old Chrome version. Site B changed over time and later blocked CloakBrowser from our home IP too, so the 30-page result didn't repeat.
Survival depends on the site, the browser, and the IP together, so test each target with both layers in place
Splitting the work: Which agent steps need a browser and which need an endpoint
The split rests on 2 things: what a stealth browser costs and a rule for each step.
What a stealth browser costs
A stealth browser has costs that patching alone doesn't remove, starting with memory. Memory per profile depends on how the 8 profiles share processes:
8 profiles at once (second of 2 runs)
Memory per profile
Median task
Distinct fingerprints (6 values, user agent to canvas hash)
CloakBrowser, 8 processes
170 MB
6.2 s
8
CloakBrowser, 8 contexts in 1 process
96 MB
5.8 s
1
Camoufox, 8 NewContext() profiles in 1 process
215 MB
9.4 s
6
Camoufox, 8 processes
514 MB
49 to 59 s across 2 runs, 1 task failed
7
There are 3 more costs:
- Constant rebuilds. Every source-patched build needs a rebuild after each Chromium or Firefox release. Paid CloakBrowser builds moved from Chromium 150 to 154 in under 3 months.
- The IP layer. A flagged IP can fail a session early, so rotate IPs between sessions and read why rotating IPs changes what a target sees. Keep 1 sticky IP within each agent session, because an IP change mid-login can look like a hijacked session. If an account logs in every day, give it a static IP, so its IP stays as stable as its device fingerprint.
- Slow steps cost hours. An extra 400 ms per action adds 16 s to a 40-step task. Humanize in CloakBrowser added 1.13 s per step, about 12.6 hours across 1,000 nightly 40-step tasks.
So reserve the stealth browser for the steps that need it.
The routing rule
Some sites offer agents an official way in. Cloudflare treats signed agents as verified bots if they use Web Bot Auth, an IETF draft, and behave without abuse. WebMCP is another way in, because it lets sites expose actions directly to agents.
In our 12-step task, 6 steps read public pages, and the other 6 logged in or used the session. Apply these rules in order:
- If the site offers official agent access, such as signed agents or WebMCP actions, use that access with the agent's signature.
- If the step needs authentication, holds state, or performs an action, use the stealth browser. Confirm you're authorized first, because logging in usually means accepting the site's terms.
- If the step reads a public page and returns content to the model, use a scraping endpoint. Add JavaScript rendering when the page builds its content in the browser.
- If the step discovers pages across a site before deciding what to read, use a crawling endpoint.
For the read-only path, the agent calls the Decodo Web Data API /scrape endpoint. One HTTP call from inside the loop returns the page as Markdown for the model, with JavaScript rendering available per request. Decodo manages the proxies server-side, so the agent sends a URL and reads the result.
For the quotes homepage, the response's Markdown starts like this:
For the discovery path, the agent calls the /crawl endpoint. The agent sets path filters, receives each matching page's content, and then decides which pages need a browser step. Crawling and scraping differ because discovery and extraction are separate jobs.
Each page fetch is one HTTP request, so fetches can run in parallel. What AI-driven scraping changes and an end-to-end LangChain workflow show the endpoint workflow.
For the browser steps, read how residential IP pools are sourced and routed.
In a test with a Browser-use 0.13.11 agent, gpt-5-mini had to log in to the quotes site and list authors on pages 1 to 3. CloakBrowser ran every browser step, with a 30-step limit:
Same task, 3 runs each
Correct
Agent steps
Median time
Median prompt tokens
Median LLM token cost
Every step in the browser
2 of 3
30
314 s
424K
$0.105
Rule in code (browser logs in, the endpoint reads 3 pages, 1 model call extracts the authors)
3 of 3
4 to 5
41 s
33K
$0.011
Final thoughts
CloakBrowser fits agents built on Playwright or Puppeteer, and Camoufox fits targets that check fingerprints closely if your agent can drive Firefox without CDP. Keep undetected-chromedriver for existing Selenium code until you move to nodriver. Each one covers the fingerprint layer, so pair it with clean IPs, because a blocked IP stays blocked after you switch browsers.
The question isn't which stealth browser wins, but how few of your agent's steps need one. Run the harness on your own targets, record each failure's step index, and move read-only steps to a scraping endpoint.
Stealth needs clean IPs
Pair your stealth browser with 115M+ residential IPs across 195+ countries.
About the author

Justinas Tamasevicius
Director of Engineering
Justinas Tamaševičius is Director of Engineering with over two decades of expertise in software development. What started as a self-taught passion during his school years has evolved into a distinguished career spanning backend engineering, system architecture, and infrastructure development.
Connect with Justinas via LinkedIn.
All information on Decodo Blog is provided on an as is basis and for informational purposes only. We make no representation and disclaim all liability with respect to your use of any information contained on Decodo Blog or any third-party websites that may belinked therein.


