DEV Community

Gaus Ahmed
Gaus Ahmed

Posted on

How I Built an AI Website Assistant That Understands Any Page in Real-Time

The Problem

Users get stuck on websites. Complex dashboards, multi-step forms, confusing navigation. The result: support tickets, abandoned forms,
frustrated users.

Tools like WalkMe solve this, but they cost ~$50K/year and require someone to manually build every walkthrough. When the UI changes,
flows break.

I wanted something smarter.

What I Built

DrGUI — an AI assistant that lives on any website. One script tag, and users get intelligent guidance for any task.

Try it: drgui.in

How It Works

  1. Add the script tag to your site
  2. The SDK scans the page DOM — fields, buttons, navigation, sections
  3. User asks a question or requests help
  4. The AI (Gemini 2.5 Flash) understands the page context and returns steps
  5. The SDK highlights elements and walks the user through each step
  6. After completing steps, it re-scans and auto-continues until done

The Tech Stack

  • SDK: Vanilla JS, Shadow DOM for CSS isolation
  • Backend: Express.js, Our LLM
  • Voice: Web Speech API (STT) + A TTS
  • Languages: 9 Indian languages like Hindi, Tamil, Telugu, Marathi, Kannada, Malayalam, Bengali, Gujarati, English

The Interesting Parts

Shadow DOM Isolation

The biggest challenge was making a widget that works on ANY website
without CSS conflicts. Shadow DOM was the answer, the entire chat

panel lives in its own isolated DOM tree.

AI Auto-Continuation

When the AI returns guidance steps, the SDK doesn't just show them, it tracks which steps are completed, re-scans the page after navigation, and sends a [CONTINUE] request with completedSelectors so the AI knows what's done and what's next.

Voice Chat Mode

The FAB button transforms into a voice orb with three states:

  • Listening (pulsing animation)
  • Thinking (breathing animation)
  • Speaking (bouncing animation)

STT pauses during TTS playback to prevent hearing its own voice.

Try It

The chatbot on drgui.in is the product running on itself. Click the widget in the bottom-right corner and ask anything about the website.

Free 7-day trial. Would love your feedback.

Top comments (0)