Drop-in agent rule
browser-use
Preflight helps the planner decide whether to attempt the route, keep the user present, or switch to an easier site before the browser starts.
Install or paste
Planner guard
Planner guard
python
# No browser-use PR merge is required. Install the CrawlDex reporter SDK directly:
# python -m pip install crawldex-report
# export CRAWLDEX_CHANNEL=adapter-browser-use
import os
import requests
def crawldex_preflight(site: str, task: str) -> dict:
response = requests.post(
"https://crawldex.com/api/v1/preflight",
headers={"x-crawldex-channel": os.getenv("CRAWLDEX_CHANNEL", "adapter-browser-use")},
json={
"site": site,
"task": task,
"agent_profile": {
"stack": "browser-use",
"browser_runtime": "chromium",
},
},
timeout=20,
)
response.raise_for_status()
return response.json()
preflight = crawldex_preflight("netflix.com", "subscriptions.cancel")
if preflight["decision"]["recommendation"] in {"avoid_until_fresh_evidence", "collect_evidence_first"}:
raise RuntimeError(preflight["agent_instruction"])Privacy boundary
Keep CrawlDex public-only.
Do not submit private account data, payment data, messages, screenshots with sensitive content, cookies, tokens, raw traces, local files, or logged-in-only pages. Stop before irreversible work unless the user is present and explicitly authorizes it.
Direct API call
bash
curl -sS -X POST https://crawldex.com/api/v1/preflight \
-H "content-type: application/json" \
-H "x-crawldex-channel: adapter-browser-use" \
-d '{"site":"netflix.com","task":"subscriptions.cancel","agent_profile":{"stack":"browser-agent","browser_runtime":"chromium"}}'Report redacted outcome
bash
curl -sS -X POST https://crawldex.com/api/v1/runs \
-H "content-type: application/json" \
-H "x-crawldex-agent-key: $CRAWLDEX_AGENT_KEY" \
-H "x-crawldex-channel: adapter-browser-use" \
-d '{"site":"netflix.com","task":"subscriptions.cancel","outcome":"success_with_handoff","friction":["login_required"],"source_tier":"anonymous_report","evidence":{"artifact_types":["redacted_agent_report"]}}'