page-agent README

The project's README from github.com/alibaba/page-agent. As one markdown file: README.md.

Page Agent

Page Agent Banner

CI npm downloads Minzipped bundle size (excluding Zod) license typescript Chrome Web Store Rating GitHub stars

The GUI Agent Living in Your Webpage. One script gives any web page its own AI agent.

alibaba%2Fpage-agent | Trendshift

🌐 English | 中文

🚀 Demo | 📖 Docs | 📢 HN Discussion | 𝕏 Follow on X

Watch the demo


✨ Features

💡 Use Cases

🚀 Quick Start

One-line integration

Fastest way to try PageAgent with our free Demo LLM:

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

<!-- China CDN mirror if you can't access jsDelivr -->
<!-- https://registry.npmmirror.com/page-agent/1.12.4/files/dist/iife/page-agent.demo.js -->

⚠️ For technical evaluation only. This demo CDN uses our free testing LLM API. By using it, you agree to its terms.

Add ?autoInit=false to load the script without creating the demo agent automatically. You can then instantiate it with new window.PageAgent(...) and your own LLMs.

NPM Installation

npm install page-agent
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.

🤝 Contributing

We welcome contributions from the community! See CONTRIBUTING.md for guidelines and docs/developer-guide.md for local development workflows.

Built something cool with PageAgent? Share it in Show and Tell. 🙌

Please read the maintainer's note on principles and current state.

Contributions generated entirely by bots or AI without substantial human involvement will not be accepted.

⚖️ License

MIT License

👏 Acknowledgments

This project builds upon the excellent work of 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 <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.

⭐ Star this repo if you find PageAgent helpful!

page-agent (alibaba/page-agent)

Searching Database…

这是什么?Page Agent 是一个运行在网页内部的 JavaScript 图形界面智能体:只需一个脚本,就能给页面配上一个你自己的 AI 助手,用自然语言来操控。
那它是浏览器扩展,还是我嵌到自己页面里的脚本?是你嵌入的脚本——就是普通的页内 JavaScript,不需要浏览器扩展、Python 或无头浏览器。另有一个可选的 Chrome 扩展,只用于跨多个页面的任务。
我怎么把它加到页面上?最快的方式是加一行 CDN 脚本标签,它会自动创建一个 demo 智能体;加上 ?autoInit=false 后,就可以自己实例化 new window.PageAgent(...)。如果想以编程方式使用,就安装 NPM 包。
哪些 AI 模型能驱动它——我必须用某个特定的服务商吗?没有固定的服务商:你自己带 LLM 即可——大多数主流模型都能用,包括本地部署的模型。内置的 demo LLM 只是一个用于技术评估的免费测试 API。
能拿它做服务端自动化吗,比如爬取数据?不行——它是为你发布的页面做客户端网页增强而设计的,不是用来做服务端自动化的。
在实际产品里我能拿它来做什么?不用重写后端,就能在你的 SaaS 里内置一个 AI 副驾驶;把要点 20 次的表单流程变成一句话(ERP、CRM、后台管理工具);加入自然语言无障碍支持;或者让智能体跨标签页运行。
它是靠看截图来理解页面的吗?完全不用截图——它把 DOM 当作文本来读取和操作,所以既不需要多模态 LLM,也不需要特殊的浏览器权限。
MCP 服务器带来了什么?PageAgent 附带一个 beta 版 MCP 服务器,让外部的智能体客户端可以从页面之外控制你的浏览器,而不局限于网站自身内嵌的脚本。
它和 browser-use 有关系吗?有——README 中把 browser-use 列为项目基础:PageAgent 在其工作之上构建,但完全作为客户端 JavaScript 在页面内运行。
这个项目成熟度怎么样?年轻但很火:创建于 2025 年 9 月,GitHub 星标已超过 29,000,不过 MCP 服务器仍标记为 Beta。
Creator
alibaba
Size
3.7 MB
Stars
29.5K
Age
1y
Commits · 90 Days