# CloakBrowser — Stealth Chromium for AI Browser Automation > CloakBrowser is a stealth Chromium fork that passes every major bot detection test, offering a drop-in Playwright replacement with source-level fingerprint patches for reliable AI-driven browser automation. ## Install Save in your project root: # CloakBrowser — Stealth Chromium for AI Browser Automation ## Quick Use ```bash pip install cloakbrowser from cloakbrowser import CloakPage async with CloakPage() as page: await page.goto("https://example.com") ``` ## Introduction CloakBrowser provides a patched Chromium binary that evades bot detection systems, making it suitable for AI agents that need to interact with websites reliably. It is a drop-in replacement for Playwright with source-level fingerprint modifications rather than runtime JavaScript injection. ## What CloakBrowser Does - Patches Chromium at the source level to remove bot detection fingerprints - Passes major detection suites including BotD, CreepJS, and Cloudflare - Provides a Playwright-compatible API for seamless migration - Supports headless and headed modes for different automation scenarios - Works with AI agents like Browser Use and Stagehand for web tasks ## Architecture Overview CloakBrowser compiles a modified Chromium build that alters low-level browser properties often used for bot fingerprinting. Unlike runtime-patching approaches, the changes are baked into the binary, making them harder to detect. The Python SDK wraps the binary with a Playwright-compatible async API. ## Self-Hosting & Configuration - Install via pip for the Python SDK and pre-built Chromium binary - Use the CloakPage context manager as a direct Playwright Page replacement - Configure proxy settings for rotating IPs in automation workflows - Set user agent and viewport options per session - Enable headed mode for debugging and visual verification ## Key Features - Source-level Chromium patches instead of runtime JavaScript hacks - Passes 30/30 tests on major bot detection benchmarks - Drop-in Playwright replacement with minimal code changes - Headless and headed mode support - Python async API for integration with AI agent frameworks ## Comparison with Similar Tools - **Playwright** — detected by most bot protection; CloakBrowser evades them - **Puppeteer Stealth** — runtime JS patches that can be detected; CloakBrowser patches at source - **undetected-chromedriver** — Selenium-based; CloakBrowser is Playwright-native - **Browser Use** — agent framework; CloakBrowser is the browser layer underneath ## FAQ **Q: Is CloakBrowser legal to use?** A: CloakBrowser is a development and testing tool. Users must comply with target website terms of service and applicable laws. **Q: Does it work with existing Playwright scripts?** A: Yes. CloakBrowser provides a Playwright-compatible API, so most scripts require minimal changes. **Q: How often is the Chromium base updated?** A: The project tracks upstream Chromium releases and applies patches to new versions regularly. **Q: Can I use it with Python AI agent frameworks?** A: Yes. It integrates with Browser Use, Stagehand, and other Python-based agent tools. ## Sources - https://github.com/CloakHQ/CloakBrowser - https://github.com/CloakHQ/CloakBrowser#readme --- Source: https://tokrepo.com/en/workflows/asset-3211cfc9 Author: AI Open Source