page-agent

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

What is page-agent?

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

Overview of page-agent

What it is

Page Agent is a JavaScript library that turns any web page into a self-contained GUI agent. It runs entirely in-page as a single script—no browser extension, Python backend, or headless browser required. Developers can add the script to any web page to give it AI capabilities that understand and execute natural language commands by manipulating the DOM textually. It works with most mainstream large language models, including locally deployed ones, and does not rely on screenshots or multimodal models. An optional Chrome extension and an MCP Server (Beta) extend its capabilities to multi-page tasks and external control. The project is maintained by the Alibaba organization on GitHub and is licensed under the MIT License.

Key features

  • Easy integration: adds to any web page as a single JavaScript script; no extension or backend needed.
  • Text-based DOM manipulation: operates on the page’s DOM directly through text, avoiding screenshots or special permissions.
  • Bring your own LLMs: compatible with most mainstream models, including locally hosted ones.
  • Optional Chrome extension for multi-page tasks: extends the agent’s reach across browser tabs.
  • MCP Server (Beta): lets external agent clients control the browser.

Use cases

  • SaaS AI Copilot: quickly embed an AI assistant into a product without backend changes.
  • Smart Form Filling: reduce multi‑step workflows to a single sentence, useful for ERP, CRM, and admin systems.
  • Accessibility: make any web app controllable via natural language (voice commands, screen readers).
  • Multi‑page Agent: automate tasks across several browser tabs using the Chrome extension.
  • MCP: allow external AI agents to control the browser through the MCP server.

Getting started

One-line integration (demo with free LLM): html NPM installation: bash npm install page-agent javascript 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') For more details, see the repository README.

License and pricing

The project is open-source under the MIT License. No pricing information is provided.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/alibabapage-agent.svg)](https://yunodb.com/tools/alibabapage-agent?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/alibabapage-agent?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/alibabapage-agent.svg" alt="Featured on YunoDB" height="20"></a>