finds.dev← search

// the find

nat/natbot

★ 1,933 · Python · MIT · updated Jun 2024

Drive a browser with GPT-3

natbot is Nat Friedman's 2022 proof-of-concept that drives a real browser (via Selenium/Chrome) using GPT-3 prompted with a serialized DOM, letting the model click, type, and scroll to complete a task described in plain English. It's for people curious about the earliest LLM-agent-browses-the-web experiments, not for anyone who wants a usable automation tool today.

The DOM-to-text serialization trick (numbering interactive elements so the model can refer to them by index instead of generating selectors) is the core idea later agent frameworks reinvented, and it's readable in a few hundred lines. Being a single natbot.py file means you can read the whole prompt-and-loop logic in one sitting with no framework to learn.

It targets the raw GPT-3 completion API, so running it today means rewriting the prompt and calling convention for a chat model — nothing here works out of the box anymore. There's no error handling for malformed DOM states, failed clicks, or model hallucinating an element index that doesn't exist, so it breaks silently or crashes on anything outside the demo flow. No tests, no packaging, and the README's own TODO list (better prompt, multi-tab support, feedback loop) was never acted on — the project stopped at the demo tweet.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →