Sentinel — AI AdBlock
An ad blocker extension that blocks known ad networks instantly and learns unfamiliar domains by asking a language model.
Sentinel is a self-learning ad blocker extension powered by AI. It blocks known advertising and tracking networks instantly without asking anything, and it learns about unfamiliar domains in the background by asking a language model. I developed it together with Cem Emir Yüksektepe. The extension has no backend server, no telemetry and no subscription.
Purpose
Classic ad blockers rely on large filter lists that people maintain by hand. When a new ad network or a site-specific ad box appears, someone has to notice it and add it to the list. I wanted to close that gap with AI. The goal was a blocker that needs no configuration after installation, classifies the new domains it meets on its own, and is frugal enough never to ask the same question twice.
How it works
The first layer is a static block list. More than 140 known ad and tracking networks are blocked directly in the browser engine through Chrome's declarativeNetRequest rules. declarativeNetRequest is an API where the extension hands rules to the browser in advance instead of inspecting every request itself, so it adds no performance cost.
The second layer is the learning layer. Third-party domains that appear on pages and are not yet known go into a queue. When the queue fills up, the domains are sent in batches of 15 to the AI provider you selected, in a single request, and each one gets a block or allow verdict. Every verdict is stored in the browser for 30 days, and when the same domain shows up again the AI is not called at all.
For domains judged to be advertising, a dynamic blocking rule is added. These rules only cut third-party requests, so a domain is never blocked on its own site and sites keep working as intended.
The third layer is cosmetic filtering. For ad boxes embedded in the page that cannot be blocked at the network level, a simplified snapshot of the page structure is sent to the AI once, and site-specific CSS selectors come back. The selectors are cached per site for 7 days. Before they are applied they pass a safety check, and they can never hide the video player or the page layout. There is also a deterministic layer that needs no AI: images inside nofollow or sponsored links that match standard banner sizes are hidden directly.
Key features
- You can right-click any element and choose to block it as an ad. The extension outlines the area and asks for confirmation, and the rule is saved for that site and applied on every visit.
- You can pick OpenAI, Google Gemini, DeepSeek or Anthropic Claude and enter your own API key. Each provider is used with an inexpensive model.
- A "Test key" button on the settings page shows right away whether the key works.
- If you do not enter a key, the extension keeps working fully offline with the static list alone.
- The popup shows requests blocked today and in total, the number of cached verdicts, and buttons to clear the cache or rescan the current site.
- The interface is available in English and Turkish.
Community rules
There is an optional feature that is off by default. Ads you block with a right-click can be shared anonymously with a community server, containing only the domain and the CSS selector. Rules whose net score reaches +3 are applied automatically for everyone, while lower-scored rules are first shown to other users as a "is this an ad?" question and voted on. I wrote a single-file reference server for this with FastAPI and SQLite; it validates input and applies a per-IP rate limit. Unless a server address is entered in the settings, this feature sends nothing.
Technical stack
The extension is written for Manifest V3. The background service worker handles the provider calls, the queue and batching, the cache, dynamic rules and statistics. The content script takes care of cosmetic filtering and the right-click flow. AI responses are read with a tolerant JSON parser, because models sometimes wrap their answer in extra text. Verdicts and caches live in chrome.storage.local, and the queue flush is scheduled with the alarms API. The release package is built by a shell script that stamps the version number from the date and time.
Privacy and security
The API key is stored only in the browser, is never synced and is sent only to the official API of the provider you chose, over HTTPS. What goes to the AI is limited to third-party domain names and a page structure summary with scripts and styles removed and visible text cut to about 70 characters. Form data, passwords and personal information are not targeted. We run no server of our own and receive no data at all.
Cost
Thanks to cheap models, batched queries and the 30-day cache, typical use stays at a few dozen AI calls a day. After the first days most domains you meet are already cached, so the number of calls drops close to zero.
Use cases
- It suits people who want to catch new or regional ad networks that ready-made filter lists miss.
- It appeals to users who want to try AI-assisted blocking with their own API key.
- Small communities that want a shared rule pool can host the reference server themselves.
- Developers looking for an example of using a language model inside a browser extension at low cost can study it.
Status
We have prepared the store texts, permission justifications, screenshots and privacy policy for the Chrome Web Store. For now the extension can be loaded and used in developer mode.
- Category
- Browser & email extensions
- Year
- 2026
Technologies
- JavaScript
- Chrome Extension
- Manifest V3
- AI
Links
- GitHub https://github.com/cememir/aidblock