Inspiration
Every week our grandparents call us with the same questions: "Where do I click to send this photo?", "How do I make a chart?", "The bank says I must update my KYC, what do I type?". Video tutorials don't help someone who can't find the File menu, and screen-sharing needs a grandchild to be free. Scammers target exactly these people.
We wanted a patient helper that sits on their own screen, points at the exact button, says the step out loud in their language, and warns them before a scam page gets their details. It has to be private, so sensitive screens stay on the device, and it has to work everywhere: in Chrome and on their Android phone.
What it does
Guido is a step-by-step guide for any website (Chrome extension) and any app (Android).
- Ask in plain words (typed or spoken, in English, Hindi or Punjabi): "make a pie chart of my expenses", "send a photo to Mom and video-call her".
- A red dot and a spoken bubble land on the exact control. Guido never clicks for you. It waits for you, then moves to the next step.
- Works in big, messy apps: Google Sheets menus and chart pickers, Google AI Studio, WhatsApp on Android.
- "Is this page safe?" Local scam rules first, then Gemini Nano on-device only: the page text never leaves the computer. Dangerous pages get a red warning bar.
- Explain this form / page in simple words. Password fields and typed values are never read.
- Remembers tasks that worked, so the next time needs zero AI calls. It asks a clarifying question when a request is vague.
How we built it: Firebase AI Logic hybrid inference
One SDK powers both platforms, and Guido picks the right inference mode for each job:
| Job | Firebase AI Logic mode | Why |
|---|---|---|
| Planning on everyday pages / Android | InferenceMode.PREFER_ON_DEVICE |
Gemini Nano on the device: free, private, no network round-trip; cloud Gemini only if Nano isn't available |
| Planning on huge app UIs (Sheets, Docs, AI Studio, Gmail, or more than 60 controls) | InferenceMode.PREFER_IN_CLOUD |
The small model was slow (~20 s) and lost track with 100+ controls; cloud Gemini plans in ~3 s, with Nano as the fallback |
| Scam check | InferenceMode.ONLY_ON_DEVICE |
Private page text must never leave the device; the AI can only raise a warning, never lower the local rules |
Chrome extension (TypeScript, Manifest V3)
- A content script lists the page's visible controls as a numbered list of labels only. Open menus and pickers come first, because Sheets renders them at the end of the page.
getAI()→getGenerativeModel()→generateContent()asks Gemini (Nano via Chrome's built-in Prompt API, or the cloud) to plan the whole task once as JSON steps.- A local matcher (ported from our earlier ElementFinder) scores the labels and finds each step on the live page, with no AI call per step. A red dot and a ring are drawn, the step is spoken, and Guido advances on click, typing, Enter or page navigation.
- App Check protects every call (a debug provider, because reCAPTCHA can't load inside an extension).
Android (Kotlin)
- An Accessibility Service reads the screen, and on-device ML Kit OCR (Latin + Devanagari) reads text.
AiRouteruses Firebase AI Logic hybrid with Gemini Nano viafirebase-ai-ondevice(PREFER_ON_DEVICE), retrying cloud-only if the on-device call fails.- When a target is ambiguous, Guido draws numbered boxes on a screenshot and Gemini picks the number (multimodal), so the box always sits on a real UI element.
- Firebase Authentication + Firestore power an optional family feed, which carries task names, never screens.
- App Check is on, and Guido switches itself off inside banking and UPI apps.
Testing: 41 unit tests and 19 end-to-end checks in real Chrome for the extension. We also ran live tests with real Gemini: a Sheets pie chart, an AI Studio API key, an on-device DuckDuckGo search, and an on-device scam check.
Challenges we ran into
- Gemini Nano was silently unavailable inside our floating card. The card is an iframe inside the web page, and Chrome only allows the Prompt API in embedded frames that opt in. Adding
allow="language-model"to the iframe madesource=on_deviceappear. - Nano struggled with Google Sheets (100+ controls): 21 s per plan, and looping plans like "Insert → Chart → Insert → Filter views". That led to the routing design: big app UIs prefer the cloud, everything else prefers the device. We also trim repeated steps.
- Canvas UIs: Sheets cells are drawn on a canvas, so they never appear in the DOM. We taught the planner to rely on Sheets' own range detection, and to use the Name box when cells really must be selected.
- Hidden menus and pickers: Sheets' chart types are
gridcells inside a menu rendered at the very end of the page, and a closed font box also hasrole=listbox. We now list open popups first and include their cells. - "Press Enter" steps have nothing to point at, so they complete on the Enter key or the next page load.
- Chrome's own
chrome://settingspages don't allow extensions at all. That is a platform limit, so Guido focuses on the web and on Android.
What we learned
- Hybrid isn't "on-device or cloud". It's choosing per prompt: privacy (scam check, device only), speed on huge UIs (cloud first), and cost and offline use (device first).
- Planning once and matching locally turns an LLM from a per-click cost into a one-time planner. Remembered plans make repeat tasks free.
- For people who are easily confused, never pointing at the wrong thing matters more than always having an answer.
What's next
Native-speaker review of the Hindi and Punjabi text, testing with real older users, a Chrome Web Store release, and more on-device tasks as Gemini Nano gets faster on large pages.
Built With
- android
- android-accessibility-service
- chrome
- chrome-built-in-ai
- chrome-devtools-protocol
- cloud-firestore
- esbuild
- firebase
- firebase-ai-logic
- firebase-app-check
- firebase-authentication
- gemini
- gemini-api
- gemini-nano
- html5
- javascript
- kotlin
- manifest-v3
- ml-kit
- node.js
- playwright
- prompt-api
- typescript
- web-speech-api