Skip to main content

Documentation Index

Fetch the complete documentation index at: https://onlook.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The scoring engine processes a rolling window of attention signals and outputs a single score between 0 and 100. The score is updated in real time as new signals arrive.

Signal types

SignalEffectPoints
TAB_HIDDENUser switched away from tab−20
WINDOW_BLURApp window lost focus−20
IDLENo input for 30s−20
NO_FACEFace not detected in camera−25
TAB_VISIBLEUser returned to tab+10
WINDOW_FOCUSApp window regained focus+10
ACTIVITY_RESUMEDInput detected after idle+10
FACE_DETECTEDFace detected in camera+10

Rolling window

Scores are computed over the last 10 events using a ring buffer. This makes the score responsive to recent behavior without overreacting to momentary distractions.

Thresholds

The default intervention threshold is 40. You can configure this per session:
const session = track(userId, { threshold: 60 })
When the score drops below the threshold and no intervention is currently active, the drop event fires.

Score ranges

RangeMeaning
75–100High attention
50–74Moderate — monitor
0–49Low — consider intervening