Skip to content

Features

Why "Mole"?

Mole works just like its namesake: after you ask a question, it burrows underground (into the background), silently digging through tunnel networks — calling tools, searching the web, parsing data. Once it finds the treasure, it surfaces and presents the results in the floating ball. The whole process never interrupts what you're doing.

Surface = Floating ball (the entry point you see) Underground = Background (where the AI works) Tunnels = Channel + MCP (the communication network connecting everything)

Floating Ball AI Chat

Mole injects a floating ball on every webpage as the entry point for AI interaction.

  • Shadow DOM isolation — The floating ball's styles are fully isolated within Shadow DOM, never affecting or being affected by the host page's styles
  • Keyboard shortcutCmd+E (Mac) / Ctrl+E (Windows) to quickly summon the search box
  • Drag to reposition — The floating ball can be dragged anywhere on screen; position persists to chrome.storage.local
  • Edge-hugging — Capsule shape hugs the screen edge, slides out on hover, never disrupts normal browsing
  • Streaming responses — AI replies stream in real time, showing the thinking process and tool call status

Agentic Loop Architecture

At Mole's core is a minimal Agentic Loop, with this design philosophy:

Code handles mechanics and boundaries (guarantees the floor), the model handles decisions and strategy (determines the ceiling)

Core Loop

Sample → Has tool calls → Execute → Write back → Continue sampling
         No tool calls  → Finish

Code is Responsible For (Mechanics + Boundaries)

  • Sample → Execute → Write-back loop
  • Budget enforcement (turn limits, call count limits, context length limits)
  • Infinite loop detection (same tool + params repeated N times → auto-terminate)
  • Empty response retry
  • Auto context compression when too long
  • Subtask recursion entry point

Model is Responsible For (Decisions + Strategy)

  • Intent classification / tool selection / task decomposition
  • Verification strategy / when to stop / response wording

Task Levels

Mole classifies tasks into four levels by complexity, determined autonomously by the model:

Level 1: Direct Answer

Greetings, casual chat, knowledge Q&A — answered directly with text, no tools called.

Level 2: Single-Step Operation

One clear small goal (search, click, screenshot, query) — calls the most suitable tool, replies after getting results.

Level 3: Multi-Step Task

Goals requiring 2+ steps. Each step decides the next based on the actual result of the previous step, rather than planning all steps upfront.

Level 4: Compound Task

Contains multiple relatively independent sub-goals. Uses spawn_subtask to split each independent sub-goal into an isolated task with its own context, preventing information cross-contamination.

Deep CDP Control

Mole connects to 10 Chrome DevTools Protocol (CDP) domains, providing browser-process-level deep control that overcomes Content Script limitations:

  • Trusted event injection — Sends isTrusted=true mouse/keyboard events, bypassing anti-bot event source detection
  • Dialog handling — Automatically detects and handles alert/confirm/prompt dialogs, preventing automation flow interruption
  • iframe piercing — Execute JS and get text within cross-origin iframes, solving CAPTCHA and payment form scenarios
  • Network visibility — Complete request/response data (including body and headers), plus Cookie read/write
  • Request interception — Intercept requests to modify and continue, return mock responses, or simulate failures; supports auth header injection and CORS bypass
  • Deep DOM operations — Query/modify DOM ignoring same-origin policy, get precise box model geometry
  • Page storage — Cross-origin read/write of localStorage / sessionStorage without content scripts
  • CSS styles — Get computed styles and matching rules, modify inline styles, dynamically inject CSS rules
  • Visual highlighting — Highlight DOM elements or regions so users can see what the AI is operating on
  • Device emulation — Simulate mobile viewports, override User-Agent, spoof geolocation and timezone
  • Console capture — Automatically collect console output and uncaught exceptions to help diagnose page issues

All CDP tools share a unified session manager (cdp-session.ts) that automatically manages debugger attach/detach lifecycle and domain event listeners.

Automatic Context Compression

When conversation context grows too long, Mole automatically compresses historical context while preserving key information, ensuring continued operation within the LLM's context window limits. This prevents long multi-step tasks from failing due to context overflow.

Session History

Mole supports session history — you can view and manage past conversations in the Options page. The complete process of each conversation (including tool calls and results) is saved.

Released under the AGPL-3.0 License