Runnable examples showing how a Browser Use agent can call the official capsolver-agent tools when a supported CAPTCHA interrupts an authorized browser task.
This is an examples repository. It is not a separately published Python package and does not contain another CapSolver SDK.
| This repository contains | This repository does not contain |
|---|---|
| Browser Use action registration | A browser-use-capsolver PyPI package |
| Runnable integration examples | Duplicated solving or browser-detection logic |
| Environment and CI templates | Independent SDK releases or versioning |
CapSolver behavior remains in capsolver-agent and its shared capsolver-core engine. This repository only demonstrates the framework wiring.
- Browser Use decides that a supported CAPTCHA is blocking the authorized task.
- A registered Browser Use action calls
capsolver_agent.create_executor(). - The executor runs the canonical
solve_captchaor account tool. - The structured result returns to Browser Use so the original task can continue.
Requirements: Python 3.10+, a CapSolver API key, and the model-provider key used by Browser Use.
git clone https://github.com/capsolver-ai/browser-use-capsolver.git
cd browser-use-capsolver
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txtExport the values shown in .env.example, then run:
python examples/quickstart.pyThe example intentionally uses a user-supplied task. Test only on pages and accounts you are authorized to automate.
from browser_use import Tools
from capsolver_agent import create_executor
tools = Tools()
capsolver = create_executor()
@tools.action(description="Solve a supported CAPTCHA in an authorized workflow.")
async def solve_captcha(captcha_type: str, website_url: str, website_key: str) -> str:
result = await capsolver.execute("solve_captcha", {
"captcha_type": captcha_type,
"website_url": website_url,
"website_key": website_key,
})
return str(result)See examples/quickstart.py for the complete runnable flow.
solve_captcha: solve using a known CAPTCHA type, page URL, and site key.detect_captchas: inspect a page URL with the browser extra installed.solve_on_page: detect, solve, and fill supported challenges in browser mode.get_balance: retrieve the current CapSolver balance.get_supported_captchas: list the capabilities in the installed SDK build.
examples/quickstart.py Browser Use action registration and agent run
requirements.txt CapSolver Agent plus Browser Use
tests/test_demo.py Offline structure and syntax checks
.github/workflows/ci.yml Demo validation on supported Python versions
Use these examples only for lawful, user-authorized automation that respects the target site's terms and policies. Never commit API keys, cookies, proxy credentials, solved tokens, or private target data.
See CONTRIBUTING.md, SUPPORT.md, and SECURITY.md.
Licensed under the ISC License. Browser Use is a third-party project. This repository is maintained by CapSolver and is not affiliated with or endorsed by Browser Use.