Alibaba has open-sourced PageAgent, a JavaScript AI agent that lives directly inside a web page and lets users control the entire interface with natural language, released under the MIT license. It can be dropped into a SaaS or web app with a single <script> tag or an npm install, letting users operate the screen by typing commands.
July 3, 2026 · Alibaba · Open Source
PageAgent: One Script Tag Turns Any Website Into an AI Copilot
Alibaba's MIT-licensed JavaScript agent "lives" inside the page — reading the live DOM as structured text and firing native browser events to drive the UI through plain natural language. No screenshots, no headless browser, no backend changes.
23.1k
GitHub stars (early July 2026)
1
Line of code to integrate (CDN script)
$0
Tool price — pay only your own LLM
Inside-out, not outside-in
PageAgent flips the traditional automation model — instead of an external process poking at the browser, the agent runs client-side within the page itself.
Traditional automation
Selenium · Playwright · Puppeteer
Drives the browser from the outside
Vision models / screenshots
Needs headless browser, Python
PageAgent
Plain JavaScript inside the page
Reads the live DOM as text
Text-only LLM = lower cost
Inherits session & cookies, client-side
How it works · "DOM dehydration"
1 · SCAN
Find interactive elements; assign indices, roles, labels
→
2 · COMPRESS
Build lightweight text FlatDomTree for the LLM
→
3 · ACT
Dispatch native click, input, scroll events on the UI
Works with any OpenAI-compatible endpoint — Qwen · GPT · Claude · Gemini · DeepSeek · Grok , or local models via Ollama. Guarded by a human-in-the-loop approval panel, data masking and action allowlists.
What developers praise
Radical simplicity — one script tag
Cheaper: text models suffice
Structured DOM beats pixel-guessing
Client-side privacy; voice & accessibility
Automating ERP/CRM forms, legacy apps
What critics flag
Multi-tab needs the Chrome extension
CSP headers can block inline scripts
Prompt-based safety isn't a hard guarantee
Visual effects require WebGL2
Setup snags with local LLMs / extensions
Key specifications
License · MIT
Latest · v1.11.0
Tech · TypeScript ~82.6%
Install · CDN or npm
Continue reading The rest of this article is for AI News Blitz readers. Choose an option below to keep reading.
Already purchased? Sign in ✓ Signed in — this article isn’t included in your current plan.Unlocking the full article…