← all writing

Alibaba's Page Agent: a browser agent that skips screenshots entirely

Alibaba open-sourced Page Agent, a JavaScript library that controls web pages through the DOM instead of vision models — no headless browser, no screenshots.

Most “browser agent” products released over the last two years work the same way: spin up a headless browser, take a screenshot, feed it to a vision model, and have the model decide where to click. OpenAI’s Operator, Google’s Project Mariner, and Anthropic’s computer use all follow this pattern to varying degrees. Alibaba’s new open-source Page Agent takes a different approach — it skips vision entirely.

What Page Agent is

Page Agent is a client-side JavaScript library that you embed directly into a webpage, rather than a separate automation backend that drives a browser from the outside. There’s no headless Chrome instance, no screenshot pipeline, no vision model in the loop.

Instead, it uses what Alibaba calls DOM dehydration: the library scans the live DOM, extracts the interactive elements — buttons, links, form inputs — into a compact text representation, and hands that to an LLM. The model reasons over this text description of the page and decides what to do next (click, type, navigate), and Page Agent executes the action as a real DOM/JS event inside the actual page.

Because it’s model-agnostic and works over any OpenAI-compatible endpoint, you can point it at whichever LLM you already use.

What using it looks like

Install it like any other npm package:

npm install page-agent

Then instantiate it with an LLM endpoint and hand it a plain-English instruction:

import { PageAgent } from 'page-agent'

const agent = new PageAgent({
    model: 'qwen3.5-plus',
    baseURL: 'https://dashscope.aliyuncs.com/compatible-mode/v1',
    apiKey: 'YOUR_API_KEY',
    language: 'en-US',
})

await agent.execute('Click the login button')

There’s also a CDN-based one-line integration for quick testing, no build step required:

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/iife/page-agent.demo.js" crossorigin="true"></script>

Appending ?autoInit=false to that script URL skips auto-initialization so you can construct the agent manually via new window.PageAgent(...) instead.

Why this design is interesting

Screenshot-plus-vision agents are flexible — they can drive arbitrary sites the same way a human would — but they’re expensive per step (image tokens aren’t cheap) and slow, since every action requires a render, a screenshot, and a vision pass.

Page Agent trades that flexibility for efficiency and integration:

  • No vision model required — text-only reasoning over DOM elements is cheaper and faster per action.
  • Runs inside the real session — because it executes in the actual page context, it inherits the user’s existing cookies and auth, and any UI validation or security checks the page already has stay intact.
  • No separate browser process to manage — nothing to spin up, sandbox, or tear down.

The tradeoff is scope. Page Agent works within a single view or tab — it’s built for in-app copilots on sites you control, not open-ended autonomous browsing across arbitrary third-party sites. Cross-tab automation needs a separate Chrome extension layered on top.

Where it fits next to Alibaba’s other agent work

Page Agent isn’t Alibaba’s only browser/GUI agent effort — it’s the most narrowly-scoped and the newest of a few tracks:

  • Qwen3.7-Plus is a multimodal computer-use model that combines screen perception (vision) with GUI operation and autonomous coding in one loop — closer to the Operator/Mariner style of agent.
  • GUI-Owl is a family of GUI foundation models (2B–235B parameters) built on Qwen3-VL, targeting desktop, mobile, and browser automation benchmarks.
  • AgentScope’s browser-use agent is a ReAct-style research framework that drives a browser via the Playwright MCP server, taking screenshots and DOM snapshots per step.

Page Agent is the outlier: instead of pushing more capability into a general-purpose vision agent, it narrows the problem to “control the page I’m already embedded in” and optimizes for cost and integration rather than generality.

The bigger picture

Google shut down Project Mariner as a standalone product in May 2026, folding its browser-control tech into Gemini Agent running on cloud VMs. OpenAI’s Operator and Anthropic’s computer use remain screenshot-and-vision based, and both are increasingly used as the reasoning “brain” behind third-party browser-automation products rather than as complete end-to-end systems themselves.

Page Agent’s DOM-text approach won’t replace those for open-ended web tasks like booking a flight on a site you don’t control. But for the much more common case — an AI copilot embedded in your own product that needs to click around your own UI — it’s a meaningfully cheaper and more reliable architecture than routing every action through a vision model.

Page Agent is open-source under the MIT license; the repo is on GitHub.

← back to writing