https://github.com/alibaba/page-agent
JavaScript in-page GUI agent. Control web interfaces with natural language.
https://github.com/alibaba/page-agent
agent ai ai-agents browser-automation javascript typescript ui-automation web
Last synced: 2 months ago
JSON representation
JavaScript in-page GUI agent. Control web interfaces with natural language.
- Host: GitHub
- URL: https://github.com/alibaba/page-agent
- Owner: alibaba
- License: mit
- Created: 2025-09-23T09:30:17.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2026-03-06T20:50:35.000Z (2 months ago)
- Last Synced: 2026-03-06T22:47:01.720Z (2 months ago)
- Topics: agent, ai, ai-agents, browser-automation, javascript, typescript, ui-automation, web
- Language: TypeScript
- Homepage: https://alibaba.github.io/page-agent/
- Size: 1.7 MB
- Stars: 862
- Watchers: 4
- Forks: 82
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: docs/CODE_OF_CONDUCT.md
- Agents: AGENTS.md
Awesome Lists containing this project
- awesome-side-quests - alibaba/page-agent - page JavaScript GUI agent — control web interfaces with natural language from within the page itself (AI & LLM / Agents & Orchestration)
- awesome-ai-agents - alibaba/page-agent - Page Agent is a JavaScript in-page GUI agent that allows users to control web interfaces using natural language, supporting easy integration, text-based DOM manipulation, and custom LLMs. (GUI & Computer Control AI Agents / Browser & Web Automation)
- awesome-github-projects - page-agent - JavaScript in-page GUI agent. Control web interfaces with natural language. ⭐17,474 `TypeScript` 🔥 (🤖 AI & Machine Learning)
- StarryDivineSky - alibaba/page-agent - agent 的工作流程类似于一位“网页操作翻译官”。当用户输入自然语言指令(如“搜索商品”)后,工具首先通过预训练的NLP模型解析指令意图,将其拆解为原子操作步骤;接着,利用浏览器内置的DOM树和视觉特征(如按钮文本、位置等)动态匹配目标元素,而非依赖易失效的静态路径。这一过程类似人类通过界面文字和布局理解功能,再通过模拟点击或键盘输入完成任务。技术栈上,项目结合了轻量级语言模型与浏览器API,在保证响应速度的同时规避了传统RPA工具对开发环境的依赖。 整体而言,page-agent 通过自然语言与网页的“双向翻译”,为客服、测试或日常办公场景提供了一种低代码的自动化方案,其设计平衡了易用性与适应性,尤其适合快速变化的现代Web应用。 (A01_文本生成_文本对话 / 大语言对话模型及数据)
- awesome-mcp - alibaba/page-agent - Page Agent is a JavaScript in-page GUI agent that allows control of web interfaces using natural language, supporting easy integration without browser extensions or headless browsers and bringing y... (MCP Servers / Other MCP Servers)
- AiTreasureBox - alibaba/page-agent - 03-09_2442_532](https://img.shields.io/github/stars/alibaba/page-agent.svg)|JavaScript in-page GUI agent. Control web interfaces with natural language.| (Repos)
- my-awesome-starred - alibaba/page-agent - JavaScript in-page GUI agent. Control web interfaces with natural language. (TypeScript)
README
# Page Agent

[](https://opensource.org/licenses/MIT) [](http://www.typescriptlang.org/) [](https://www.npmjs.com/package/page-agent) [](https://bundlephobia.com/package/page-agent) [](https://github.com/alibaba/page-agent)
The GUI Agent Living in Your Webpage. Control web interfaces with natural language.
🌐 **English** | [中文](./docs/README-zh.md)
👉 🚀 Demo | 📖 Documentation | 📢 Join HN Discussion | 𝕏 Follow on X
---
## ✨ Features
- **🎯 Easy integration**
- No need for `browser extension` / `python` / `headless browser`.
- Just in-page javascript. Everything happens in your web page.
- **📖 Text-based DOM manipulation**
- No screenshots. No multi-modal LLMs or special permissions needed.
- **🧠 Bring your own LLMs**
- **🎨 Pretty UI with human-in-the-loop**
- **🐙 Optional [chrome extension](https://alibaba.github.io/page-agent/docs/features/chrome-extension) for multi-page tasks.**
## 💡 Use Cases
- **SaaS AI Copilot** — Ship an AI copilot in your product in lines of code. No backend rewrite.
- **Smart Form Filling** — Turn 20-click workflows into one sentence. Perfect for ERP, CRM, and admin systems.
- **Accessibility** — Make any web app accessible through natural language. Voice commands, screen readers, zero barrier.
- **Multi-page Agent** — Extend your own agent's reach across browser tabs with the optional [chrome extension](https://alibaba.github.io/page-agent/docs/features/chrome-extension).
## 🚀 Quick Start
### One-line integration
Fastest way to try PageAgent with our free Demo LLM:
```html
```
> **⚠️ For technical evaluation only.** This demo CDN uses our free [testing LLM API](https://alibaba.github.io/page-agent/docs/features/models#free-testing-api). By using it, you agree to its [terms](https://github.com/alibaba/page-agent/blob/main/docs/terms-and-privacy.md).
| Mirrors | URL |
| ------- | ---------------------------------------------------------------------------------- |
| Global | https://cdn.jsdelivr.net/npm/page-agent@1.5.7/dist/iife/page-agent.demo.js |
| China | https://registry.npmmirror.com/page-agent/1.5.7/files/dist/iife/page-agent.demo.js |
### 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 programmatic usage, see [📖 Documentations](https://alibaba.github.io/page-agent/docs/introduction/overview).
## 🤝 Contributing
We welcome contributions from the community! Follow our instructions in [CONTRIBUTING.md](CONTRIBUTING.md) for setup and guidelines.
Please read [Code of Conduct](docs/CODE_OF_CONDUCT.md) before contributing.
Contributions generated entirely by bots or agents without substantial human involvement will not be accepted, and bot accounts may be blocked.
## 👏 Acknowledgments
This project builds upon the excellent work of **[`browser-use`](https://github.com/browser-use/browser-use)**.
`PageAgent` is designed for **client-side web enhancement**, not server-side automation.
```
DOM processing components and prompt are derived from browser-use:
Browser Use
Copyright (c) 2024 Gregor Zunic
Licensed under the MIT License
We gratefully acknowledge the browser-use project and its contributors for their
excellent work on web automation and DOM interaction patterns that helped make
this project possible.
Third-party dependencies and their licenses can be found in the package.json
file and in the node_modules directory after installation.
```
## 📄 License
[MIT License](LICENSE)
---
**⭐ Star this repo if you find PageAgent helpful!**