Page Agent: An In-Page AI GUI Agent for Any Website
Page Agent is an open-source in-page AI GUI agent from Alibaba. You drop one JavaScript script into a web page and it gives that page its own natural-language agent — users type what they want, and the agent operates the interface for them, all inside the page.
Reach for Page Agent if you want to add a natural-language agent to your own web app without shipping a browser extension or running a headless browser. Skip it if you need to automate third-party sites you don't control, or you want a vision-based agent — Page Agent reads the DOM as text, not screenshots.
The problem it solves
Most 'AI controls the browser' tools live outside the page: a browser extension, a headless Playwright process, or a screenshot-reading multimodal model. That's heavy to ship to your own users, needs extra permissions, and often can't be embedded directly in the product you already run.
What is it?
Page Agent is an open-source (MIT) in-page AI GUI agent written in TypeScript, from Alibaba. It runs entirely as in-page JavaScript — no browser extension, no Python, no headless browser. It manipulates the page through a text-based reading of the DOM (no screenshots or multimodal LLMs), and you bring your own LLM, including locally deployed models. An optional Chrome extension and beta MCP server extend it to multi-page tasks.
Why it's getting attention
Embedding an agent directly in a webpage — one script, no extension, bring-your-own-model — is a lighter answer to in-product AI than the extension-and-headless-browser stack most tools use. Page Agent comes from Alibaba, carries a Trendshift badge, and got a Hacker News discussion, which together put the 'GUI agent living in your webpage' pitch in front of a lot of developers.
Key features
- ✓In-page JavaScript only — no browser extension, no Python, no headless browser to run
- ✓Text-based DOM manipulation instead of screenshots, so no multimodal LLM or special permissions
- ✓Bring-your-own-LLM, including locally deployed models, per the README
- ✓An optional Chrome extension for multi-page tasks
- ✓A beta MCP server for connecting to the wider agent ecosystem
- ✓Small footprint you add to an existing page rather than a separate app
Best use cases
- •Adding a natural-language assistant that operates your own web app's UI for users
- •Letting users complete a multi-step form or flow by describing it in plain language
- •Embedding an agent in a product without shipping and maintaining a browser extension
- •Driving an interface with a locally hosted LLM when data can't leave the browser
How to install / try
Page Agent is published on npm as `page-agent`. The README's core pitch is that one in-page script gives a web page its own agent, so you add it to your site's JavaScript rather than installing a separate app. For multi-page use there's an optional Chrome extension and a beta MCP server; see the docs at alibaba.github.io/page-agent for setup.
How to use
You include Page Agent in your web page and configure it with your own LLM (mainstream or local). Users then type what they want in natural language and the agent reads the DOM as text and operates the interface. For tasks spanning multiple pages, the optional Chrome extension or the beta MCP server extend it beyond a single page.
Strengths
- ✓Ships as one in-page script — no extension, headless browser, or extra runtime for users
- ✓Text-based DOM approach avoids screenshots, multimodal models, and special permissions
- ✓Works with your own LLM, including local models, so data can stay in the browser
- ✓MIT-licensed and small, easy to embed in an existing product
Limitations & risks
- △It lives inside your own page, so it's for apps you control — not automating third-party sites
- △Text-based DOM reading can struggle with canvas, heavy custom widgets, or non-semantic markup
- △You supply and pay for the LLM; quality depends on the model you connect
- △Multi-page automation needs the optional Chrome extension or the still-beta MCP server
Alternatives
Who should try it — and who should skip
Front-end and product teams that want to embed a natural-language agent into their own web app with minimal footprint, using their own LLM. If you need to automate websites you don't own, or you specifically want a screenshot/vision-based agent, a tool like Skyvern fits better than Page Agent's in-page, text-DOM approach.
Frequently asked questions
Page Agent is an open-source in-page AI GUI agent from Alibaba. One JavaScript script gives a web page its own natural-language agent that operates the interface for users, without an extension or headless browser.
No. The README says it runs as in-page JavaScript with no extension, Python, or headless browser required. An optional Chrome extension exists for multi-page tasks.
It's bring-your-own-LLM and works with most mainstream models, including locally deployed ones, per the README, since it reads the DOM as text rather than needing a multimodal model.
It's designed to live inside your own page, so it fits apps you control. For automating third-party sites, a browser-automation tool like Skyvern is a better fit.