@page-chat/core
v0.1.2
Published
GUI agent for web applications - add intelligent automation to any webpage with a single script
Maintainers
Readme
Page Chat
The lightweight in-page chatbot, built on top of page-agent.js. Ask questions about the current page, attach files, and chat with any AI model — no function/tool calling required.
✨ Features
- 🎯 Easy integration
- No need for
browser extension/python/headless browser. - Just in-page JavaScript. Everything happens in your web page.
- No need for
- 🧠 Works with any AI model
- No function/tool calling required — compatible with every OpenAI-compatible endpoint.
- 📖 Page-aware chat
- Reads the current page content so the AI can answer questions about what's on screen.
- 📎 File & screenshot attachments
- Attach local files or capture a screenshot as context for the conversation.
- 🔌 Built on page-agent.js
- Shares the same battle-tested DOM extraction engine, packaged as a simpler chat-only interface.
💡 Use Cases
- SaaS AI Copilot — Ship an AI assistant in your product in lines of code. No backend rewrite.
- Page Q&A — Let users ask questions about the current page content in plain language.
- Document Chat — Attach PDFs, images, or text files and discuss them with the AI.
- Accessibility — Make any web app accessible through natural language. Voice commands, screen readers, zero barrier.
🚀 Quick Start
One-line integration
Fastest way to try PageChat with our free Demo LLM:
<script src="{URL}" crossorigin="true"></script># Run the demo server locally (requires Node.js)
git clone https://github.com/pwwang/page-chat.git
cd page-chat/
npm install
# Change the API endpoint in packages/page-chat/src/demo.ts if needed, then run:
npm run dev:demoNPM Installation
npm install page-chatimport { PageChat } from 'page-chat'
const chat = new PageChat({
model: 'qwen3.5-plus',
baseURL: 'https://dashscope.aliyuncs.com/compatible-mode/v1',
apiKey: 'YOUR_API_KEY',
language: 'en-US',
persist: true, // optional, enable conversation history persistence across page reloads
title: 'My Assistant', // optional — customises the chat panel title
})For more programmatic usage, see 📖 Documentations.
🤝 Contributing
We welcome contributions from the community! Follow our instructions in CONTRIBUTING.md for setup and guidelines.
Please read the maintainer note and Code of Conduct before opening issues or PRs.
Contributions generated entirely by bots or agents without substantial human involvement will not be accepted.
👏 Acknowledgments
page-chat is built on top of page-agent.js, a full GUI automation agent for the browser. page-chat takes the same DOM extraction engine and page-reading infrastructure, strips out the automation layer, and exposes it as a simple chat interface that works with any AI model — including those without function/tool calling support.
The underlying DOM processing components were originally derived from browser-use.
DOM processing components and prompt are derived from browser-use:
Browser Use <https://github.com/browser-use/browser-use>
Copyright (c) 2024 Gregor Zunic
Licensed under the MIT License
We gratefully acknowledge the browser-use project and its contributors for their
excellent work on web automation and DOM interaction patterns that helped make
this project possible.
Third-party dependencies and their licenses can be found in the package.json
file and in the node_modules directory after installation.