01
The situation
A hiring-signal database for a recruitment agency: which logistics companies are hiring, read from their own careers pages. The Python browser-use agent did the reading well, but only on a laptop with a real browser, one company at a time.
02
What was ported, and what was not
Ported: the DOM extraction and serialisation that turn a page into text a model can act on, the tools (click, type, scroll, save), and the agent loop. Written as a plan first, one GitHub issue per layer, each tested against the Python output on the same page.
Not ported: the 3,000-line browser session manager, telemetry, multi-tab and the rest. Cloudflare's Browser Rendering already launches the browser, so that code had no job to do.
03
What changed
On a 14-page careers site the original took 80 steps to collect 200 ads; the port took 33 steps and found 204. On a scrolling site it found 39 against 37.
The agent now runs on Cloudflare: one Worker invocation per company from a queue, a weekly cron, results and live logs written straight to D1. Prompt caching makes repeated tokens six times cheaper.
04
How it runs
Workers, Browser Rendering, Workers AI and D1 on one account. Sites that block automated browsers are checked against robots.txt first and flagged for a person, not forced.