Why an LLM Cannot Just Use a Website on Its Own

5 min read

A language model reads text and writes text. A website wants clicks, key presses, scrolling and a memory of who is logged in. Between the two sits a gap. Every browser agent is a way to bridge it.

This part measures that gap on a real page, then shows the two main ways people bridge it.

Hand-drawn diagram: the model is text in, text out. The HTML of a Wikipedia article is 532,732 characters, too big. The model cannot press events like mouse, keys, scroll and focus, cannot hold state like cookies, tabs, logins and popups, and cannot see pixels like layout, canvas and overlays. A harness turns all of this into text, and text back into real clicks

Problem: the page is far too big to paste in

The obvious idea is to fetch the HTML and give it to the model. Here is what that looks like on one ordinary page.

We opened the Wikipedia article "Web browser" in real headless Chromium and measured it from inside the browser. This cell ran inside the browser-use 1.0.9 REPL:

python
new_tab('https://en.wikipedia.org/wiki/Web_browser'); wait_for_load()
html = js("return document.documentElement.outerHTML")
text = js("return document.body.innerText")
dom = cdp('DOM.getDocument', depth=-1, pierce=True)
def count(n): return 1 + sum(count(c) for c in n.get('children', []) + n.get('shadowRoots', []) + ([n['contentDocument']] if 'contentDocument' in n else []))
ax = cdp('Accessibility.getFullAXTree')['nodes']
print('raw HTML chars:', len(html))
print('innerText chars:', len(text))
print('DOM nodes:', count(dom['root']))
print('AX nodes:', len(ax))

Real output, November 28, 2026:

text
raw HTML chars: 532732
innerText chars: 20365
DOM nodes: 6532
AX nodes: 5131
One Wikipedia article, four views (characters)
Raw HTML532732innerText20365Indexed actionable list20347
Data from the sources listed below.

Half a million characters of HTML is mostly markup, styles and scripts. The visible text is 26 times smaller. And the visible text alone still does not tell the model which words are buttons.

Problem: text alone cannot press anything

Say the model reads the page and decides "search for Chrome DevTools Protocol". It now has to:

  • find the search box among 6,532 DOM nodes,
  • focus it,
  • send real key events, one per character,
  • press Enter,
  • wait for the next page to load,
  • notice the URL changed.

None of that is text. It is events, timing and state. A model's reply is a string. Something has to turn that string into input events inside a real browser.

Problem: the browser has state the model cannot hold

Websites remember things. A cookie says you are logged in. A tab is still open from a popup. A banner is covering the page until you accept it. The model forgets everything between requests unless the harness tells it again.

So the harness must also carry state from step to step, and decide how much of it to show.

Problem: some things only exist as pixels

A chart on a canvas, a modal drawn on top of the page, an element pushed off screen: these are hard or impossible to read from the DOM. A screenshot shows them at once. That is why most browser agents send screenshots too. browser-use 1.0 runs with vision on by default.

Solution 1: give the model a fixed menu of actions

The first generation of browser agents, including browser-use 0.x, solved the gap with a menu. The harness:

  1. extracts the page into a short indexed list of interactive elements,
  2. offers the model actions like click(index), input(index, text), scroll, go_back,
  3. runs the chosen action through a browser driver,
  4. extracts the page again.

browser-use's own history shows the menu grew over time. Per the 1.0 launch post, the first commit on October 31, 2024 had 10 actions, version 0.3.3 had 29, and 0.13.14 had 24.

sequenceDiagram
  participant H as Harness
  participant M as Model
  participant B as Browser
  H->>B: extract page
  B-->>H: DOM + AX tree + screenshot
  H->>M: indexed list + screenshot + action menu
  M-->>H: click(index=13)
  H->>B: dispatch mouse events at element 13
  B-->>H: new page

The menu is safe and easy to grade. It also boxes the model in. If the menu has no action for "read a value inside a closed shadow root", the model is stuck.

Solution 2: let the model write code against the browser

browser-use 1.0, announced on November 20, 2026 with release notes titled "CDP is all you need", took the other path. It removed the menu and gave the model one tool, python. The model writes Python that calls small helpers (new_tab, js, cdp, click_at_xy, type_text) and raw Chrome DevTools Protocol commands.

The team's case for this is in two posts. "The Bitter Lesson of Browser Agents" traces the move from a fixed state and action space to JavaScript execution, then persistent notebooks, then raw CDP. The 1.0 launch post reports the result on their own benchmark: up to 33 points higher, 2.7 to 5.2 times cheaper and 2 to 3 times faster than the 0.x agent. Those are vendor numbers from one run per model. Part 10 looks at how to read them.

flowchart LR
  A[0.x: fixed action menu] --> B[JS execution]
  B --> C[Persistent notebook]
  C --> D[1.0: Python + raw CDP]

The tradeoff in one table

Fixed action menu (0.x style)Code tool (1.0 style)
What the model seesA pre-built indexed list every stepWhatever its own code prints
What it can doOnly menu actionsAnything Python and CDP allow
Prompt size per stepLarge and fixedSmaller, but grows with history
Failure modeStuck when no action fitsWrites wrong code, then retries
SafetyEasy to restrictNeeds real sandboxing (Part 11)

Try this

Open any page you use every day. In the browser console, compare document.documentElement.outerHTML.length with document.body.innerText.length. The ratio tells you how much a naive "paste the HTML" agent would waste.

Sources