Page Agent

The AI helper that lives inside your web page

agent37.club

The Problem

Websites are hard to automate

Imagine you want a robot to fill out a long form on a website for you. Today you need:

That is a lot of moving parts just to click some buttons!

The Big Idea

"What if the AI lived right inside the web page?"

Page Agent is a tiny JavaScript library you drop into any web page. It reads the page, talks to an AI model, and clicks buttons / fills forms for you.

No extensions. No Python. No hidden browser. Just JavaScript.

An Analogy

Old Way

Like hiring a remote assistant who sits in another building, watches your screen through a camera, and tells a robot arm where to click.

Slow, fragile, lots of wiring.

Page Agent Way

Like giving your web page a tiny brain that already knows where every button is. You just tell it what you want in plain English.

Fast, simple, already "inside."

How It Works

Three simple steps

1. Read the Page Turns HTML into a text map of every button, link, and field
2. Ask the AI Sends the map + your request to a language model
3. Do the Action Clicks, types, scrolls -- whatever the AI decided

Then it loops back to step 1 until the task is done.

Text, Not Screenshots

A clever shortcut

Many browser agents take a screenshot and send it to a vision model. Page Agent does something smarter:

Screenshot approach

Big image, needs a vision model, expensive, slow

Text approach

Small text description of the DOM, any LLM works, fast and cheap

Since it lives inside the page, it can read the HTML directly. No need to "look" at pixels.

What Can It Do?

  • Fill forms -- "Fill out this expense report with last month's data"
  • Navigate -- "Go to settings and turn on dark mode"
  • Extract data -- "Read all the prices in this table"
  • Multi-step tasks -- "Add all items to cart, then checkout"
  • Accessibility -- Voice commands for users who cannot use a mouse
  • SaaS copilots -- Add an AI assistant to your product

It is Really Simple

Just three lines of code

// 1. Create the agent
const agent = new PageAgent({
  model: 'qwen3.5-plus',
  apiKey: 'YOUR_KEY',
  language: 'en-US',
})

// 2. Tell it what to do
await agent.execute('Click the login button')

That is it. The agent reads the page, figures out where the login button is, and clicks it.

Inside the Box

8 packages working together

PackageWhat it does (simply)
coreShared building blocks everyone uses
page-agentThe main brain that orchestrates everything
page-controllerReads the page and performs actions (click, type, scroll)
llmsTalks to AI models (bring your own!)
uiThe pretty chat panel you see on screen
extensionOptional Chrome extension for multi-tab tasks
mcpModel Context Protocol support (tool use)

Page Agent

A tiny AI brain that lives in your web page

github.com/alibaba/page-agent

12.9k stars · TypeScript · MIT License

agent37.club