The Gray Engine is Klariti’s content mediation layer. Given your active goal and the rules attached to it, the engine classifies the URLs on a page and applies visual modifications in the browser extension — for example, covering YouTube video thumbnails with a gray overlay when your goal isDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/klariti-os/klariti-os/llms.txt
Use this file to discover all available pages before exploring further.
FOCUS or WORK. It doesn’t replace platform recommendation algorithms or run heavy AI analysis on every page — it operates predictably, explains what it’s doing, and lets you reverse any modification at any time.
How it works
The engine operates in two steps:- Classify — the URL of a video is sent to the classification API, which returns a
categorydescribing the type of content. - Mediate — given the
categoryand the user’s activegoal, the extension’s content script decides whether to apply a gray overlay over that video’s thumbnail.
URL classification
The classification endpoint accepts a URL and returns a category string:category value maps to a human-readable content label — for YouTube, this corresponds directly to the YouTube Data API video category for that video (e.g. "Education", "Gaming", "Science & Technology").
Goals that drive mediation
The activegoal on the current challenge or intent determines which mediation rules apply. The four supported goals represent different modes of focus:
| Goal | Focus mode |
|---|---|
FOCUS | Maximum distraction reduction |
WORK | Professional task context |
STUDY | Reading and research mode |
CASUAL | Light mediation, lower friction |
| Goal | Behaviour |
|---|---|
FOCUS | Gray overlay applied to all video thumbnails |
WORK | Same as FOCUS — all thumbnails overlaid |
STUDY | Overlay applied only to videos whose category is not Education |
CASUAL | No overlays applied |
null (API error or unsupported URL), no overlay is applied — the engine never blocks content it cannot confidently classify.
The browser extension
The Gray Engine runs inside the Klariti MV3 browser extension. The extension background script handles two message types from content scripts and the web dashboard:Message types
| Message type | Payload | Response |
|---|---|---|
CLASSIFY_URL | { url: string } | { category: string | null } |
GET_ACTIVE_GOAL | — | { goal: string | null } |
return true) for both handlers since the API calls are asynchronous. Content scripts send these messages and receive the response to decide whether to apply a gray overlay to video thumbnails.
Design principles
Predictable
The same URL and goal always produce the same classification and the same rule set. No black-box decisions.
Explainable
Category labels are human-readable. Every overlay shows the video’s category so you can see exactly why it was blocked.
Reversible
Any page modification can be undone. Turning off an intent restores the page immediately.
Lightweight
No always-on AI analysis. Classification only runs for pages in supported categories and only when an intent is active.