Skip to content

MasterKN48/pageAgentLocalAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Page Agent - Local AI Chrome Extension

Extension Screenshot

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.

πŸš€ Features

  • 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.

πŸ› οΈ Tech Stack

  • Core: Transformers.js v3+
  • Model: onnx-community/LFM2-350M-ONNX
  • Runtime: Chrome Extension (Manifest V3)
  • Language: TypeScript
  • Bundler: Vite

πŸ“¦ Installation

  1. Clone the repository:
    git clone https://github.com/your-username/page-agent-ext.git
  2. Install dependencies:
    bun install # or npm install
  3. Build the project:
    bun run build # or npm run build
  4. Load in Chrome:
    • Open chrome://extensions/
    • Enable "Developer mode"
    • Click "Load unpacked" and select the dist directory.

πŸ“₯ Direct Download (Pre-built)

Alternatively, you can download the pre-built extension:

  1. Download extension.zip from this repository.
  2. Unzip the archive.
  3. Load the resulting dist folder in chrome://extensions/ as an unpacked extension.

πŸ“– Usage

  • 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.

πŸ”’ Privacy

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.


GitHub Information

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

About

πŸš€ Privacy-first browser AI. Powers the Alibaba Page Agent chatbot using local FunctionGemma models via WebGPU. Fast, secure, and zero-data-leakage on every tab.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors