← Back to archive

Repo of the Day

alibaba/page-agent: JavaScript in-page GUI agent. Control web interfaces with natural language.

Published: Aug 29, 2026

Open repository ↗

JavaScript in-page GUI agent. Control web interfaces with natural language. - alibaba/page-agent

Summary

Page Agent is an in-page JavaScript library that embeds a natural-language GUI agent directly into a web page. Instead of relying on screenshots or a headless browser, it manipulates the DOM through text-based commands and runs entirely client-side. With a single script tag or an npm install, engineers can let users describe actions in plain language and have them executed inside the page.

What it is useful for

  • Adding an AI copilot inside a SaaS product without rewriting the backend.
  • Turning multi-click workflows in ERP, CRM, and admin systems into single natural-language instructions.
  • Improving accessibility by letting users operate the app via natural language rather than navigating individual controls.
  • Extending an in-page agent across multiple browser tabs via the optional Chrome extension, or letting external MCP clients drive the browser through the MCP Server.
  • Because DOM manipulation is text-based, the agent works with mainstream LLMs and locally deployed models, without needing multi-modal vision capabilities.

How engineers can use it

The README documents two integration paths.

For quick evaluation, a one-line script tag loads a prebuilt demo bundle from a CDN. The demo build uses a free testing LLM API and the README warns it is "for technical evaluation only," with users required to agree to its terms. Adding ?autoInit=false lets you skip the auto-instantiated demo and instead construct your own new window.PageAgent(...) with custom LLM credentials.

For real use, install via npm:

npm install page-agent

Then instantiate with your own model. The README's example points at Alibaba's Qwen3.5-plus through the DashScope-compatible endpoint:

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')

The project is MIT licensed and written in TypeScript, with Zod listed as a peer dependency. Two documented limitations are worth noting: the MCP Server is currently marked Beta, and the maintainers position Page Agent as a tool for client-side web enhancement rather than a replacement for server-side browser automation frameworks such as Playwright or Puppeteer in scraping or end-to-end testing workflows.