الدليل ← Skill
SkilloptionalHermes Optional Skills

Page Agent

Page Agent: مهارة ينشرها Hermes Agent. مجالها تصفّح الويب وأتمتة المتصفح. يوفّر السجل أمر تثبيت جاهزًا يظهر في هذه الصفحة. الرخصة MIT. الإصدار الموثّق 1.0.0. تُفعَّل بأمر `hermes skills install page-agent` بعد مراجعة ما تطلبه. تدعم: linux، macos، windows.

webjavascriptagentbrowserguialibabaembedcopilot
آخر تحقق من السجل2026-08-18v1.0.0Hermes Agent
افتح المصدر الأصلي ↗Read in English
المعنى ببساطة

ماذا يضيف إلى Hermes؟

Page Agent: مهارة ينشرها Hermes Agent. مجالها تصفّح الويب وأتمتة المتصفح. يوفّر السجل أمر تثبيت جاهزًا يظهر في هذه الصفحة. الرخصة MIT. الإصدار الموثّق 1.0.0. تُفعَّل بأمر hermes skills install page-agent بعد مراجعة ما تطلبه. تدعم: linux، macos، windows.

Page Agent هي مهارة مرتبطة بمجال الويب والمتصفح. يسمح للوكيل بفتح صفحات أو قراءة مواقع أو تنفيذ خطوات داخل متصفح، بحسب الأدوات التي يعلنها المورد.

هذا تفسير مبسّط مبني على وصف الناشر. أبقينا الوصف الإنجليزي بجانبه حتى تستطيع مقارنة المعنى بالمصدر.

استخدمه عندما

استخدمه عندما يكون هدفك واضحًا في الويب والمتصفح وتستطيع تحديد البيانات والأفعال التي يحتاجها فقط.

لا تحتاجه عندما

لا تضفه لمجرد التجربة إذا كان لديك طريق أبسط داخل Hermes، أو إذا لم تستطع مراجعة المصدر والصلاحيات.

لمن يناسب؟

مناسب لمن يريد طريقة عمل قابلة للتكرار داخل Hermes.

أول اختبار آمن

ابدأ بموقع عام ومن دون تسجيل دخول، واطلب استخراج عنوان واحد قبل السماح بالنقر أو الكتابة.

الوصف الأصلي من الناشر، من دون ترجمة تغيّر المعنى

Embed an in-page natural-language GUI copilot in web apps

✓
مصدر البيانات

فُهرس هذا الإدخال من Hermes Optional Skills. الشرح العربي يفسّر النوع والمجال ولا يضيف وظيفة غير مذكورة في المصدر.

!
مراجعة الأمان

المصدر رسمي أو خضع لمراجعة تحريرية، لكن ذلك لا يغني عن مراجعة الصلاحيات والإصدار.

مسار تثبيت آمن

افحص، ثبّت، ثم اختبر.

  1. 01
    افتح المصدر

    طابق اسم الناشر والرخصة والوصف مع حاجتك، وراجع آخر تحديث فعلي.

  2. 02
    راجع الصلاحيات والأسرار

    لا تلصق قيمة سر داخل الموقع. استخدم أسماء متغيرات البيئة وامنح أقل نطاق ممكن.

  3. 03
    انسخ الإعداد فقط بعد المراجعة

    الأزرار أدناه تنسخ نصًا إلى الحافظة ولا تشغّل أمرًا على جهازك.

  4. 04
    اختبر بمهمة غير حساسة

    تحقق من الأدوات الظاهرة، ثم استبعد أدوات الكتابة أو الحذف التي لا تحتاجها.

أمر التثبيت

راجع الأمر ثم انسخه.

hermes skills install page-agent

لا ينفّذ Hermes بالعربي هذا الأمر. التثبيت يحدث داخل جهازك ويظل خاضعًا لفحص Hermes ومراجعتك.

تعريف المهارة كاملًا

ما الذي يحمّله Hermes بالضبط عند تشغيل هذه المهارة.

منقول من التوثيق الرسمي. اقرأه قبل تفعيل المهارة، فهذا النص يصبح تعليمات الوكيل نفسه.

Embed an in-page natural-language GUI copilot in web apps.

Skill metadata

جدول مرجعي. لا تقرأه كله، ابحث عن السطر الذي يخصّك فقط.

SourceOptional — install with hermes skills install official/web-development/page-agent
Pathoptional-skills/web-development/page-agent
Version1.0.0
AuthorHermes Agent
LicenseMIT
Platformslinux, macos, windows
Tagsweb, javascript, agent, browser, gui, alibaba, embed, copilot, saas

Reference: full SKILL.md

شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه.

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 tool (Browserbase / Camofox). 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):

HTMLسطر واحد
<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سطر واحد
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):

Shellسطر واحد
npm install page-agent

Wire it up with your own LLM endpoint — never ship the demo CDN to real users:

JavaScript14 سطرًا


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):

ProviderbaseURLmodel
Qwen / DashScopehttps://dashscope.aliyuncs.com/compatible-mode/v1qwen3.5-plus
OpenAIhttps://api.openai.com/v1gpt-4o-mini
Ollama (local)http://localhost:11434/v1qwen3:14b
OpenRouterhttps://openrouter.ai/api/v1anthropic/claude-sonnet-4.6

Key config fields (passed to new PageAgent({...})):

  • model, baseURL, apiKey — LLM connection
  • language — 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)

خطوات عملية بالترتيب. نفّذ خطوة وتأكد أنها نجحت قبل الانتقال للتالية. الأوامر هنا: npm ci، npm start.

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.

Shell3 أسطر
git clone https://github.com/alibaba/page-agent.git
cd page-agent
npm ci              # exact lockfile install (or `npm i` to allow updates)

Create .env in the repo root with an LLM endpoint. Example:

Text3 أسطر
LLM_MODEL_NAME=gpt-4o-mini
LLM_API_KEY=sk-...
LLM_BASE_URL=https://api.openai.com/v1

Ollama flavor:

Text3 أسطر
LLM_BASE_URL=http://localhost:11434/v1
LLM_API_KEY=NA
LLM_MODEL_NAME=qwen3:14b

Common commands:

Shell5 أسطر
npm start           # docs/website dev server
npm run build       # build every package
npm run dev:demo    # serve IIFE bundle at http://localhost:5174/page-agent.demo.js
npm run dev:ext     # develop the browser extension (WXT + React)
npm run build:ext   # build the extension

Test on any website using the local IIFE bundle. Add this bookmarklet:

JavaScriptسطر واحد
javascript:(function(){var s=document.createElement('script');s.src=`http://localhost:5174/page-agent.demo.js?t=${Math.random()}`;s.onload=()=>console.log('PageAgent ready!');document.head.appendChild(s);})();

Then: npm run dev:demo, click the bookmarklet on any page, and the local build injects. Auto-rebuilds on save.

Warning: your .env LLM_API_KEY is inlined into the IIFE bundle during dev builds. Don't share the bundle. Don't commit it. Don't paste the URL into Slack. (Verified: grepping the public dev bundle returns the literal values from .env.)

Repo layout (Path 3)

جدول مرجعي. لا تقرأه كله، ابحث عن السطر الذي يخصّك فقط.

Monorepo with npm workspaces. Key packages:

PackagePathPurpose
page-agentpackages/page-agent/Main entry with UI panel
@page-agent/corepackages/core/Core agent logic, no UI
@page-agent/mcppackages/mcp/MCP server (beta)
—packages/llms/LLM client
—packages/page-controller/DOM ops + visual feedback
—packages/ui/Panel + i18n
—packages/extension/Chrome/Firefox extension
—packages/website/Docs + landing site

Verifying it works

شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه.

After Path 1 or Path 2:

  1. Open the page in a browser with devtools open
  2. You should see a floating panel. If not, check the console for errors (most common: CORS on the LLM endpoint, wrong baseURL, or a bad API key)
  3. Type a simple instruction matching something visible on the page ("click the Login link")
  4. Watch the Network tab — you should see a request to your baseURL

After Path 3:

  1. npm run dev:demo prints Accepting connections at http://localhost:5174
  2. curl -I http://localhost:5174/page-agent.demo.js returns HTTP/1.1 200 OK with Content-Type: application/javascript
  3. Click the bookmarklet on any site; panel appears

Pitfalls

شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه.

  • Demo CDN in production — don't. It's rate-limited, uses alibaba's free proxy, and their terms forbid production use.
  • API key exposure — any key passed to new PageAgent({apiKey: ...}) ships in your JS bundle. Always proxy through your own backend for real deployments.
  • Non-OpenAI-compatible endpoints fail silently or with cryptic errors. If your provider needs native Anthropic/Gemini formatting, use an OpenAI-compatibility proxy (LiteLLM, OpenRouter) in front.
  • CSP blocks — sites with strict Content-Security-Policy may refuse to load the CDN script or disallow inline eval. In that case, self-host from your origin.
  • Restart dev server after editing .env in Path 3 — Vite only reads env at startup.
  • Node version — the repo declares ^22.13.0 || >=24. Node 20 will fail npm ci with engine errors.
  • npm 10 vs 11 — docs say npm 11+; npm 10.9 actually works fine.

Reference

شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه.

  • Repo: https://github.com/alibaba/page-agent
  • Docs: https://alibaba.github.io/page-agent/
  • License: MIT (built on browser-use's DOM processing internals, Copyright 2024 Gregor Zunic)