Skip to content

Page Agent

A JavaScript library that adds a natural-language AI agent to any web page you load it on.

Stars
29.6k
Forks
2.6k
Licence
MIT
Language
TypeScript
Last update
6 days ago
Type
Library

What it is

PageAgent is a JavaScript library that runs inside a web page and lets an AI agent operate that page's interface from a plain-language instruction, such as clicking a login button. It works by reading the page's text-based DOM rather than screenshots, and you connect it to your own language model or a free demo model. It is aimed at developers who want to add an in-page assistant to their own web application.

  • Embed a natural-language assistant in a SaaS product with a script tag or npm install
  • Turn multi-step form workflows into a single sentence instruction
  • Use the optional Chrome extension to let an agent work across multiple browser tabs
  • Let external agent clients control the browser through the beta MCP server

Great for

  • Developers adding an AI copilot to their own web app
  • Teams wanting to automate repetitive form filling in internal ERP, CRM, or admin tools
  • Developers who want the agent to run client-side without a headless browser or backend
  • Projects that need to connect their own LLM, including locally deployed models

Not ideal for

  • People who want to automate websites they do not control, since the README says it is designed for client-side web enhancement, not server-side automation
  • Teams that need multi-modal or screenshot-based understanding, since the README says it uses text-based DOM and no screenshots
  • Anyone needing a production-grade LLM without setup, since the demo model is for technical evaluation only
Step-by-step guide: how to use Page AgentInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Node.js (version not specified in README) · An LLM API key or a compatible model endpoint

    Install from npm

    npm install page-agent
  2. 2

    Run it

    • Install the package with npm install page-agent
    • Import PageAgent in your JavaScript or TypeScript code
    • Create an agent with your model, baseURL, apiKey, and language settings
    • Call await agent.execute with a plain-language instruction such as Click the login button
  3. 3

    Get the most out of it

    • Use the optional Chrome extension for tasks that span multiple browser tabs
    • Try the MCP Server (Beta) to let external agent clients control your browser
    • Check the docs' supported models page to choose a model that fits your setup, including local ones
    • Add ?autoInit=false to the demo script to create the agent yourself with your own LLM

Downloads

Strengths

  • Runs entirely in the page as JavaScript, with no browser extension or Python needed for basic use
  • Works with bring-your-own LLMs, including locally deployed models, per the README
  • MIT licensed and actively maintained, with a published npm package

Trade-offs

  • The README says the demo CDN is for technical evaluation only and uses a free testing API with its own terms
  • The MCP server is marked Beta, and multi-page support depends on the optional Chrome extension
  • The README does not describe security or privacy implications of giving an agent control over page content in detail

How it compares

ProjectStarsTypeLevelUpdatedBest for
page-agent (this)29.6kLibraryintermediate6 days agoDevelopers adding an AI copilot to their own web app
browser-use120kLibraryintermediate4 days agoPython developers who want to prototype an AI agent that operates websites
stagehand25.9kLibraryintermediate6 days agoDevelopers building browser agents that must work on sites they do not control
invisible_dots32.4kAI model / agentintermediate6 days agoDevelopers who want a self-hosted agent and are comfortable with a command-line setup
CloakBrowser32.7kLibrarybeginner4 days agoPython or JavaScript developers already using Playwright who need automation to get past bot checks
hermes-webui19.4kAppintermediate4 days agoPeople who already run Hermes Agent and want a browser or phone interface

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.