Show HN: Gemma Gem – AI model embedded in a browser – no API keys, no cloud
TL;DR Highlight
Gemma 4 runs in-browser via WebGPU, acting on pages with no API keys
Who Should Read
Frontend or extension developers who want to run an LLM agent inside the browser without sending sensitive data to the cloud
Core Mechanics
- Gemma 4 runs directly in the browser
- A Chrome extension runs Google's Gemma 4 on-device via WebGPU.
- It needs no API key or cloud, and the README says no data leaves your machine.
- It is an agent that reads and acts on pages
- It can read pages, click buttons, fill forms, run JavaScript, and answer questions about a site.
- It has six tools: read_page_content, take_screenshot, click_element, type_text, scroll_page, run_javascript.
- Two model sizes are offered
- E2B is about 500MB on disk and E4B is about 1.5GB, cached after the first download.
- Both use q4f16 quantization (compressing weights to 4 bits) and a 128K context.
- Responsibilities are split across three parts
- The offscreen document runs the model and agent loop with @huggingface/transformers and WebGPU.
- The service worker routes messages and handles screenshots and JS execution.
- The content script handles the chat UI and DOM tools.
- Behavior is tunable in settings
- You can switch models, toggle native thinking, and cap tool-call loops per request.
- Default shortcuts are Alt+G (toggle) and Escape (close), and you can disable it per site.
- Hardware requirements are estimates, not benchmarks
- The README lists minimums without real-device benchmarks: 4GB VRAM for E2B, 6GB for E4B.
- It needs Chrome/Edge 113+ with shader-f16, and is slow on integrated GPUs.
Community Reactions
- Opinion that Chrome's Prompt API is a similar approach
- A commenter noted the Prompt API, currently in Origin Trial, exposes a similar API surface to sites.
- They checked and found the v3Nano model folder was 4,072.13 MiB.
- Concerns about security and state
- One commenter said giving a 2B model JS execution on a live page is sketchy from a security standpoint.
- They also argued a local daemon with a thin extension client is more robust, since a Chrome crash or discarded tab loses agent state.
- Request for an SDK version
- A commenter wanted this as an SDK that apps could use as a local LLM plugin for sensitive data.
- Their reasoning was that it would spare users from setting up a local LLM themselves.
How to Apply
- Check WebGPU support first
- Open chrome://gpu in Chrome 113+ and confirm WebGPU is enabled.
- Also check that shader-f16 is supported.
- Clone the repo and try E2B first
- Run pnpm install and pnpm build, then load .output/chrome-mv3-dev/ in chrome://extensions.
- Start with the ~500MB E2B and confirm page Q&A works.
- Use offscreen document logs to analyze behavior
- Inspect offscreen.html from chrome://extensions.
- Check prompt construction, token counts, raw model output, and tool execution.
- Restrict the run_javascript tool
- Disable the extension per site for sensitive pages.
- Lower Max iterations to limit tool-call loops.
Try It
# Run in a terminal (requires Chrome 113+)
git clone https://github.com/kessler/gemma-gem
cd gemma-gem
pnpm install
pnpm build
# Then enable developer mode in chrome://extensions
# and choose 'Load unpacked' with .output/chrome-mv3-dev/Terminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques