• bitcoinBitcoin(BTC)$62,158.00-0.84%
  • ethereumEthereum(ETH)$1,735.87-0.88%
  • tetherTether(USDT)$1.00-0.01%
  • binancecoinBNB(BNB)$568.580.04%
  • usd-coinUSDC(USDC)$1.00-0.01%
  • rippleXRP(XRP)$1.09-0.65%
  • solanaSolana(SOL)$77.44-1.70%
  • tronTRON(TRX)$0.330040-0.01%
  • Figure HelocFigure Heloc(FIGR_HELOC)$1.030.84%
  • HyperliquidHyperliquid(HYPE)$67.34-1.11%
  • dogecoinDogecoin(DOGE)$0.072359-0.27%
  • USDSUSDS(USDS)$1.00-0.01%
  • RainRain(RAIN)$0.014551-1.89%
  • leo-tokenLEO Token(LEO)$9.531.39%
  • zcashZcash(ZEC)$460.09-4.23%
  • whitebitWhiteBIT Coin(WBT)$54.89-1.53%
  • stellarStellar(XLM)$0.183205-1.73%
  • cardanoCardano(ADA)$0.166660-2.48%
  • moneroMonero(XMR)$320.29-3.14%
  • chainlinkChainlink(LINK)$7.64-0.82%
  • CantonCanton(CC)$0.1277560.86%
  • bitcoin-cashBitcoin Cash(BCH)$234.28-1.31%
  • daiDai(DAI)$1.000.02%
  • USD1USD1(USD1)$1.000.01%
  • Ethena USDeEthena USDe(USDE)$1.00-0.02%
  • the-open-networkGram (prev. Toncoin)(GRAM)$1.58-0.49%
  • litecoinLitecoin(LTC)$43.801.10%
  • Global DollarGlobal Dollar(USDG)$1.000.02%
  • Circle USYCCircle USYC(USYC)$1.130.00%
  • hedera-hashgraphHedera(HBAR)$0.070122-0.06%
  • suiSui(SUI)$0.721.07%
  • paypal-usdPayPal USD(PYUSD)$1.000.00%
  • avalanche-2Avalanche(AVAX)$6.501.72%
  • crypto-com-chainCronos(CRO)$0.055999-0.56%
  • shiba-inuShiba Inu(SHIB)$0.000004-1.05%
  • tether-goldTether Gold(XAUT)$4,052.71-1.48%
  • nearNEAR Protocol(NEAR)$1.90-1.43%
  • BlackRock USD Institutional Digital Liquidity FundBlackRock USD Institutional Digital Liquidity Fund(BUIDL)$1.000.00%
  • Ondo US Dollar YieldOndo US Dollar Yield(USDY)$1.140.15%
  • uniswapUniswap(UNI)$3.270.82%
  • BittensorBittensor(TAO)$203.78-2.22%
  • World Liberty FinancialWorld Liberty Financial(WLFI)$0.058297-0.35%
  • pax-goldPAX Gold(PAXG)$4,054.15-1.55%
  • MemeCoreMemeCore(M)$1.33-2.07%
  • HTX DAOHTX DAO(HTX)$0.000002-0.59%
  • AsterAster(ASTER)$0.62-0.32%
  • okbOKB(OKB)$78.54-0.42%
  • Ripple USDRipple USD(RLUSD)$1.000.00%
  • OndoOndo(ONDO)$0.314323-3.60%
  • usddUSDD(USDD)$1.00-0.01%
TradePoint.io
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop
No Result
View All Result
TradePoint.io
No Result
View All Result

Meet Alibaba’s Page Agent: A JavaScript In-Page GUI Agent That Controls Web Interfaces With Natural Language Through the DOM

July 2, 2026
in AI & Technology
Reading Time: 16 mins read
A A
Meet Alibaba’s Page Agent: A JavaScript In-Page GUI Agent That Controls Web Interfaces With Natural Language Through the DOM
ShareShareShareShareShare

Most browser automation runs from the outside. Playwright, Puppeteer, Selenium, and browser-use all drive a browser from an external process. They read the page through screenshots or the Chrome DevTools Protocol.

Alibaba’s Page Agent takes the opposite path. The agent lives inside the webpage as plain JavaScript. It reads the live DOM as text and acts as the real user. No headless browser, no screenshots, no multi-modal model.

The project is open-source under the MIT license. The codebase is TypeScript-first. It builds on browser-use, from which its DOM processing and prompt are derived.

TL;DR

  • Page Agent runs inside the page as JavaScript, reading the live DOM as text, not screenshots.
  • DOM dehydration compresses the page into a FlatDomTree so smaller text models can act precisely.
  • It is model-agnostic through any OpenAI-compatible endpoint and ships under the MIT license.
  • Prompt-level safety and single-page scope are real limits; keep server-side validation for risky actions.
  • Best fit: copilots and form-filling inside apps you own, not external or locked-down sites.

What is Page Agent?

Page Agent is a client-side library for adding agent behavior to a web app. You embed it, then issue commands in natural language. The agent finds elements, clicks buttons, and fills forms from within the page.

Because it runs in the browser session, it inherits the user’s cookies, session, and authentication. There is no separate backend to write. The existing UI validation and security rules stay in place.

The design is model-agnostic. You bring your own large language model through any OpenAI-compatible endpoint. Only text is sent to the model, so a strong text model is enough.

How DOM Dehydration Works

The core technique is what the team calls DOM dehydration. A modern page can hold thousands of nodes. Sending raw HTML to a model would be slow and expensive.

When a command arrives, the agent scans the Document Object Model. It identifies every interactive element, such as buttons, links, and input fields. Each element receives an index plus a role and a label.

The live DOM is converted into a FlatDomTree, a clean text map of what matters. Redundant markup is stripped out. The model reads this compact representation, not pixels.

The interactive demo on this page mirrors this loop. Watch the “Dehydrated DOM” and “Action trace” panels update as commands run.

Under the hood, the agent delegates work to a PageController:

await this.pageController.updateTree()
await this.pageController.clickElement(index)
await this.pageController.inputText(index, text)
await this.pageController.scroll({ down: true, numPages: 1 })

The monorepo splits these concerns into small packages. @page-agent/core holds the headless agent logic. page-agent is the full entry class with a UI panel. @page-agent/page-controller handles DOM extraction and element indexing, with optional visual feedback through a SimulatorMask.

Developers keep control of scope. Operation allowlists limit which actions the agent may run. Data masking can hide sensitive fields, such as passwords, from the model. Custom knowledge can be injected so the agent follows your domain rules.

How It Compares

Approach Where it runs Reads the page via Setup Best fit
Page Agent Inside the page (client-side JS) Dehydrated text DOM One script tag or npm Copilots inside apps you own
Selenium / Playwright / Puppeteer External process DOM via driver (WebDriver/CDP) Driver plus runtime or server Scripted end-to-end testing
browser-use External process DOM plus optional vision Python plus a browser Autonomous multi-site agents
WebMCP Server-side tools Structured function calls Requires standard adoption Native agent tool access

The takeaway is scope, not speed. Page Agent fits products you control and can add code to. External drivers still win for cross-site scraping and locked-down environments.

Use Cases, With Examples

  • SaaS AI copilot: Ship an assistant that operates the product, not one that only gives instructions. A support bot can perform the steps for the user instead of describing them.
  • Smart form filling: Collapse a multi-step ERP or CRM form into one instruction. A user types ‘Submit a travel expense for $50 for lunch yesterday.’ The agent handles the navigation and data entry.
  • Accessibility: Pair it with the Web Speech API for voice control. Any web app becomes reachable through natural language, with screen-reader friendly announcements.
  • Legacy app modernization: It can wrap a legacy internal tool that has no API. You add a command bar without changing the original code.

Quick Start

For evaluation, one script tag loads Page Agent with a free testing LLM:

That demo endpoint is for technical evaluation only. Production use needs your own model credentials.

For a build, install the package and configure your endpoint:

YOU MAY ALSO LIKE

Robbyant Releases LingBot-VLA 2.0: An Open-Source 6B Vision-Language-Action (VLA) Model for Cross-Embodiment Robot Manipulation

SpaceXAI Releases Grok 4.5, a Cursor-Trained Model for Coding, Agentic Tasks, and Knowledge Work at $2/M Input

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

The model and baseURL fields accept any OpenAI-compatible provider. Swapping models is mostly a base-URL and key change.

Note: a key passed to new PageAgent ships inside your client bundle. For production, proxy requests through your own backend instead. The agent can also show each critical action for approval before running it.

What Works and What Doesn’t

  • Strong integration story: A copilot ships in a few lines of code. There is no backend rewrite and no extension to distribute.
  • Lower model cost: Because only text moves, you avoid multi-modal models and their pricing. Precision comes from reading structure, not guessing from pixels.
  • Prompt-based safety has limits: Rules like “never auto-submit a payment form” live in the system prompt. These are persuasive guides, not hard guarantees. For sensitive or destructive actions, keep server-side validation. Prompt instructions should not be your only control.
  • Single-page focus: The core library targets interactions within one view. It cannot move across tabs or windows by itself. Multi-page automation needs the optional Chrome extension, which requires separate install and permissions. A Beta MCP server also lets outside agents, like Claude Desktop or Copilot, drive it.

Check out the GitHub Repo. Also, feel free to follow us on Twitter and don’t forget to join our 150k+ML SubReddit and Subscribe to our Newsletter. Wait! are you on telegram? now you can join us on telegram as well.

Need to partner with us for promoting your GitHub Repo OR Hugging Face Page OR Product Release OR Webinar etc.? Connect with us


Credit: Source link

ShareTweetSendSharePin

Related Posts

Robbyant Releases LingBot-VLA 2.0: An Open-Source 6B Vision-Language-Action (VLA) Model for Cross-Embodiment Robot Manipulation
AI & Technology

Robbyant Releases LingBot-VLA 2.0: An Open-Source 6B Vision-Language-Action (VLA) Model for Cross-Embodiment Robot Manipulation

July 9, 2026
SpaceXAI Releases Grok 4.5, a Cursor-Trained Model for Coding, Agentic Tasks, and Knowledge Work at /M Input
AI & Technology

SpaceXAI Releases Grok 4.5, a Cursor-Trained Model for Coding, Agentic Tasks, and Knowledge Work at $2/M Input

July 8, 2026
Volkswagen Is Employing 100 Sheep At A Solar Farm In Poland
AI & Technology

Volkswagen Is Employing 100 Sheep At A Solar Farm In Poland

July 8, 2026
SpaceX’s Grok 4.5 launches at half the price of rivals — here’s why that could rattle Anthropic and OpenAI
AI & Technology

SpaceX’s Grok 4.5 launches at half the price of rivals — here’s why that could rattle Anthropic and OpenAI

July 8, 2026
Next Post
New Alibaba AI framework skips loading every tool, cutting agent token use 99%

New Alibaba AI framework skips loading every tool, cutting agent token use 99%

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

No Result
View All Result
New warnings over controversial supplement Kratom

New warnings over controversial supplement Kratom

July 4, 2026
US Foods Holding Stock: Gaining Market Share In Key Segments (NYSE:USFD)

US Foods Holding Stock: Gaining Market Share In Key Segments (NYSE:USFD)

July 4, 2026
Cliffhangers in high-stakes California primary elections

Cliffhangers in high-stakes California primary elections

July 4, 2026

About

Learn more

Our Services

Legal

Privacy Policy

Terms of Use

Bloggers

Learn more

Article Links

Contact

Advertise

Ask us anything

©2020- TradePoint.io - All rights reserved!

Tradepoint.io, being just a publishing and technology platform, is not a registered broker-dealer or investment adviser. So we do not provide investment advice. Rather, brokerage services are provided to clients of Tradepoint.io by independent SEC-registered broker-dealers and members of FINRA/SIPC. Every form of investing carries some risk and past performance is not a guarantee of future results. “Tradepoint.io“, “Instant Investing” and “My Trading Tools” are registered trademarks of Apperbuild, LLC.

This website is operated by Apperbuild, LLC. We have no link to any brokerage firm and we do not provide investment advice. Every information and resource we provide is solely for the education of our readers. © 2020 Apperbuild, LLC. All rights reserved.

No Result
View All Result
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop

© 2023 - TradePoint.io - All Rights Reserved!