Autonomous web browsing powered by large language models (LLMs) often struggles with brittle scripts and rigid toolsets. Web-Use takes a different path by combining Python, the Chrome DevTools Protocol (CDP), and a novel runtime protocol called WebMCP. This design lets the agent dynamically discover and register custom tools exposed by websites themselves as it navigates, rather than relying on a fixed library of capabilities.
What Web-Use does and how it operates
Web-Use is an autonomous browser agent written in Python 3.11+ that integrates tightly with Chromium-based browsers via CDP. The core idea is to enable an LLM-powered agent to navigate websites, fill out forms, interact with dynamic content, and execute complex workflows without manual scripting.
Under the hood, it builds a semantic DOM tree of visible page elements enriched with scroll-aware bounding boxes, providing the agent with a detailed structural and visual context to understand the page layout and content. This semantic representation is critical for precise interaction compared to naive DOM traversal.
At the center is the Agent class, which orchestrates the interaction between the browser environment and the language model. The project supports multiple LLM providers including Anthropic, OpenAI, Google Gemini, Groq, Ollama, Cerebras, and Mistral, offering flexibility depending on your model preferences and use cases.
A standout architectural feature is the WebMCP protocol. Unlike traditional agents that ship with a predefined set of tools, WebMCP lets websites expose custom tools dynamically at runtime. As the agent browses, it auto-discovers and registers these tools, effectively making the agent extensible by the websites it visits. This inversion of the typical agent-tool relationship opens up new possibilities for autonomous, context-aware workflows.
The project also embeds OAuth 2.0 with PKCE flows to manage persistent authenticated sessions securely, which is essential for many real-world web automation tasks requiring login and session continuity.
The codebase uses the uv dependency manager, emphasizing modern Python tooling, and leverages environment variables via a .env file for configuration like API keys.
Technical strengths and design tradeoffs
The semantic DOM tree construction with vision-based scroll-aware bounding boxes is one of Web-Use’s key technical strengths. Most browser automation tools either rely on brittle CSS selectors or flat DOM traversal without visual context. Web-Use’s approach gives the agent a richer understanding of page structure and what is actually visible to the user, reducing errors in dynamic or complex layouts.
Supporting a broad spectrum of LLM providers is another plus, enabling developers to pick the best model for their needs or to swap providers without major code changes. The integration appears well-abstracted around a provider interface.
The WebMCP protocol is a clear architectural differentiator. By allowing websites to self-describe their capabilities and expose custom tools, the agent can adapt on-the-fly to new sites and workflows without developer intervention. This reduces maintenance and expands the agent’s applicability. However, it also adds complexity: websites need to implement WebMCP, and the agent must handle dynamic tool registration and potential security considerations in trusting external tool descriptions.
OAuth 2.0 with PKCE support is built-in, which is a significant practical feature for automating authenticated workflows robustly. This is often a sticking point in browser automation projects.
The tradeoff is that Web-Use requires Python 3.11+ and the uv dependency manager, which might be a hurdle for some setups. Also, while the architecture is powerful, it likely demands a good understanding of browser internals and LLM integration to extend or troubleshoot.
Overall, the code is surprisingly clean and idiomatic Python, with a clear separation of concerns between browser config, LLM providers, and the agent logic.
Quick start with Web-Use
If you want to try Web-Use out, the repository provides a straightforward setup process assuming Python 3.11 or higher and the uv package manager.
Clone the repo and install dependencies:
git clone https://github.com/CursorTouch/Web-Use.git
cd Web-Use
uv sync
Configure required environment variables by creating a .env file in the project root:
GOOGLE_API_KEY="<API_KEY_HERE>"
Here’s a minimal Python example that initializes an Ollama LLM, sets up the browser configuration to use Chrome in non-headless mode, and creates an agent instance with vision and WebMCP enabled:
from src.agent.browser.config import BrowserConfig
from src.providers.ollama import ChatOllama
from src.agent import Agent
from dotenv import load_dotenv
load_dotenv()
llm = ChatOllama(model='qwen3.5:397b-cloud', temperature=0.5)
config = BrowserConfig(
browser='chrome',
headless=False,
use_system_profile=True
)
agent = Agent(
config=config,
llm=llm,
use_vision=True,
use_web_mcp=True,
max_steps=100
)
user_query = input('Enter your query: ')
agent.print_response(user_query)
Run the agent with:
uv run main.py
This setup gets you a fully functional autonomous browsing agent that can interpret your queries and interact with websites dynamically.
Verdict
Web-Use is a solid Python project for anyone needing autonomous, LLM-driven web automation that goes beyond fixed scripts or toolsets. Its semantic DOM understanding and vision-based context improve reliability on complex pages.
The WebMCP protocol is a notable architectural innovation, enabling dynamic extensibility by websites themselves. This pattern is worth understanding even if you don’t adopt the project outright.
That said, there’s a learning curve in setting up Python 3.11+, the uv environment, and understanding the agent’s internal architecture. The project is best suited for developers comfortable with browser protocols, OAuth flows, and working with large language models.
If your use case demands flexible, context-aware web automation with authenticated workflows and multi-LLM support, Web-Use is worth exploring. Otherwise, simpler browser automation tools may be easier to start with but won’t offer the same dynamic adaptability or semantic understanding.
→ GitHub Repo: CursorTouch/Web-Agent ⭐ 274 · Python