# Transformers.js Gemma 4 Browser Assistant

A Chrome extension that runs an on-device AI assistant entirely in the browser with WebGPU and Transformers.js, letting it manage tabs and answer questions about the current page.

Transformers.js Gemma 4 Browser Assistant is a Chrome extension that runs an AI assistant entirely on-device, using WebGPU and Transformers.js to run the Gemma 4 model locally, so no page content or query is sent to an external server. It understands natural-language commands and acts through a set of browser tools.

It can manage tabs (listing, switching to, opening, and closing tabs), answer questions about the current webpage using retrieval-augmented generation over its extracted headings, paragraphs and lists with embeddings from all-MiniLM-L6-v2, highlight and scroll to relevant elements on the page, and search browsing history by meaning rather than exact keywords, using vector embeddings of page titles, descriptions and URLs stored in IndexedDB with time-based filtering.

It requires Chrome 113 or newer with WebGPU support and a compatible GPU, builds with pnpm, and is released under the MIT license.

Website: https://github.com/nico-martin/gemma4-browser-extension
