Embed a natural language GUI agent in web pages
Imagine filling out complex forms in an admin system with a single sentence or handling button clicks via voice commands. This tool embeds an AI agent inside web pages, allowing users to manipulate screen elements using natural language. It operates as JavaScript within the page, without requiring a browser extension or a separate server, and performs tasks by analyzing DOM elements as text.
Processing DOM text without screenshots
The tool analyzes DOM elements based on text rather than capturing the screen as an image. Consequently, it does not require a multimodal LLM or special permissions. All processing occurs on the client side, taking a different approach from server-side automation tools. It accepts natural language commands from the user, locates the corresponding elements on the page, and performs actions such as clicking or inputting.
Model selection and external control
Users can connect various models using their own LLM API keys, and locally deployed models are also supported. The provided demo LLM is for technical evaluation purposes only, and you must set up your own API key for actual services. You can perform tasks across multiple tabs via a Chrome extension, and control this agent externally through an MCP server. The MCP server is currently in beta.
Use cases and installation methods
It is suitable for adding an AI copilot to SaaS products or handling complex form inputs in admin systems like ERP and CRM with a single sentence.
- CDN script insertion The fastest method, which involves adding a script tag to the HTML. The demo LLM is initialized automatically, making it suitable for technical evaluation.
- NPM package installation Install
page-agentin your project and configure the agent directly using TypeScript or JavaScript. This allows for custom LLM configuration. - Chrome extension An optional extension feature that can be used when performing tasks across multiple browser tabs.
Client-only design and contribution principles
This project focuses on client-side web enhancement rather than server-side automation. Therefore, it is not designed for controlling pages from outside the browser. Contributions are welcome, but the project explicitly states that it does not accept code generated by bots or AI without human intervention. The license is MIT, and the DOM processing components and prompts are derived from the browser-use project. It is recommended to check the maintainer's notes for the current status and principles before adoption.