A mock-first google adk browser-tool adapter with typed inputs, redacted results, and bounded continuation.
English · 简体中文 · 日本語 · Español · Português · 한국어
Developers using Google ADK can encounter CAPTCHA during a permitted browser or workflow step, causing the automation to stop or return the wrong state. This repository shows how to connect Google ADK with CapSolver, recognize the challenge, request a solution through an isolated adapter, and resume once with clear stop conditions. It focuses only on the Google ADK integration pattern and does not bind the example to a particular business scenario.
Content type: Agent integration. Primary keyword: Google ADK browser automation guide (keyword-library row 65).
Google adk tools need a clear contract for reporting captcha challenges without passing secrets or ambiguous browser output back to the agent. The implementation returns explicit challenge_detected, ready, or stopped states instead of silently guessing.
- Mock-first and deterministic local demonstration
- Allowlisted hosts and one bounded resume attempt
- CapSolver API isolated behind a small adapter
- Redacted output with structured stop reasons
- Unit tests and CI-ready project layout
- Validate that the target host is explicitly allowlisted.
- Classify the browser or workflow observation.
- Send only the authorized CAPTCHA task through the adapter.
- Poll with a fixed attempt budget and stop conditions.
- Resume once and emit a minimal normalized result.
The adapter follows the official createTask API concept and getTaskResult API concept.
python -m unittest discover -s tests -v
PYTHONPATH=src python examples/mock_workflow.pysrc/captcha_workflow/ bounded workflow and adapter
examples/ offline demonstration
tests/ behavior and policy checks
docs/ five localized README files
assets/ shared English cover
Tests verify the successful mock path, allowlist rejection, and bounded challenge handling. No live key or production target is required.
Use only public data, owned systems, or targets for which you have explicit authorization. Respect terms, rate limits, purpose limitation, field minimization, retention limits, and stop conditions. Do not use this example for private or restricted data, credential access, detection evasion, or unbounded collection. Travel, pricing, inventory, personal, financial, employment, or contact data requires a documented lawful purpose and proportionate human review.
This repository provides a mock-first Google ADK browser-tool adapter with typed inputs, redacted results, and bounded continuation. Developer sharing CapSolver integration examples. The final product reference is CapSolver.
MIT
