This project presents a context-aware AI browser assistant that brings local LLM intelligence directly into the browser using Chrome Extension APIs, Ollama, and Llama 3.2.
The extension can summarize webpages, answer questions about live page content, and explain highlighted text directly inside webpages using a floating contextual AI panel.
Unlike cloud-based browser assistants that require external APIs and data transfer, this system performs all inference locally through Ollama, enabling privacy-first AI interactions with zero external API calls.
The architecture combines:
- Chrome Manifest V3
- Context-aware DOM extraction
- Local LLM inference using Ollama
- Background service worker orchestration
- Content script integration
- Floating AI explanation panels
- Popup-based contextual Q&A workflows
Most browser AI assistants rely heavily on cloud APIs and external inference services.
This creates problems such as:
- Privacy concerns
- API costs
- Latency
- Data transmission risks
- Dependency on hosted AI providers
This project demonstrates how modern browser extensions can integrate local LLMs directly into user workflows.
The system enables:
- Fully local AI inference
- Context-aware browsing assistance
- Real-time webpage summarization
- AI-powered contextual explanations
- Zero cloud dependency
- Privacy-preserving AI interactions
- Project Type: AI Browser Assistant
- Architecture: Chrome Extension (Manifest V3)
- Frontend: React + TypeScript
- LLM Runtime: Ollama
- Model: Llama 3.2
- Inference Type: Local LLM Inference
- Key Capability: Context-Aware AI Assistance
- Core Features: Summarization, contextual Q&A, floating explanations
- Privacy Model: Zero external API calls
- Open any webpage
- Highlight a paragraph
- Right-click โ Explain with Context-Aware Browser Assistant
- AI explanation appears in a floating panel directly on the page
The extension can also:
- summarize entire webpages
- answer questions about live content
- provide contextual explanations using page DOM information
- Extracts live webpage content using DOM access
- Uses page context for grounded AI responses
- Improves contextual relevance
- Runs fully through Ollama
- Uses Llama 3.2 locally
- No OpenAI or cloud API dependency
- One-click webpage summarization
- Context-aware summaries using live content
- Ask questions about currently opened webpages
- Responses generated using extracted page context
- Highlight text on webpages
- Right-click contextual explanation support
- Fast inline AI assistance
- Non-intrusive UI overlay
- Dynamic explanation rendering
- Contextual inline assistance
- Handles extension orchestration
- Sends prompts to Ollama
- Manages AI request lifecycle
- Extracts webpage DOM content
- Injects contextual floating panel
- Enables real-time interaction with webpages
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 and injects floating explanation panel |
| Background Service Worker | Handles orchestration, prompts, and AI request routing |
| Popup UI | React-based extension interface for summaries and contextual Q&A |
| Context Menu API | Right-click AI explanation trigger |
| Ollama REST API | Local LLM inference using localhost:11434 |
- React
- TypeScript
- Chrome Extension APIs
- Manifest V3
- Ollama
- Llama 3.2
- Vite
- Tailwind CSS
- DOM APIs
- Content Scripts
context-aware-browser-assistant/
โ
โโโ README.md
โโโ .gitignore
โโโ package.json
โโโ vite.config.ts
โโโ tsconfig.json
โโโ tsconfig.app.json
โโโ tsconfig.node.json
โโโ eslint.config.js
โโโ postcss.config.js
โโโ tailwind.config.js
โโโ index.html
โ
โโโ public/
โ โโโ background.js
โ โโโ contentScript.js
โ โโโ manifest.json
โ โโโ icon-128.jpg
โ โโโ vite.svg
โ
โโโ src/
โโโ App.tsx
โโโ App.css
โโโ index.css
โโโ main.tsx
โโโ vite-env.d.ts
โ
โโโ assets/
โโโ react.svg
git clone https://github.com/sucharitha1812/context-aware-browser-assistant.git
cd context-aware-browser-assistantnpm installnpm run buildInstall Ollama locally and pull Llama 3.2:
ollama pull llama3.2- Open:
chrome://extensions/
-
Enable Developer Mode
-
Click Load unpacked
-
Select the:
dist/
folder
- Open any webpage
- Click extension popup
- Select Summarize Current Page
- Open popup UI
- Ask contextual questions
- Receive AI-generated answers using live page content
Example:
What are the key points of this article?
- Highlight any webpage text
- Right-click selected content
- Choose:
Explain with Context-Aware Browser Assistant
- Floating explanation panel appears on the webpage
This project is designed privacy-first.
- Zero external API calls
- No telemetry
- No analytics tracking
- Fully local inference
- No cloud dependency
- No persistent page-content storage
- Sensitive browsing data remains local
- No third-party AI inference providers
- No external transmission of webpage content
- Demonstrates privacy-preserving AI workflows
- Enables local AI-powered productivity tooling
- Reduces dependency on cloud inference APIs
- Improves contextual browsing assistance
- Demonstrates modern browser extension engineering
- Shows practical integration of LLMs into real-world workflows
- Browser Extension Development
- Chrome Manifest V3
- React
- TypeScript
- Ollama
- Local LLM Integration
- Context-Aware AI Systems
- DOM Manipulation
- Content Script Development
- Background Service Workers
- Frontend Engineering
- AI Workflow Integration
- Requires Ollama installed locally
- Depends on browser extension permissions
- Large webpages may increase processing time
- Local inference performance depends on system hardware
- Currently optimized for Chrome-based browsers
- Draggable floating AI panel
- Persistent AI sidebar
- Multi-model support
- Multi-tab contextual understanding
- Citation-based responses
- Source highlighting
- Streaming AI responses
- Cross-browser support
MIT License
Built by Sucharitha Reddy Gaddam
This project demonstrates how modern browser extensions can integrate local LLMs directly into browsing workflows using Chrome Extension APIs, Ollama, and context-aware DOM interaction.
By combining local inference, contextual AI assistance, floating UI panels, and privacy-first architecture, the system provides a strong example of practical AI-powered browser productivity tooling without relying on external APIs.