How it's built
The technical design behind ATLAS Explain, for developers and for the judges of Google's #BuildHybridAI challenge. Everyday use needs none of this.
The AI-assistant connector (MCP)
- One address on Cloudflare Workers' free plan speaks the Model Context Protocol over Streamable HTTP, current and earlier protocol versions alike.
- Seven read-only tools: explain a term, browse the glossary, asset details, official figures, crypto prices, price history (with an interactive chart inside the chat) and today's headlines. It also offers prompts, glossary resources and completions.
- No account, no key, no storage. It answers what the assistant asks and keeps nothing. It is listed in the official MCP Registry.
Setup steps for each assistant are on the setup page.
Hybrid inference with Firebase AI Logic
In the web app, every explanation goes through the Firebase AI Logic Web SDK in hybrid mode, with prefer_on_device as the default.
- On the device. When Chrome's Prompt API reports Gemini Nano as available, the prompt runs locally. Nothing leaves the computer, and the answer is labelled "On this device".
- In the cloud. When Nano is unavailable (phones, other browsers, older hardware) or the text is too long for it, the same prompt goes to Gemini Flash-Lite in the cloud and is labelled "Cloud".
- Private context stays local. Private notes and watchlists are only ever included in on-device prompts. A cloud fallback drops them and says so.
The path that actually ran is read from the SDK's response and shown on every answer. It is never guessed.
Protection and configuration
- App Check with reCAPTCHA Enterprise is enforced on Firebase AI Logic, so only this site can spend cloud calls.
- Fair-use limits: each browser is limited to 8 cloud answers a minute and 300 a day. Answers on the device are never limited.
- Remote Config holds the inference mode, the cloud model, the prompt template, the on-device size limits, the price provider and the billing switch. Built-in defaults apply when it can't be read.
- Education-only guardrails: a fixed system prompt, refusal of requests for trade decisions, removal of account-like numbers before anything is sent, and a scan in the release check that blocks trade-instruction wording.
Data
- Official figures (US Treasury, ECB, Bank of Canada, EIA and SEC EDGAR), headlines (GDELT) and the connector’s crypto prices (Kraken, with CoinGecko as backup) are collected into a small data site this project publishes, so every answer can name its source and time and the connector never depends on a rate-limited source.
- Live crypto prices in the web app come from a public market-data provider (Kraken or CoinGecko, chosen in Remote Config). The provider is named and linked next to every price, with its time.
- No fixtures. Missing data is shown as missing, with the reason.
- ATLAS research desk. ATLAS Explain can also read the public signal of the ATLAS research software when that software runs on the same computer. That integration is optional and is hidden for everyone who doesn't run ATLAS. Its paper predictions stay withheld until they pass a published evidence gate.
Stack
- TypeScript with Vite, no UI framework. The app's routes are lazy-loaded.
- The connector: a Cloudflare Worker using the same glossary and data code as the web app.
- Firebase: AI Logic, App Check, Remote Config, Authentication (Google and email link), Firestore with owner-only rules, and Hosting.
Source
Everything runs online: the website and web app on Firebase Hosting, and the AI-assistant (MCP) address on Cloudflare's free plan. The code is open source under Apache-2.0 at github.com/MISHHF93/atlas-explain.