DEV Community

BHUVANESH M
BHUVANESH M

Posted on

MaskAgent : A Privacy-First Browser Agent That Protects Your Data Before AI Sees It

MaskAgent is a privacy-first browser agent designed to perform
intelligent browser automation while keeping sensitive user data
protected on the device.

MaskAgent

Smart India Hackathon 2026 ยท Problem Statement SIH26171

๐Ÿ”— Project: https://bhuvanesh-m-dev.github.io/maskagent/
๐Ÿ”— GitHub: https://github.com/bhuvanesh-m-dev/maskagent
โ–ถ๏ธ Demo: https://youtube.com/watch?v=_rl1w6US6_U


The Problem: AI Browser Agents Can See Too Much

AI browser agents are becoming capable of understanding webpages and
performing tasks such as clicking buttons, entering information,
scrolling, and navigating websites.

But there is a privacy problem.

A webpage may contain:

  • Names and addresses
  • Email addresses and phone numbers
  • Account information
  • Financial information
  • Personal identifiers
  • Other confidential information

If an AI system receives the raw webpage or screen content, sensitive
information may cross the privacy boundary before the agent can reason
about the task.

MaskAgent approaches this problem differently:

Protect the sensitive information before AI reasoning begins.

Privacy<br>
Problem


What Is MaskAgent?

MaskAgent is a privacy-first browser agent that combines browser
automation, DOM analysis, visual perception, sensitive-data detection,
local masking, and AI reasoning.

Its core principle is:

Perceive Locally โ†’ Protect Locally โ†’ Reason Intelligently

Instead of directly sending raw browser content to an AI model,
MaskAgent first analyzes the webpage locally.

Browser Screen
      โ†“
DOM + Visual Perception
      โ†“
Sensitive Data Detection
      โ†“
Local Masking / Redaction
      โ†“
Sanitized Context
      โ†“
AI / LLM / VLM Reasoning
      โ†“
Browser Action
Enter fullscreen mode Exit fullscreen mode

Privacy-First<br>
Pipeline


How MaskAgent Works

1. Perceive Locally

MaskAgent analyzes the browser environment using webpage structure and
visual information.

It can combine:

  • DOM information
  • Visual webpage information
  • UI elements
  • Text regions
  • Form fields
  • Page structure

2. Protect Locally

Sensitive information is detected and masked before it becomes part of
the AI reasoning context.

The goal is:

Raw sensitive data stays local.

3. Reason Intelligently

After sanitization, the AI receives a safer representation of the
webpage.

The agent can then reason about the task and determine the required
browser action.

4. Execute Locally

The browser agent can perform actions such as:

  • Click
  • Type
  • Scroll
  • Navigate

Browser<br>
Actions


The Privacy Boundary

The most important architectural idea in MaskAgent is the privacy
boundary
.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚             LOCAL / PROTECTED                 โ”‚
โ”‚                                               โ”‚
โ”‚ Browser โ†’ DOM + Vision โ†’ Detection โ†’ Masking โ”‚
โ”‚                                               โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                       โ”‚
                 Sanitized Context
                       โ”‚
                       โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                 AI REASONING                  โ”‚
โ”‚                                               โ”‚
โ”‚          LLM / VLM โ†’ Browser Action           โ”‚
โ”‚                                               โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
Enter fullscreen mode Exit fullscreen mode

The design principle is simple:

RAW SENSITIVE DATA STAYS LOCAL; ONLY SANITIZED CONTEXT REACHES AI.

MaskAgent<br>
Architecture


DOM + Visual Perception

A major part of the planned MaskAgent architecture is combining
DOM-based understanding with visual perception.

DOM information can provide structured webpage information, while visual
perception can help understand what is actually displayed on the screen.

This combination can help MaskAgent detect sensitive regions more
precisely, especially on dynamic or visually complex webpages.

              WEBPAGE
                 โ”‚
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ†“                 โ†“
       DOM          Visual Perception
        โ”‚                 โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                 โ†“
       Sensitive Data Detection
                 โ†“
          Mask / Redact
Enter fullscreen mode Exit fullscreen mode

Why On-Device Processing?

Privacy-sensitive information should ideally be protected as early as
possible.

MaskAgent therefore focuses on local processing for sensitive-data
detection and masking.

Potential benefits include:

  • Reduced exposure of raw sensitive data
  • Better privacy control
  • Lower dependence on remote preprocessing
  • Faster local decisions for supported workloads
  • A clearer privacy boundary between perception and AI reasoning

The project also explores browser technologies such as WebGPU and
WebAssembly for lightweight local computation.


Technology Stack

Technology<br>
Stack

Area Technology


Browser Extension Chrome / Firefox
Extension Standard Manifest V3
Languages JavaScript / TypeScript
Browser APIs Chrome Extension APIs
Local Acceleration WebGPU / WebAssembly
ML Runtime ONNX Runtime Web / Transformers.js
AI Lightweight Vision Models / LLM / VLM
Local AI Interface Ollama
Backend / Services FastAPI
Privacy Layer DOM + Visual PII Detection, Masking and Redaction


Current Prototype

MaskAgent is being developed as a browser extension prototype.

The current project explores:

  • Browser-based AI interaction
  • DOM analysis
  • Sensitive-data detection
  • Privacy masking
  • Local AI integration
  • Browser automation
  • Click, Type, Scroll and Navigate actions

The project is being developed for Smart India Hackathon 2026, under
problem statement SIH26171 --- On-device Visual Perception for
Lightweight Browser Agents
.


Example Privacy Flow

Imagine a webpage contains:

Name: Bhuvanesh M
Email: bhuvanesh@example.com
Account Number: 1234567890
Enter fullscreen mode Exit fullscreen mode

Instead of directly giving the raw information to an AI reasoning
system, the privacy layer can transform sensitive fields into protected
representations.

For example:

Name: [PERSON]
Email: [EMAIL]
Account Number: [ACCOUNT_NUMBER]
Enter fullscreen mode Exit fullscreen mode

The AI can reason about the structure and task while the original
sensitive values remain protected locally.

This is the core idea behind sanitized context.


Browser Automation

MaskAgent is designed around practical browser actions:

Click
  โ†“
Type
  โ†“
Scroll
  โ†“
Navigate
Enter fullscreen mode Exit fullscreen mode

The privacy layer sits before AI reasoning rather than being added after
the AI has already received the webpage.

Browser<br>
Automation


Activity and Agent Flow

A browser agent needs to continuously understand what is happening on
the page and decide what to do next.

MaskAgent separates perception, protection, reasoning and execution.

        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚    Browser   โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ†“
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚  Perception  โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ†“
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚   Privacy    โ”‚
        โ”‚   Protection โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ†“
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚ AI Reasoning โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ†“
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚   Browser    โ”‚
        โ”‚    Action    โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
Enter fullscreen mode Exit fullscreen mode

Activity<br>
Stream


Where Can This Be Useful?

A privacy-first browser agent can be relevant to workflows where
webpages contain confidential information.

Potential application areas include:

Banking and Finance

Protect account details, transaction information and other financial
data during browser automation.

Healthcare

Reduce exposure of sensitive patient or medical information during
automated workflows.

Government

Support browser automation for portals that contain citizen or
administrative information.

Enterprise

Provide privacy-aware automation for internal dashboards, business
systems and confidential workflows.

Education

Support automated browser tasks while reducing unnecessary exposure of
student or institutional information.


Challenges

Building a privacy-first browser agent introduces several technical
challenges.

Inference Latency

Local visual or AI inference can be computationally expensive.

Approach: lightweight models and browser acceleration technologies.

Detection Errors

Sensitive information may be missed or incorrectly detected.

Approach: combine DOM information with visual perception and improve
detection rules/models.

Over-Redaction

Masking too much information can reduce the usefulness of the AI
context.

Approach: precise region detection and semantic placeholders.

Dynamic Webpages

Webpages can change continuously.

Approach: continuous page analysis and efficient browser-side
processing.

Limited Resources

Browser-based AI must work within available CPU, memory and GPU
resources.

Approach: lightweight inference, WebGPU acceleration and efficient
processing pipelines.


Privacy by Design

MaskAgent is built around a privacy-by-design concept:

        RAW PAGE
           โ”‚
           โ–ผ
   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   โ”‚ Local Detection โ”‚
   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
            โ†“
   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   โ”‚ Local Masking   โ”‚
   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
            โ†“
     SANITIZED DATA
            โ”‚
            โ–ผ
      AI REASONING
Enter fullscreen mode Exit fullscreen mode

The objective is not simply to tell an AI model to "ignore" private
information.

The objective is to reduce exposure before AI reasoning receives the
context
.


What Makes MaskAgent Different?

The project focuses on the combination of:

  • Browser automation
  • On-device visual perception
  • DOM understanding
  • Sensitive-data detection
  • Local privacy masking
  • Sanitized AI context
  • AI-based browser reasoning

The central design idea is:

Privacy should be part of the browser agent's perception pipeline,
not an afterthought.


Project Architecture

MaskAgent<br>
Architecture

At a high level:

Browser
   โ”‚
   โ”œโ”€โ”€ DOM
   โ”‚
   โ””โ”€โ”€ Visual Screen
          โ”‚
          โ–ผ
   Perception Layer
          โ”‚
          โ–ผ
   Sensitive Data Detection
          โ”‚
          โ–ผ
   Privacy / Masking Layer
          โ”‚
          โ–ผ
   Sanitized Context
          โ”‚
          โ–ผ
   AI Reasoning
          โ”‚
          โ–ผ
   Browser Automation
Enter fullscreen mode Exit fullscreen mode

Repository Structure

maskagent/
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ CONTRIBUTING.md
โ”œโ”€โ”€ code_files/
โ”‚   โ”œโ”€โ”€ README.md
โ”‚   โ”œโ”€โ”€ background.js
โ”‚   โ”œโ”€โ”€ content.js
โ”‚   โ”œโ”€โ”€ manifest.json
โ”‚   โ”œโ”€โ”€ popup.html
โ”‚   โ”œโ”€โ”€ popup.js
โ”‚   โ”œโ”€โ”€ styles.css
โ”‚   โ””โ”€โ”€ icons/
โ”œโ”€โ”€ img/
โ”œโ”€โ”€ papers/
โ”œโ”€โ”€ ppt_files/
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ developers.html
โ””โ”€โ”€ team.html
Enter fullscreen mode Exit fullscreen mode

Try the Prototype

GitHub

https://github.com/bhuvanesh-m-dev/maskagent

Project Website

https://bhuvanesh-m-dev.github.io/maskagent

Demo

The demo explains the motivation behind MaskAgent and shows the working
prototype.


Research and References

The project explores technologies and documentation related to:

  • Chrome Extensions
  • Browser Extension APIs
  • WebGPU
  • WebAssembly
  • Ollama
  • Transformers.js
  • ONNX Runtime Web
  • FastAPI
  • Lightweight AI models
  • Browser automation
  • Privacy-preserving AI systems

Useful Documentation


Smart India Hackathon 2026

Project: MaskAgent --- Privacy-First Browser Agent

Problem Statement: SIH26171

Problem: On-device Visual Perception for Lightweight Browser Agents

Core Approach:

Perceive Locally โ†’ Protect Locally โ†’ Reason Intelligently

MaskAgent is being developed as a solution concept for privacy-aware
browser automation where sensitive screen information should be
protected before AI reasoning.


Roadmap

Future development areas include:

  • Improved visual PII detection
  • More precise bounding-box detection
  • DOM + vision fusion
  • Lightweight on-device models
  • Better dynamic webpage handling
  • Improved privacy masking
  • More browser actions
  • Improved local AI integration
  • Performance optimization using WebGPU
  • Broader browser compatibility

Limitations

MaskAgent is an active prototype and research-oriented project.

Detection accuracy, browser compatibility, inference speed and model
capabilities may vary depending on the webpage, device and selected AI
model.

The project should not be treated as a guarantee that all sensitive
information will always be detected or protected.


Team

Team DataSync

MaskAgent is being developed as part of the Smart India Hackathon 2026
project work.

Team


Keywords

AI browser agent ยท privacy-first AI ยท browser automation ยท
PII detection ยท on-device AI ยท local AI ยท Chrome extension ยท
Manifest V3 ยท WebGPU ยท WebAssembly ยท visual perception ยท
LLM browser agent ยท privacy-preserving AI ยท AI automation ยท
sensitive data masking ยท DOM analysis


Final Thought

AI browser agents should not have to choose between intelligence and
privacy
.

MaskAgent explores another approach:

Let the browser understand sensitive information locally, protect it
locally, and give the AI only the context it needs to reason.

Perceive Locally โ†’ Protect Locally โ†’ Reason Intelligently.


Connect With the Project

๐ŸŒ Website: https://bhuvanesh-m-dev.github.io/maskagent/\
๐Ÿ’ป GitHub: https://github.com/bhuvanesh-m-dev/maskagent\
โ–ถ๏ธ Demo: https://youtube.com/watch?v=_rl1w6US6_U

AI #BrowserAutomation #Privacy #ArtificialIntelligence #OnDeviceAI

WebGPU #ChromeExtensions #MachineLearning #LLM #CyberSecurity

Top comments (0)