A privacy-focused, high-performance Chrome extension that brings local AI capabilities directly to your browser. Powered by Transformers.js and LFM2, this extension runs large language models entirely on your machine using WebGPU, ensuring your data never leaves your device.
- Local-First AI: Runs LLMs locally in the browser. No API keys required, no cloud costs, and maximum privacy.
- Alibaba Page Agent Integration: Uses Alibaba's Page Agent as the front-end chatbot interface. The extension injects the agent into the current tab while hosting the LLM in the background.
- Local LLM Hosting: Transparently provides an OpenAI-compatible API to the injected Page Agent, serving inference directly from the extension's offscreen document.
- WebGPU Acceleration: Leverages modern GPU hardware for fast inference. Falls back to WASM for compatibility.
- Function Calling: Native support for tool use and function calling with
LFM2-350M-ONNX. - Side Panel Interface: Integrated seamlessly into the Chrome side panel for quick access.
- On-Page Agent: Injectable chat interface that can interact with the content of any webpage.
- OpenAI Compatible: Implements common chat-completion structures for easy integration.
- Core: Transformers.js v3+
- Model:
onnx-community/LFM2-350M-ONNX - Runtime: Chrome Extension (Manifest V3)
- Language: TypeScript
- Bundler: Vite
- Clone the repository:
git clone https://github.com/your-username/page-agent-ext.git
- Install dependencies:
bun install # or npm install - Build the project:
bun run build # or npm run build - Load in Chrome:
- Open
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked" and select the
distdirectory.
- Open
Alternatively, you can download the pre-built extension:
- Download
extension.zipfrom this repository. - Unzip the archive.
- Load the resulting
distfolder inchrome://extensions/as an unpacked extension.
- Side Panel: Open the side panel to chat with the local model.
- Model Loading: The model will load automatically on first use. Note: First download (~500MB - 700MB) may take a moment depending on your connection.
- Local Storage: Models are cached locally in the browser's Cache Storage API.
This extension is built with privacy as a core principle. All processing happens locally in an Offscreen Document. No conversation data or metadata is sent to any external server.
Description: π A private, local AI assistant for your browser. Powered by Transformers.js and LFM2, running locally via WebGPU/WASM. No cloud APIs, no data tracking.
Keywords:
chrome-extension, local-ai, transformers-js, webgpu, onnx, function-calling, privacy-focused, browser-ml, lfm2, ai-agent
