A Chrome Extension powered by Nano AI to enhance your browsing experience. This project was developed as part of the Google Chrome Built-in AI Challenge to demonstrate how to use Chrome's built-in AI APIs, such as Gemini Nano, to interact with integrated models and perform tasks like text summarization, and more.
-
Text Summarization
Highlight text on any webpage and get a concise summary. -
Basic AI Tasks
Additional AI-powered utilities to improve productivity.
- Nano AI – AI-powered features provided by the Gemini Nano model.
- React.js – User interface built with React's component-based structure.
- Vite – Fast build tool for an efficient development experience.
- Tailwind CSS – Utility-first CSS framework for styling.
- HTML, CSS, JavaScript – Core technologies for building the Chrome extension functionality.
-
Clone the repository or download the ZIP file.
- To clone, run:
git clone https://github.com/your-username/nano-ai-chrome-extension.git
- To clone, run:
-
Navigate to the project directory:
cd nano-ai-chrome-extension -
Install Dependencies: Run the following command to install the required npm packages:
npm install
-
Build the Extension: To build the project and prepare it for use, run:
npm run build
-
Load the Extension:
- Open Chrome and go to
chrome://extensions/. - Enable Developer Mode at the top-right corner.
- Click on "Load unpacked" and select the
distfolder inside the project directory.
- Open Chrome and go to
Before you can use the Nano AI functionality in your extension, you need to enable Gemini Nano and the Prompt API in Chrome. Follow the steps below:
- Acknowledge Google’s Generative AI Prohibited Uses Policy.
- Download Chrome Dev channel (or Canary channel) and confirm your version is 128.0.6545.0 or newer.
- Make sure your device meets the system requirements.
- Ensure at least 22 GB of free storage space.
- If after downloading, the available storage space falls below 10 GB, the model will be deleted.
- On macOS, use Disk Utility to check free disk space.
- After ensuring your storage, don’t skip this step, as some OS may show different available disk space.
- Open Chrome, and in a new tab, go to
chrome://flags/#optimization-guide-on-device-model. - Select Enabled for BypassPerfRequirement. This bypasses performance checks, which might interfere with downloading Gemini Nano.
- For Prompt API, go to
chrome://flags/#prompt-api-for-gemini-nanoand select Enabled. - For Summarization API, go to
chrome://flags/#summarization-api-for-gemini-nanoand select Enabled - Relaunch Chrome.
-
Open DevTools and send the following in the console:
await ai.languageModel.capabilities().available;
If it returns “readily”, you're all set!
-
If it fails, follow these steps:
- Open DevTools and run:
This will likely fail, but it’s expected.
await ai.languageModel.create();
- Open DevTools and run:
-
Relaunch Chrome.
-
Open a new tab and go to
chrome://components. -
Check if Gemini Nano is listed under Optimization Guide On Device Model, with a version ≥ 2024.5.21.1031.
- If no version is listed, click Check for update to force the download.
-
After the model has downloaded and updated:
- Open DevTools and run:
If it returns “readily”, you are ready to use Gemini Nano.
await ai.languageModel.capabilities().available;
- Open DevTools and run:
If this still doesn’t work, refer to the troubleshooting section below.
With the Prompt API enabled, you can head over to the Chrome Dev Playground to try out Gemini Nano: Chrome Dev Playground - Prompt API
- Click the extension icon in the Chrome toolbar.
- Choose a task (Summarize text etc.).
- Wait a moment for Nano AI to process the task and provide results.
Want to improve the extension? Here’s how:
- Fork the repository.
- Clone it to your local machine.
- Make changes or fix bugs.
- Submit a pull request with your improvements.
All contributions are welcome!
This project is licensed under the MIT License.