🚀 Inspiration
With Chrome introducing built-in on-device AI (Gemini Nano), I wanted to explore how developers could harness local intelligence directly inside the browser — no external servers, no data leaving your machine.
The idea was simple:
“What if a Chrome extension could summarize any webpage instantly — locally if possible, or intelligently switch to the cloud if not?”
This became Gemini Nano + Cloud Summarizer, a project built to demonstrate the harmony between privacy, performance, and adaptability.
🧩 About the Project
The extension allows users to summarize any webpage using Google’s Summarizer API (Gemini Nano) built into Chrome Canary. If the on-device model isn’t available, it automatically falls back to Gemini 1.5 Flash or OpenAI GPT models via API keys — ensuring it always works.
It provides:
Real-time status updates like “Downloading model 45%” or “Summarizing…”.
Clear privacy indicators (local vs. cloud mode).
A clean, one-click popup UI built with HTML, JavaScript, and Manifest V3.
This project reflects how browser-native AI could soon replace traditional server-based ML applications — giving users control over their data while keeping AI features fast and accessible.
💡 What I Learned
How to interface with Chrome’s experimental Summarizer API using the Summarizer class.
How to manage fallbacks gracefully when local models aren’t available.
Efficient use of chrome.storage.sync for secure API key management.
Debugging experimental browser features (like Gemini Nano activation via flags).
Importance of providing user feedback loops (progress bars, error states) for experimental APIs.
⚙️ Challenges
Gemini Nano Initialization: The model often froze at 100% downloaded before becoming “available.” This was due to attestation locks in Chrome Canary builds. ✅ Solved by using version 146+ and enabling:
chrome://flags/#prompt-api-for-gemini-nano chrome://flags/#optimization-guide-on-device-model
Empty Outputs: Early API versions returned undefined for output text. I added fallback detection to handle this gracefully.
Secure API Storage: Instead of using plaintext config, I implemented chrome.storage.sync to store user keys securely.
Cross-Origin Execution: Injecting content scripts safely to extract article text was tricky — I used chrome.scripting.executeScript with sandboxed permissions.
APIs & Platforms:
Google Chrome Summarizer API (Gemini Nano)
Google Generative Language API (Gemini 1.5 Flash)
OpenAI GPT-3.5 Turbo API
Chrome Storage Sync API
Tools:
Chrome Canary 146+
VS Code
DevTools Console for live debugging
🌈 Closing Thoughts
This project is my exploration of how AI can exist within the browser itself, blending privacy with productivity. It proves that future AI tools won’t just live in the cloud — they’ll run beside us, on our own devices, instantly, securely, and intelligently.
“Built with curiosity and care — bringing Chrome’s built-in AI to life.”
Built With
- css3
- gemini
- html5
- javascript
- manifest
- nano
Log in or sign up for Devpost to join the conversation.