Stop Automating the Browser: Alibaba's Agent Lives Inside Your App

For years, when we talked about automating a web application, we all pretty much thought of the same things.

Selenium.

Puppeteer.

Playwright.

An agent that observes the interface from the outside, finds a button, clicks it, types text, and hopes nothing changes between one version and the next.

Alibaba just proposed a completely different approach.

Page Agent doesn’t control your application from the outside.

It lives inside it.

And that difference completely changes the architecture.


The problem with traditional automation

Most automation tools work like this:

Playwright / Selenium
          │
          ▼
      Browser
          │
          ▼
     Your application

The agent has to interpret:

  • the HTML,
  • the DOM,
  • screenshots,
  • positions,
  • coordinates,
  • visual changes.

That works very well for testing.

But not necessarily for intelligent interaction.


The Page Agent proposal

Page Agent completely inverts the model.

User
    │
    ▼
Page Agent
    │
    ▼
DOM of your application

The agent no longer needs to control a remote browser.

It’s part of the application itself.

That means it can understand directly:

  • components,
  • forms,
  • buttons,
  • tables,
  • navigation,
  • page structure.

And act on them.


How does it work?

The central idea of the project is quite elegant.

Instead of sending a screenshot to the model…

Page Agent transforms the DOM into a structured representation that’s much smaller and easier to process.

In other words, instead of sending something like this:

:camera: Image of a page

it sends something much closer to:

Input:
Email

Button:
Sign in

Select:
Country

Checkbox:
Remember me

That has several advantages:

  • fewer tokens,
  • lower cost,
  • greater speed,
  • more deterministic responses,
  • doesn’t necessarily require a multimodal model.

Use case #1 — Copilots for SaaS

This is probably the most interesting use case.

Imagine a CRM.

Today a user normally does:

Customers

New customer

Fill out form

Save

With Page Agent they could simply write:

“Create a customer named ACME and assign it to Maria.”

The agent finds the fields.

Fills in the form.

Clicks the right button.

All within the application itself.


Use case #2 — Internal tools

Every company has some internal application with:

  • too many menus,
  • too many screens,
  • too many clicks.

Now imagine being able to write:

“Generate the invoice for order 4521.”

or

“Show me all pending orders for the customer.”

Without manually navigating.


Use case #3 — Dashboards

Enterprise dashboards usually have many filters.

Date.

Branch.

Product.

Status.

With Page Agent the user could simply say:

“Show me sales for the last quarter in Chile.”

The agent sets all the filters automatically.


Use case #4 — Accessibility

One of the project’s goals.

Instead of relying solely on keyboard shortcuts or complex navigation, the user can interact using natural language.

For example:

“Open the last invoice.”

or

“Show me pending tickets.”

It’s an additional layer of accessibility without redesigning the entire interface.


Installation

The easiest way to try it is via npm.

npm install page-agent

Official repository:

Documentation:


Basic setup

Once installed:

import { PageAgent } from "page-agent";

const agent = new PageAgent({
  apiKey: process.env.OPENAI_API_KEY,
  baseURL: "https://api.openai.com/v1",
  model: "gpt-4.1"
});

Page Agent uses a provider compatible with the OpenAI API.

That means you can connect it to:

  • OpenAI
  • Claude (via compatible gateways)
  • Qwen
  • DeepSeek
  • custom models
  • any compatible endpoint.

Immediate demo

If you just want to experiment with the official demo:

<script src="https://cdn.jsdelivr.net/npm/page-agent/dist/iife/page-agent.demo.js"></script>

In a few minutes you can have a working example running directly on a web page.


What type of applications make sense to build?

Very especially:

:white_check_mark: internal tools

:white_check_mark: CRMs

:white_check_mark: ERPs

:white_check_mark: admin panels

:white_check_mark: dashboards

:white_check_mark: B2B platforms

In applications where the user spends hours navigating forms and tables, an integrated agent can save a lot of time.


How is it different from Playwright?

It’s easy to confuse them, but they solve different problems.

Playwright

  • Testing
  • Automation
  • Scripts
  • CI/CD
  • QA

Page Agent

  • Intelligent interaction
  • Copilots
  • Assistants within the application
  • Natural language-guided automation

One replaces the tester.

The other helps the user.


What’s really interesting

Beyond the technical implementation, I think what matters is the paradigm shift.

For years we imagined agents as something external.

A tool that opened the browser and clicked around.

Alibaba proposes exactly the opposite.

That the agent is part of the application itself.

Not as a chatbot floating in a corner.

But as a new layer of interaction between the user and the interface.

If this idea takes off, in a few years we’ll probably stop designing applications thinking only about buttons and menus.

We’ll also start designing them thinking about the agents that will live inside them.

And that could be as important a change as the arrival of responsive design or REST APIs.


Resources

Repository

Documentation

Demo

https://alibaba.github.io/page-agent/demo/