This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady.
What I Built
Ever opened your browser to do one task and ended up with 40 tabs, three YouTube videos, a dozen research articles, and no idea where anything is?
Meet TabJanitor โ a local AI-powered Chrome extension that helps turn browser tab chaos into an organized workspace.
Instead of manually sorting through every tab, TabJanitor analyzes the tabs in your current browser window and suggests categories such as:
- ๐ป Development โ documentation, repositories, and coding resources
- ๐ Study โ notes, tutorials, and learning materials
- ๐ Research โ articles, references, and papers
- ๐๏ธ Shopping โ products and comparisons
- ๐ฌ Entertainment โ videos and social sites
- ๐๏ธ Junk / Review โ tabs worth a second look
You stay in control throughout the process. Review the AI's suggestions, change categories, select the tabs you actually want to close, and approve the organization before anything happens.
No surprise tab closures. No automatic actions behind your back.
Code
GitHub repository: https://github.com/ivy1o1/TabJanitor
TabJanitor is built as a Chrome Extension using Manifest V3, with local AI inference for tab classification.
## How I Built It
TabJanitor combines Chrome's native browser APIs with Gemma 3 1B, an open-weight AI model that classifies browser tabs locally.
How we used Gemma
Gemma is the intelligence behind TabJanitor's tab organization suggestions. Instead of relying only on hardcoded rules or keyword matching, we use the model to interpret tab metadata and recommend useful categories.
Here's how the process works:
- Collect tab metadata: The extension retrieves tabs from the current browser window.
- Sanitize the input: It prepares minimal metadata, including tab titles and sanitized URLs, while keeping actual browser tab IDs local.
-
Classify with Gemma: The metadata is sent to Gemma 3 1B through a local
llama.cpp/llama-serverinference endpoint. Gemma returns structured classification suggestions, including categories and confidence information. - Validate the response: The application checks the model output against the expected schema and allowed categories before accepting the suggestions.
- Let the user decide: Users can review the results, change categories, and explicitly select tabs for closure.
- Apply only after approval: Chrome's native tab-grouping APIs organize the tabs only after the user confirms the plan.
Why Gemma 3 1B?
We chose a small model because TabJanitor is designed around local inference, including the constraints of everyday hardware. Gemma lets us experiment with AI-powered classification without making a hosted, paid API a requirement for the core workflow.
Running it through llama-server also gives the extension a local inference endpoint that it can communicate with, while keeping model inference separate from browser actions.
The rest of the stack
- Chrome Extension Manifest V3 โ extension architecture and permissions.
- Chrome Tabs and Tab Groups APIs โ reading tabs and creating native browser groups.
- Gemma 3 1B โ interpreting tab metadata and suggesting categories.
- llama.cpp / llama-server โ local model inference.
- Schema validation and application logic โ validating AI suggestions and enforcing explicit user approval.
The overall workflow is:
Scan โ Sanitize โ Classify with Gemma โ Validate โ Review โ Approve โ Organize
The important design decision is that Gemma recommends; the application validates; the user decides. The model doesn't directly execute browser actions or independently close tabs.
Why Does Open Innovation Matter?
A tool that organizes your browser shouldn't require sending your browsing history to a third-party AI service.
Using an open-weight model and local inference makes a different approach possible: run the classification locally, inspect how the system behaves, and build around privacy and user control instead of depending on a closed, hosted API.
Open innovation also makes experimentation more accessible. I can test the model, adjust validation, investigate failures, and build a useful workflow without making a paid API the foundation of the project.
For TabJanitor, openness isn't just about the technology. It's part of the product's design philosophy: your browser, your data, your decision.
My Agent Session
Building TabJanitor involved breaking the problem into smaller pieces: browser-tab collection, metadata sanitization, AI classification, review-plan validation, and explicit user-approved organization.
Each part has a defined responsibility, so the AI can suggest what to do without directly controlling browser actions.
The Lazy Payoff
The aim is to replace the tedious process of opening, inspecting, grouping, and closing tabs one by one with a single reviewable workflow.
Rather than promising an arbitrary number of minutes saved, TabJanitor focuses on reducing repetitive effort while avoiding the cost of accidentally closing a tab you still need.
Less tab chaos. Less manual sorting. More focus.
Top comments (0)