ContextFlow AI is a privacy-first browser AI agent that brings local LLM intelligence directly into your browser — no OpenAI API key, no data leaving your machine. Summarize pages, ask questions about content, and right-click any selected text to get instant AI explanations — all powered by Llama 3.2 running on your own hardware.
Example workflow:
- Open any webpage
- Highlight a paragraph
- Right-click → Explain with ContextFlow AI
- AI explanation appears in a floating panel directly on the page
- 🔒 100% Private — all inference runs locally via Ollama, zero external API calls
- ⚡ Context-Aware — automatically extracts live page DOM for grounded responses
- 🖱️ Right-Click Integration — "Explain with ContextFlow AI" on any selected text
- 💬 Floating Panel — non-intrusive AI explanation panel injected directly into the webpage
- 📄 Page Summarization — one-click summary of any webpage from the popup
- 🤖 Q&A over Page Content — ask anything about what's currently on screen
Webpage
│
│ (DOM extraction)
▼
Content Script
│
│ (page context + selected text)
▼
Background Service Worker ←──── Context Menu API
│ (right-click trigger)
│ (AI request)
▼
Ollama Local API (localhost:11434)
│
│ (AI response)
▼
Popup UI / Floating Panel
| Component | Role |
|---|---|
| Content Script | Extracts page text, renders floating explanation panel on page |
| Background Service Worker | Agent runtime — handles events, sends prompts to Ollama, routes responses |
| Popup UI | React app — summarize page, ask questions about content |
| Context Menu API | Right-click "Explain" trigger for selected text |
| Ollama REST API | Local LLM inference at localhost:11434 — private by design |
The background service worker acts as a persistent agent runtime — it orchestrates all communication between the DOM, the context menu, and the local LLM, keeping zero data in the cloud.
- Ollama installed and running
- Llama 3.2 pulled:
ollama pull llama3.2 - Chrome browser
git clone https://github.com/krishnakoushik225/contextflow-ai
cd contextflow-ai
npm install
npm run build- Open
chrome://extensions/ - Enable Developer Mode (top right)
- Click Load unpacked
- Select the
dist/folder
ContextFlow AI icon appears in your Chrome toolbar. You're ready.
- Open any webpage
- Click the ContextFlow AI toolbar icon
- Click Summarize Current Page
- Open the extension popup
- Type a question: "What are the key points of this article?"
- Click Ask AI — response uses live page content as context
- Highlight any text on any webpage
- Right-click → Explain with ContextFlow AI
- Floating explanation panel appears directly on the page
| Layer | Technology |
|---|---|
| Extension Framework | Chrome Manifest V3 |
| Language | TypeScript |
| UI | React + Tailwind CSS |
| Build Tool | Vite |
| LLM | Ollama + Llama 3.2 (local) |
| DOM Integration | Content Scripts |
contextflow-ai/
├── public/
│ ├── background.js # Background service worker (agent runtime)
│ ├── contentScript.js # DOM extraction + floating panel injection
│ ├── manifest.json # Manifest V3 config
│ └── icon-128.jpg
├── src/
│ ├── App.tsx # React popup UI
│ ├── main.tsx # Popup entrypoint
│ ├── App.css
│ └── index.css
├── dist/ # Built extension (load this in Chrome)
├── package.json
├── tailwind.config.js
├── vite.config.ts
└── README.md
ContextFlow AI is designed privacy-first:
- No telemetry — zero analytics or tracking
- No cloud API calls — all inference is local via Ollama
- No data storage — page content is never persisted or transmitted
- Open source — audit every line
- Draggable floating panel
- Follow-up questions inside the panel
- Persistent AI sidebar
- Multi-model support (Mistral, Phi, Gemma)
- Citation-based answers with source highlighting
- Multi-tab context understanding
MIT — free to use and build on.
Built by Krishna Koushik Unnam · AI Systems Developer