Files
page-agent/README.md
T

122 lines
5.6 KiB
Markdown
Raw Permalink Normal View History

2026-02-12 17:19:14 +08:00
# Page Agent
2025-09-29 17:47:15 +08:00
2026-01-17 15:48:30 +08:00
<picture>
2026-01-17 15:57:22 +08:00
<source media="(prefers-color-scheme: dark)" srcset="https://img.alicdn.com/imgextra/i4/O1CN01qKig1P1FnhpFKNdi6_!!6000000000532-2-tps-1280-256.png">
<img alt="Page Agent Banner" src="https://img.alicdn.com/imgextra/i1/O1CN01NCMKXj1Gn4tkFTsxf_!!6000000000666-2-tps-1280-256.png">
2026-01-17 15:48:30 +08:00
</picture>
2025-09-29 16:33:15 +08:00
2026-03-16 19:45:14 +08:00
[![License: MIT](https://img.shields.io/badge/License-MIT-auto.svg)](https://opensource.org/licenses/MIT) [![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](http://www.typescriptlang.org/) [![Bundle Size](https://img.shields.io/bundlephobia/minzip/page-agent)](https://bundlephobia.com/package/page-agent) [![Downloads](https://img.shields.io/npm/dt/page-agent.svg)](https://www.npmjs.com/package/page-agent) [![GitHub stars](https://img.shields.io/github/stars/alibaba/page-agent.svg)](https://github.com/alibaba/page-agent)
2025-09-29 16:33:15 +08:00
2025-10-23 20:41:12 +08:00
The GUI Agent Living in Your Webpage. Control web interfaces with natural language.
2025-09-29 16:33:15 +08:00
2026-02-24 00:13:36 +08:00
🌐 **English** | [中文](./docs/README-zh.md)
2025-09-29 16:33:15 +08:00
2026-03-16 19:45:14 +08:00
<a href="https://alibaba.github.io/page-agent/" target="_blank"><b>🚀 Demo</b></a> | <a href="https://alibaba.github.io/page-agent/docs/introduction/overview" target="_blank"><b>📖 Docs</b></a> | <a href="https://news.ycombinator.com/item?id=47264138" target="_blank"><b>📢 HN Discussion</b></a> | <a href="https://x.com/simonluvramen" target="_blank"><b>𝕏 Follow on X</b></a>
2025-09-29 16:33:15 +08:00
2026-03-06 16:07:22 +08:00
<video id="demo-video" src="https://github.com/user-attachments/assets/a1f2eae2-13fb-4aae-98cf-a3fc1620a6c2" controls crossorigin muted></video>
2025-10-24 16:56:26 +08:00
2025-09-29 16:33:15 +08:00
---
## ✨ Features
2026-02-24 00:13:36 +08:00
- **🎯 Easy integration**
- No need for `browser extension` / `python` / `headless browser`.
- Just in-page javascript. Everything happens in your web page.
2026-02-12 17:19:14 +08:00
- **📖 Text-based DOM manipulation**
2026-03-12 01:05:24 +08:00
- No screenshots. No multi-modal LLMs or special permissions needed.
2026-02-12 17:19:14 +08:00
- **🧠 Bring your own LLMs**
2026-02-27 19:46:44 +08:00
- **🐙 Optional [chrome extension](https://alibaba.github.io/page-agent/docs/features/chrome-extension) for multi-page tasks.**
2026-03-22 12:49:10 +08:00
- And an [MCP Server (Beta)](https://alibaba.github.io/page-agent/docs/features/mcp-server) to control it from outside
2025-09-29 16:33:15 +08:00
2026-02-14 18:54:43 +08:00
## 💡 Use Cases
2026-03-12 01:05:24 +08:00
- **SaaS AI Copilot** — Ship an AI copilot in your product in lines of code. No backend rewrite.
2026-02-14 18:54:43 +08:00
- **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.
2026-03-27 19:23:31 +08:00
- **Multi-page Agent** — Extend your own web agent's reach across browser tabs [chrome extension](https://alibaba.github.io/page-agent/docs/features/chrome-extension).
- **MCP** - Allow your agent clients to control your browser.
2026-02-14 18:54:43 +08:00
2025-09-29 16:33:15 +08:00
## 🚀 Quick Start
### One-line integration
2026-01-14 17:27:35 +08:00
Fastest way to try PageAgent with our free Demo LLM:
2026-01-14 17:27:35 +08:00
```html
2026-02-12 17:19:14 +08:00
<script src="{URL}" crossorigin="true"></script>
2026-01-14 17:27:35 +08:00
```
2026-03-12 01:05:24 +08:00
> **⚠️ 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).
2026-01-23 00:55:58 +08:00
| Mirrors | URL |
| ------- | ---------------------------------------------------------------------------------- |
2026-06-08 22:42:46 +08:00
| Global | https://cdn.jsdelivr.net/npm/page-agent@1.9.0/dist/iife/page-agent.demo.js |
| China | https://registry.npmmirror.com/page-agent/1.9.0/files/dist/iife/page-agent.demo.js |
2026-01-14 17:27:35 +08:00
2026-05-11 19:28:49 +08:00
Add `?autoInit=false` to load the script without creating the demo agent automatically. You can then instantiate it with `new window.PageAgent(...)`.
2026-01-17 14:59:09 +08:00
### NPM Installation
2025-09-29 16:33:15 +08:00
```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',
2026-01-17 16:15:36 +08:00
apiKey: 'YOUR_API_KEY',
language: 'en-US',
2025-09-29 16:33:15 +08:00
})
2025-10-22 16:30:37 +08:00
await agent.execute('Click the login button')
2025-09-29 16:33:15 +08:00
```
2026-02-27 19:46:44 +08:00
For more programmatic usage, see [📖 Documentations](https://alibaba.github.io/page-agent/docs/introduction/overview).
2026-02-12 17:19:14 +08:00
2026-04-04 01:37:49 +08:00
## 🌟 Awesome Page Agent
Built something cool with PageAgent? Add it here! Open a PR to share your project.
> These are community projects — not maintained or endorsed by us. Use at your own discretion.
| Project | Description |
| -------- | ----------------------------------------------------------- |
| _Yours?_ | [Open a PR](https://github.com/alibaba/page-agent/pulls) 🙌 |
2025-09-29 16:33:15 +08:00
## 🤝 Contributing
We welcome contributions from the community! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines and [docs/developer-guide.md](docs/developer-guide.md) for local development workflows.
2025-09-29 16:33:15 +08:00
Please read the [maintainer's note](https://github.com/alibaba/page-agent/issues/349) on principles and current state.
2025-09-29 16:33:15 +08:00
Contributions generated entirely by **bots or AI** without substantial human involvement will **not be accepted**.
2026-03-12 19:12:59 +08:00
2026-03-27 19:32:04 +08:00
## ⚖️ License
[MIT License](LICENSE)
2025-09-29 16:33:15 +08:00
## 👏 Acknowledgments
2026-01-17 14:59:09 +08:00
This project builds upon the excellent work of **[`browser-use`](https://github.com/browser-use/browser-use)**.
2025-09-29 16:33:15 +08:00
2026-01-17 14:59:09 +08:00
`PageAgent` is designed for **client-side web enhancement**, not server-side automation.
2025-09-29 16:33:15 +08:00
```
2025-10-22 16:30:37 +08:00
DOM processing components and prompt are derived from browser-use:
2026-03-12 01:05:24 +08:00
Browser Use <https://github.com/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.
```
2025-09-29 16:33:15 +08:00
---
**⭐ Star this repo if you find PageAgent helpful!**