ConsentLens
About the project
ConsentLens is an open-source AI-powered consent layer for the web — a programmable consent engine that unifies fragmented consent mechanisms (OAuth, browser permissions, cookies, privacy policies, terms of service) into a single inspectable, controllable system. Users define declarative policies using uBlock-style rules with 4-layer precedence (user > trusted > community > defaults), exception syntax, and 5 built-in policy packs (Balanced, Strict, Essential, No AI Training, Paranoid). A deterministic policy engine enforces decisions while open-weight AI provides semantic understanding: purpose inference, permission interpretation, policy/terms extraction, and purpose/access mismatch reasoning with evidence citations. The engine handles temporary rules with TTL (session, 1hr, 24hr, custom) and generates human-readable “Why?” explanations for every decision, citing matched rules, precedence layers, capabilities, domains, and evidence.
The adapter system extracts consent events from 5 mechanisms: OAuth buttons/flows, browser permission prompts, cookie classification via bundled tracker lists (Disconnect/EasyPrivacy) with eTLD+1 detection, privacy policy fetching via CORS proxy with Readability extraction, and terms of service clause extraction. All adapters feed a unified ConsentEvent IR with structured capabilities, rich evidence references, and decision records. A plugin architecture makes every component swappable — adapters, classifiers, policy extractors, AI backends, providers, rule packs, and config — all importable/exportable as JSON. The Chrome MV3 extension (planned) will surface this in a side panel with capability badges, “Why?” expandable explanations, Allow Once/1hr/24hr/Deny actions, policy pack switching, consent history with audit queries, and a settings page with full config import/export.
Built for the “Best Open-Source AI Project” hackathon, ConsentLens uses open-weight AI meaningfully: OpenJev System One models provide fast structured classification (allow/ask/deny, excessiveness, purpose match, sensitivity) with confidence scores, while local fallback heuristics ensure offline functionality. The core engine is complete with 258+ tests passing — all core adapter tests (85), engine tests (179), and temporary rules/explanation/integration tests. The project is MIT licensed, community-extensible by design (uBlock-style), and the Chrome extension will demonstrate the full pipeline on real sites like Notion, Canva, and PDF converters.
Built with
Prize Categories Entered
- Submitted

Best Open-Source AI Project