An intelligent Chrome extension that allows you to chat with any webpage using AI. Ask questions about the content, get summaries, extract information, and more—all without leaving your browser.
✨ AI-Powered Q&A - Ask questions about any webpage and get intelligent answers
📄 Content Awareness - The AI reads and understands the full page content
🚀 Fast & Efficient - RAG (Retrieval-Augmented Generation) for accurate, contextual responses
💬 Clean UI - Modern, glassmorphic interface integrated directly into your browser
🔒 Private - Process pages locally through your own backend server
- Open any webpage in Chrome
- Click the Website Assistant extension icon to open the popup
- Ask a question about the page content
- Get an AI-generated response within seconds
The extension leverages LangChain with HuggingFace LLMs to:
- Load and parse webpage content
- Split content into semantic chunks
- Create embeddings for retrieval
- Perform retrieval-augmented generation (RAG)
- Return concise, contextual answers
- Python 3.8+
- Chrome/Chromium browser
- HuggingFace API token (for LLM access)
cd backend
pip install -r requirements.txtRequired packages:
flaskflask-corslangchain-huggingfacelangchainlangchain-communitychromadbpython-dotenv
Create a .env file in the backend/ directory:
HUGGINGFACEHUB_API_TOKEN=your_huggingface_api_token_hereGet your token from: https://huggingface.co/settings/tokens
cd backend
python app.pyThe server will run on http://127.0.0.1:5000
- Open
chrome://extensions/in your browser - Enable Developer mode (toggle in top-right)
- Click Load unpacked
- Navigate to the
extension/folder and select it - The extension should now appear in your extensions list
- Navigate to any website you want to ask about
- Click the Website Assistant icon in your extension bar
- Enter your question in the text area (e.g., "Summarize this article", "What are the main points?")
- Click "Ask AI" and wait for the response
- Read the answer in the response area
Website Assistant/
├── backend/
│ ├── app.py # Flask server with LangChain RAG pipeline
│ ├── test.py # Testing utilities
│ └── requirements.txt # Python dependencies
├── extension/
│ ├── index.html # Popup UI with styling
│ ├── popup.js # Extension logic and communication
│ ├── manifest.json # Chrome extension manifest
└── README.md # This file
index.html- Modern popup UI with glassmorphic designpopup.js- Handles tab URL detection and backend communication
app.py- REST API endpoint for chat requests- Uses HuggingFace Endpoints for LLM inference
- Implements LangChain's RAG pipeline
- Vector storage with Chroma DB
- Semantic search for context retrieval
Request:
{
"url": "https://example.com/article",
"prompt": "What is this article about?"
}Response:
{
"response": "This article discusses..."
}Error Response:
{
"error": "Missing 'url' or 'prompt' in request"
}Edit backend/app.py to customize:
-
Text Chunking: Modify
RecursiveCharacterTextSplitterparameterschunk_size: Size of text chunks (default: 1000)chunk_overlap: Overlap between chunks (default: 200)
-
Embedding Model: Currently uses
sentence-transformers/all-MiniLM-L6-v2- Can be swapped for other HuggingFace embedding models
-
LLM Model: Currently uses
openai/gpt-oss-120b- Configure different models as needed
The extension requires:
activeTab- Access to the current tab's URLhost_permissionsforhttp://127.0.0.1:5000/*- Local backend communication
- Ensure the Flask server is running:
python backend/app.py - Check that the server is accessible at
http://127.0.0.1:5000 - Verify CORS is enabled in Flask
- Only HTTP/HTTPS websites are supported
- Some restricted pages (chrome://, file://) cannot be accessed
- Check your HuggingFace API token is valid
- Ensure you have sufficient API quota
- Check backend console for error messages
MIT License - Feel free to use and modify this project.
Contributions are welcome! Please feel free to submit issues or pull requests.
Built with: LangChain • HuggingFace • Flask • Chrome Extension API