page-agent
Skill này làm gì
Skill này giúp một lập trình viên thêm page-agent, một trợ lý mã nguồn mở chạy bên trong trang web và làm theo các lệnh như nhấp vào đây hoặc điền trường kia. Phù hợp với nhóm muốn thêm một copilot AI vào ứng dụng web của mình.
Khi nào nên dùng
- ✓Khi bạn muốn người dùng ứng dụng web ra lệnh bằng ngôn ngữ thường thay vì nhấp qua nhiều màn hình.
- ✓Khi bạn muốn hiện đại hóa một ứng dụng web cũ bằng một lớp ngôn ngữ tự nhiên mà không viết lại giao diện.
- ✓Khi bạn muốn demo page-agent với một mô hình ngôn ngữ cục bộ hoặc được host.
Liên kết skill
https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/web-development/page-agent/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Thêm một copilot page-agent vào bảng điều khiển quản trị của chúng tôi để người dùng gõ các lệnh như tạo hóa đơn cho Acme.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill giải thích cách đưa script page-agent vào trang web của bạn và kết nối nó với một mô hình ngôn ngữ tương thích OpenAI. Agent đọc trang dưới dạng văn bản và hành động trên các phần tử nó tìm thấy.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
page-agent
alibaba/page-agent (https://github.com/alibaba/page-agent, 17k+ stars, MIT) is an in-page GUI agent written in TypeScript. It lives inside a webpage, reads the DOM as text (no screenshots, no multi-modal LLM), and executes natural-language instructions like "click the login button, then fill username as John" against the current page. Pure client-side — the host site just includes a script and passes an OpenAI-compatible LLM endpoint.
When to use this skill
Load this skill when a user wants to:
- Ship an AI copilot inside their own web app (SaaS, admin panel, B2B tool, ERP, CRM) — "users on my dashboard should be able to type 'create invoice for Acme Corp and email it' instead of clicking through five screens"
- Modernize a legacy web app without rewriting the frontend — page-agent drops on top of existing DOM
- Add accessibility via natural language — voice / screen-reader users drive the UI by describing what they want
- Demo or evaluate page-agent against a local (Ollama) or hosted (Qwen, OpenAI, OpenRouter) LLM
- Build interactive training / product demos — let an AI walk a user through "how to submit an expense report" live in the real UI
When NOT to use this skill
- User wants Hermes itself to drive a browser → use Hermes' built-in
browser_exectool (local Chromium or a cloud browser). page-agent is the opposite direction. - User wants cross-tab automation without embedding → use Playwright, browser-use, or the page-agent Chrome extension
- User needs visual grounding / screenshots → page-agent is text-DOM only; use a multimodal browser agent instead
Prerequisites
- Node 22.13+ or 24+, npm 10+ (docs claim 11+ but 10.9 works fine)
- An OpenAI-compatible LLM endpoint: Qwen (DashScope), OpenAI, Ollama, OpenRouter, or anything speaking
/v1/chat/completions - Browser with devtools (for debugging)
Path 1 — 30-second demo via CDN (no install)
Fastest way to see it work. Uses alibaba's free testing LLM proxy — for evaluation only, subject to their terms.
Add to any HTML page (or paste into the devtools console as a bookmarklet):
<script src="https://cdn.jsdelivr.net/npm/page-agent@1.8.0/dist/iife/page-agent.demo.js" crossorigin="true"></script>
A panel appears. Type an instruction. Done.
Bookmarklet form (drop into bookmarks bar, click on any page):
javascript:(function(){var s=document.createElement('script');s.src='https://cdn.jsdelivr.net/npm/page-agent@1.8.0/dist/iife/page-agent.demo.js';document.head.appendChild(s);})();
Path 2 — npm install into your own web app (production use)
Inside an existing web project (React / Vue / Svelte / plain):
npm install page-agent
Wire it up with your own LLM endpoint — never ship the demo CDN to real users:
import { PageAgent } from 'page-agent'
const agent = new PageAgent({
model: 'qwen3.5-plus',
baseURL: 'https://dashscope.aliyuncs.com/compatible-mode/v1',
apiKey: process.env.LLM_API_KEY, // never hardcode
language: 'en-US',
})
// Show the panel for end users:
agent.panel.show()
// Or drive it programmatically:
await agent.execute('Click submit button, then fill username as John')
Provider examples (any OpenAI-compatible endpoint works):
| Provider | baseURL |
model |
|---|---|---|
| Qwen / DashScope | https://dashscope.aliyuncs.com/compatible-mode/v1 |
qwen3.5-plus |
| OpenAI | https://api.openai.com/v1 |
gpt-4o-mini |
| Ollama (local) | http://localhost:11434/v1 |
qwen3:14b |
| OpenRouter | https://openrouter.ai/api/v1 |
anthropic/claude-sonnet-4.6 |
Key config fields (passed to new PageAgent({...})):
model,baseURL,apiKey— LLM connectionlanguage— UI language (en-US,zh-CN, etc.)- Allowlist and data-masking hooks exist for locking down what the agent can touch — see https://alibaba.github.io/page-agent/ for the full option list
Security. Don't put your apiKey in client-side code for a real deployment — proxy LLM calls through your backend and point baseURL at your proxy. The demo CDN exists because alibaba runs that proxy for evaluation.
Path 3 — clone the source repo (contributing, or hacking on it)
Use this when the user wants to modify page-agent itself, test it against arbitrary sites via a local IIFE bundle, or develop the browser extension.
git clone https://github.com/alibaba/page-agent.git
cd page-agent
Câu hỏi thường gặp
Nó có chụp ảnh màn hình trang không?
Không. Skill nói page-agent đọc DOM dưới dạng văn bản và không dùng ảnh chụp màn hình hay mô hình đa phương thức.
Đây có phải để điều khiển trình duyệt của tôi không?
Không. Skill nói nếu bạn muốn Hermes điều khiển trình duyệt, hãy dùng công cụ trình duyệt tích hợp sẵn của nó.
Tôi cần gì để bắt đầu?
Bạn cần quyền truy cập một endpoint mô hình ngôn ngữ tương thích OpenAI, có thể chạy cục bộ hoặc được host.
Chi tiết
Mô tả gốc của tác giả
Embed an in-page natural-language GUI copilot in web apps.
Độ phổ biến
- Sao GitHub
- 260k
- Vị trí xếp hạng
- #579
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agent-merge-conflict-arbiter
260kGiải quyết xung đột merge git giữa nhánh của hai agent với vai trò bên trung lập, tạo ra một kết quả merge duy nhất cho repo.
antigravity-cli
260kHướng dẫn bạn cài đặt, cập nhật và khắc phục sự cố công cụ dòng lệnh Antigravity, gồm plugin, đăng nhập và sandbox.
blackbox
260kCho phép agent của bạn giao một tác vụ lập trình cho công cụ dòng lệnh Blackbox AI, công cụ chạy nhiều mô hình và chọn kết quả tốt nhất.
dynamic-workflow
260kDạy agent của bạn chạy các đợt công việc tương tự lớn như một script đã lưu, để chỉ kết quả đã kiểm chứng mới quay về cuộc trò chuyện chính.
Skill tương tự
angular-developer
280kGiúp agent của bạn viết code Angular và tư vấn cấu trúc dự án, hữu ích khi bắt đầu dự án mới hoặc cải thiện hiệu suất.
frontend-a11y
280kGiúp agent của bạn làm cho giao diện web dễ tiếp cận với mọi người. Đảm bảo website và ứng dụng hoạt động tốt với trình đọc màn hình và điều hướng bằng bàn phím.
frontend-patterns
280kGiúp agent của bạn áp dụng các mẫu hiện đại trong phát triển frontend. Tối ưu hiệu năng, quản lý trạng thái và tuân theo thực hành tốt nhất với React và Next.js.