# System map — browser-use/browser-use

> Canonical page: https://codevetter.com/unpack/browser-use/system-map

# System map — browser-use/browser-use

Scanned commit d8110c5ff87ccba887aaa726cdb780f2f84bef8d (2026-09-15). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

The installable package is browser_use, built with hatchling and exposed as the console scripts browser-use, browseruse, bu, and browser (browser_use.cli:main), plus python -m browser_use. The runtime splits into an Agent orchestrator, a BrowserSession that owns a bubus event bus and a cdp-use CDP client, a Tools/Registry action layer, and a DomService that serializes the page for the model. Persistence is local (temp agent directories, cookie storage state, config under ~/.config/browseruse) plus optional cloud event sync. External systems are the Browser Use cloud browser API, the LLM gateway, the sandbox stream API, PostHog telemetry, and optional provider SDKs (OpenAI, Anthropic, Google, Groq, Ollama, AWS, MCP). CI is GitHub Actions: per-file pytest of tests/ci, ruff/pre-commit/pyright, PyPI publish on GitHub release, and a multi-arch Docker image.
- pyproject.toml names the package browser-use version 0.13.10, requires Python >=3.11,<4.0, and registers console scripts browser-use, browseruse, bu, and browser to browser_use.cli:main, with the deprecated browser-use-tui alias. — [pyproject.toml#L1-L109](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/pyproject.toml#L1-L109)
- The public import surface is lazy: browser_use/__init__.py __getattr__ loads Agent, Tools, Controller, DomService, Chat* model classes, and sandbox on first access, and maps the name Browser to BrowserSession. — [browser_use/__init__.py#L76-L137](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/browser_use/__init__.py#L76-L137)
- python -m browser_use calls browser_use.cli.main and exits with its return code. — [browser_use/__main__.py#L1-L10](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/browser_use/__main__.py#L1-L10) [browser_use/cli.py#L423-L458](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/browser_use/cli.py#L423-L458)
- Agent in browser_use/agent/service.py is the task orchestrator. BrowserSession in browser_use/browser/session.py owns the CDP connection, tab targets, and a bubus event bus; start() is handled by on_BrowserStartEvent, which attaches watchdogs before launching or connecting. — [browser_use/agent/service.py#L134-L301](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/browser_use/agent/service.py#L134-L301) [browser_use/browser/session.py#L786-L888](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/browser_use/browser/session.py#L786-L888)
- BrowserSession.attach_all_watchdogs constructs Downloads, StorageState (conditional), LocalBrowser, Security, AboutBlank, Popups, Permissions, DefaultAction, Screenshot, DOM, Recording, optional HAR, and optional Captcha watchdogs. CrashWatchdog registration in that method is commented out. — [browser_use/browser/session.py#L1688-L1837](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/browser_use/browser/session.py#L1688-L1837)
- Local Chrome is started by LocalBrowserWatchdog.on_BrowserLaunchEvent → _launch_browser, which returns a psutil.Process and a CDP URL. Cloud browsers are created when BrowserProfile.use_cloud or cloud_browser_params is set, via CloudBrowserClient.create_browser POST {api}/api/v2/browsers using BROWSER_USE_API_KEY or CloudAuthConfig. — [browser_use/browser/watchdogs/local_browser_watchdog.py#L49-L93](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/browser_use/browser/watchdogs/local_browser_watchdog.py#L49-L93) [browser_use/browser/session.py#L800-L816](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/browser_use/browser/session.py#L800-L816) [browser_use/browser/cloud/cloud.py#L19-L65](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/browser_use/browser/cloud/cloud.py#L19-L65)
- Configuration is env-driven. OldConfig and FlatEnvConfig in browser_use/config.py read BROWSER_USE_LOGGING_LEVEL, ANONYMIZED_TELEMETRY, BROWSER_USE_CLOUD_SYNC, BROWSER_USE_CLOUD_API_URL (default https://api.browser-use.com), LLM keys, and proxy vars. Config, profiles, and extensions live under BROWSER_USE_CONFIG_DIR, defaulting to ~/.config/browseruse. — [browser_use/config.py#L47-L130](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/browser_use/config.py#L47-L130) [browser_use/config.py#L191-L244](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/browser_use/config.py#L191-L244) [.env.example#L1-L71](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/.env.example#L1-L71)
- If Agent is constructed with llm=None and DEFAULT_LLM is empty, it instantiates ChatBrowserUse(). get_llm_by_name in browser_use/llm/models.py is the string factory for openai_, azure_, google_, anthropic_, mistral_, cerebras_, and bu_ names and refuses OCI (use ChatOCIRaw directly). — [browser_use/agent/service.py#L225-L239](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/browser_use/agent/service.py#L225-L239) [browser_use/llm/models.py#L89-L226](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/browser_use/llm/models.py#L89-L226)
- ChatBrowserUse posts to BROWSER_USE_LLM_URL or https://llm.api.browser-use.com, default model bu-2-0, and requires BROWSER_USE_API_KEY. The @sandbox decorator posts cloudpickled user code to https://sandbox.api.browser-use.com/sandbox-stream. — [browser_use/llm/browser_use/chat.py#L31-L107](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/browser_use/llm/browser_use/chat.py#L31-L107) [browser_use/sandbox/sandbox.py#L215-L366](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/browser_use/sandbox/sandbox.py#L215-L366)
- CI test workflow .github/workflows/test.yaml discovers every tests/ci/**/test_*.py and runs them as a matrix on ubuntu with uv, IN_DOCKER=true, and ANONYMIZED_TELEMETRY=false. lint.yml runs ruff PLE, pre-commit, and pyright. publish.yml uploads to PyPI on GitHub release. docker.yml builds and publishes the image. The root Dockerfile is python:3.12-slim with IN_DOCKER=True. — [.github/workflows/test.yaml#L15-L120](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/.github/workflows/test.yaml#L15-L120) [.github/workflows/lint.yml#L22-L54](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/.github/workflows/lint.yml#L22-L54) [.github/workflows/publish.yml#L16-L79](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/.github/workflows/publish.yml#L16-L79) [.github/workflows/docker.yml#L1-L40](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/.github/workflows/docker.yml#L1-L40) [Dockerfile#L20-L62](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/Dockerfile#L20-L62) [bin/test.sh#L1-L9](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/bin/test.sh#L1-L9)
- DomService.get_dom_tree / get_serialized_dom_tree is the DOM boundary the agent consumes. FileSystem and ScreenshotService are rooted at a per-run temp directory tempfile.gettempdir()/browser_use_agent_{id}_{timestamp} unless file_system_path is passed. — [browser_use/dom/service.py#L45-L56](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/browser_use/dom/service.py#L45-L56) [browser_use/agent/service.py#L444-L453](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/browser_use/agent/service.py#L444-L453) [browser_use/filesystem/file_system.py#L503-L516](https://github.com/browser-use/browser-use/blob/d8110c5ff87ccba887aaa726cdb780f2f84bef8d/browser_use/filesystem/file_system.py#L503-L516)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
