How the browser extension works

The author built a Chrome extension that lets any large language model with image input capabilities browse the web like a human. The extension operates in a loop: take a screenshot, have the model analyze it, decide whether to click at specific coordinates or type text, then repeat. The model sees the page through screenshots rather than DOM parsing or raw HTML extraction.

Showcase features

The extension can search eBay directly when given a URL parameter. The LLM scrolls down to view more search results until it finds the requested item. The extension runs in a sidebar and responds to commands like "go to wikipedia" through a web socket connection.

CLI control and web socket integration

A Go command-line application opens a web socket listener on port 8765 to control the extension. The main command format is ./websocket-cli "go to wikipedia". Clearing the chat context uses either the frontend's Clear chat button or ./websocket-cli "/clear". Stopping the current loop uses Stop or ./websocket-cli "/stop".

Model compatibility and setup

The author tested the extension with opencode zen, using GLM 5.3 Flash and DeepSeek V4.1 Flash. Both models support the /chat/completions endpoint. An API key from opencode zen and the base URL https://opencode.ai/inference/openai/v1 were configured in the extension. The code was generated with ChatGPT and DeepSeek V4.1 Flash, with small hand adjustments by the author. The extension and web socket CLI are hosted on Github under michaelscrypt/browser-use-llm.

Why screenshots over DOM parsing

The author chose screenshots to parse web pages because converting DOM structures or raw HTML into markdown can be error prone, especially when websites resist parsing or are not mainly text-based. Screenshots capture the visual layer, which is how humans actually perceive the web. The chrome.debugger API enables screenshot capture via Page.captureScreenshot. Mouse clicks use Input.dispatchMouseEvent, and text input uses Input.insertText. Scrolling also dispatches mouse events. A known issue: the extension only clicks it does not hover, which can affect interactions dependent on hover states. From a website's perspective, the mouse click patterns may still resemble a real user.

Tool usage and LLM behavior

LLMs understand tool usage well and can be dropped into any environment. When told what tools are available and what goal to accomplish, they will try whatever they can to achieve it. The author emphasizes that influence comes from making them more intelligent, providing better tools, and creating actual guardrails—not just system prompt warnings like "Don't send money from the user's bank account." The extension has no safety built in beyond stopping after 10 turns unless more are specified. The author advises against running it in a main browser profile with cookies attached.

Safety and separation of concerns

Safety should be handled with separation of concerns similar to company policies. Payments above certain thresholds need approval; code should be reviewed before production deployment. The person or department making purchase decisions should not be the same one handling invoices. Extending this principle, a tool like Meta Muse should not have access to both credit card information and Amazon wishlists, even if it could increase ad conversion rates.

Cost of operation

Regular browsing is very cheap. Using GLM 5.3 Flash and DeepSeek V4.1 Flash on opencode zen, one loop (screenshot-analyze-action) takes 1,000–2,000 tokens and costs approximately $0.01. If a task uses 10 loops, the cost is around $0.10. For spamming or scraping, the approach is probably not cost-effective when considering the need for residential IPs and hardware to run full Chrome instances.