Production-grade, human-mimicking browser automation framework for autonomous agents. Survives modern anti-bot systems.
Project description
Agentic Stealth Browser
A Python framework that makes browser automation look human. Built for autonomous agents that need to navigate websites protected by Cloudflare, LinkedIn, Amazon, and other anti-bot systems.
Why This Exists
Standard browser automation (page.goto(), page.click()) gets detected instantly. This framework solves that by combining:
- TLS fingerprint spoofing — matches real browser TLS handshakes
- Human behavior simulation — natural mouse, typing, scrolling with realistic imperfections
- Automatic recovery — detects blocks (CAPTCHAs, rate limits) and recovers without crashing
- Account lifecycle management — warming, health scoring, cooling off
Installation
pip install agentic-stealth-browser
playwright install --with-deps chromium
Quick Start
from core.agent_browser import AgentBrowser
import asyncio
async def main():
browser = AgentBrowser(session_name="demo")
await browser.launch(headless=True)
# This handles stealth, human behavior, and recovery automatically
await browser.safe_goto("https://example.com")
# Add human-like actions
await browser.human.scroll_naturally(400)
await browser.human.think(1500, 2800)
await browser.close()
asyncio.run(main())
Real-World Example
For protected sites, load real cookies and use a platform preset:
browser = AgentBrowser(session_name="linkedin")
await browser.launch(preset="linkedin_2026")
await browser.load_cookies_from_file("cookies.json")
await browser.warm_up_before_work(intensity="heavy")
await browser.safe_goto("https://www.linkedin.com/feed/", platform="linkedin")
The flow: cookies → warm-up → navigate → recover if blocked → act human.
How It Works
AgentBrowser
├── Stealth → TLS profiles, canvas/WebGL spoofing, WebRTC isolation
├── Behavior → Bézier mouse, natural typing, distraction simulation
├── Recovery → Detects blocks → rotates proxy/session → retries
├── Accounts → Health scoring, 14-day warming, session checkpointing
└── Proxy → Residential proxy with rotation and health tracking
Key Features
| Feature | What It Does |
|---|---|
| TLS Fingerprinting | Region-specific profiles (US, Japan, EU, Korea) with JA3/JA4 support |
| Human Behavior | Mouse with wobble, typing with mistakes, variable scrolling, fatigue |
| Auto Recovery | Detects CAPTCHAs, rate limits, blocks — recovers automatically |
| Account Warming | 14-day gradual ramp-up so new accounts don't get flagged |
| Session Checkpoints | Export/import browser state for cross-host migration |
| Platform Presets | Pre-configured profiles for LinkedIn, Amazon, Cloudflare |
| MCP Server | Integration with AI agents via Model Context Protocol |
Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
STEALTH_REGION |
TLS fingerprint region | japan |
STEALTH_HEADLESS |
Run browser headless | true |
STEALTH_PROXY |
Use residential proxy | false |
Platform Presets
await browser.launch(preset="linkedin_2026") # LinkedIn
await browser.launch(preset="amazon_2026") # Amazon
await browser.launch(preset="cloudflare") # Cloudflare-protected sites
Project Structure
agentic-stealth-browser/
├── core/ # AgentBrowser main class
├── stealth/ # TLS fingerprinting, script injection, caching
├── behavior/ # Human-like mouse, typing, scrolling, personas
├── recovery/ # Block detection, anti-block orchestrator
├── proxy/ # Proxy management and rotation
├── sessions/ # Session and cookie management
├── audit/ # Structured logging and audit trails
├── ai/ # AI hooks and content analysis
├── production/ # CLI, Docker, rate limiting, metrics
├── linkedin/ # LinkedIn-specific actions
├── scraping/ # Safe page scraping utilities
├── docs/ # Architecture Decision Records and guides
└── tests/ # 493 tests across 23 files
Documentation
- Architecture Decision Records
- Visual Debugging Guide
- Stealth Limitations
- Threat Model
- Common Pitfalls
- Rate Limiting & Backoff
- Cookie & Session Resilience
Security
See SECURITY.md for vulnerability reporting and best practices.
Responsible Use
This framework is designed for legitimate automation use cases such as:
- Testing your own applications and infrastructure
- Automating workflows on platforms that permit automation
- Research and security analysis
- Accessibility testing
Important: Many websites (including LinkedIn, Amazon, and others) prohibit automated access in their Terms of Service. Always:
- Review the target site's Terms of Service and robots.txt
- Obtain proper authorization before automating access
- Respect rate limits and avoid causing harm to services
- Use this tool responsibly and legally
This project is provided as-is under the MIT License. Users are responsible for complying with applicable laws and terms of service.
Contributing
See CONTRIBUTING.md for guidelines.
License
MIT License. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentic_stealth_browser-0.8.0.tar.gz.
File metadata
- Download URL: agentic_stealth_browser-0.8.0.tar.gz
- Upload date:
- Size: 181.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36e545f649cf76647dabaa3992defc9097afbf5b13c50ebda3212b81681011a8
|
|
| MD5 |
bc400f7ecf7d40020a95e2a934286b9d
|
|
| BLAKE2b-256 |
1672624b3a19b4d8a4cf603bb3066942f2135ea968b2e03cf8baab0bb3a79b57
|
File details
Details for the file agentic_stealth_browser-0.8.0-py3-none-any.whl.
File metadata
- Download URL: agentic_stealth_browser-0.8.0-py3-none-any.whl
- Upload date:
- Size: 142.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12a92be8483be73da0aed9900de9ea95af49a0ed2ff14ee2cc3a59e896aeca37
|
|
| MD5 |
a330937d444a4eb1701c747c4b539c62
|
|
| BLAKE2b-256 |
6eeb6178c47377d443d6f41324f223a7ef37510d68641c36bb33b520f810a855
|