Skip to content

🀯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

πŸ› fix(skills): teach agent-browser skill to diagnose anti-bot blocks (#16799)

YuTengjing5da74fa5dd98
diff --git a/packages/builtin-skills/src/agent-browser/content.ts b/packages/builtin-skills/src/agent-browser/content.ts
index 0ab7bb80acd..d5b6eca18f2 100644
--- a/packages/builtin-skills/src/agent-browser/content.ts
+++ b/packages/builtin-skills/src/agent-browser/content.ts
@@ -16,6 +16,8 @@ agent-browser snapshot -i # 4. re-snapshot after any page change
Refs become **stale on every page change** (click that navigates, form submit, dynamic re-render, dialog open). Always re-snapshot before the next ref interaction.
+If a page opens to an empty body or a verification/challenge screen, treat it as anti-bot fingerprinting β€” jump to the escalation ladder below instead of waiting longer or retrying.
+
When the task is done, run \`agent-browser close\` and quit any Chrome you launched for CDP β€” browsers opened for the task otherwise stay on the user's machine.
## Dynamic pages & anti-bot escalation
@@ -26,9 +28,16 @@ When scraping dynamic or anti-bot pages, escalate from cheap to heavy and stop a
2. **Empty body, verification page, or obfuscated JS** β†’ the page needs a real JS run: \`agent-browser open <url>\`, \`agent-browser wait --load networkidle\`, then \`agent-browser read\` (or \`snapshot\`).
3. **Still blocked** (anti-bot that fingerprints headless Chrome) β†’ connect to a real browser: launch Chrome with \`--remote-debugging-port=9222\` (Chrome 136+ also requires a separate \`--user-data-dir\`), then drive it with \`agent-browser --cdp 9222 <command>\` β€” a real browser fingerprint usually passes in one go.
-Discipline: the crux of anti-bot checks is "did a real browser execute the JS", so the closer to a human environment, the easier it passes. Verify you actually got content with \`agent-browser eval "document.body.innerText.length"\` (0 means blocked). Dump large output to a file first, then \`grep\`/\`head\` it.
+Rung transitions are diagnoses, not retries β€” recognize "blocked" instead of re-trying the same rung:
+
+- **Blocked looks exactly like "not loaded"**: after ONE \`wait --load networkidle\`, an empty/near-empty body (\`agent-browser eval "document.body.innerText.length"\` returns ~0) means you are fingerprinted, not slow. Extra waits, longer timeouts, or re-screenshots cannot fix a fingerprint β€” go straight to rung 3.
+- **Other block signals**: a response that is mostly obfuscated challenge JS, or a JS-challenge cookie (\`cf_clearance\`, \`*_jsl_clearance*\`, \`acw_tc\`, …) alongside an empty or challenge-page body. A clearance cookie next to real content means the challenge already passed β€” keep the session and read the page.
+- **\`--headed\` is NOT an escalation rung**: it only opens a window on the same automation-launched browser, so the fingerprint is unchanged. The real escalation is attaching to the user's own Chrome via \`--cdp\`.
+- When a rung fails, come back to this ladder β€” don't improvise ad-hoc diagnostics (curl retry loops, one-off python scripts, killing processes).
+
+Discipline: the crux of anti-bot checks is "did a real browser execute the JS", so the closer to a human environment, the easier it passes. Always verify you actually got content with \`agent-browser eval "document.body.innerText.length"\` before declaring success. Dump large output to a file first, then \`grep\`/\`head\` it.
## Discovering everything else
-Run \`agent-browser --help\` for the full command list, then \`agent-browser <subcommand> --help\` for any subcommand whose flags you're unsure about. The CLI also ships specialized skills (\`agent-browser skills list\`, \`agent-browser skills get <name>\`) covering Electron apps, Slack, dogfooding, Vercel Sandbox, and AWS Bedrock AgentCore β€” load one only when the task falls outside ordinary web pages.
+Run \`agent-browser --help\` for the full command list, then \`agent-browser <subcommand> --help\` for any subcommand whose flags you're unsure about. The CLI also ships specialized skills (\`agent-browser skills list\`, \`agent-browser skills get <name>\`) covering Electron apps, Slack, dogfooding, Vercel Sandbox, and AWS Bedrock AgentCore β€” load one only when the task falls outside ordinary web pages. Those docs are command references; the anti-bot escalation ladder above still governs how you respond to blocked pages.
</agent_browser_guides>`;