Nexus AI is a cutting-edge, privacy-first AI assistant that combines the power of locally-hosted Large Language Models (via Ollama) with intelligent web navigation using Playwright automation.
Unlike cloud-based AI assistants, Nexus AI keeps your data on your machine while still providing real-time web intelligence when needed.
- π§ Local AI Power β Mistral LLM via Ollama
- π Smart Web Search β DuckDuckGo + Playwright
- π Product Scraper β Table & Gallery Views
- π Privacy First β 100% Local Processing
- β‘ Lightning Fast β 3-5 second responses
- π¨ Modern UI β ChatGPT-style interface
|
|
|
|
flowchart TB
subgraph USER["π€ User Interface"]
A[Web Browser]
end
subgraph FRONT["π¨ Frontend Layer"]
B[index.html β ChatGPT-Style UI]
C[script.js β Frontend Logic]
D[styles.css β Modern Styling]
end
subgraph BACK["βοΈ Backend Layer"]
E[Flask API Server β app.py]
F[Agent Core β agent_step3.py]
G[Web Scraper β web_scraper.py]
end
subgraph AI["π§ AI Layer"]
H[Ollama Runtime]
I[Mistral LLM]
end
subgraph WEB["π Web Layer"]
J[Playwright Browser]
K[DuckDuckGo Search]
L[Website Scraping]
end
subgraph STORE["πΎ Storage"]
M[agent_state/]
N[JSON Batch Files]
end
A --> B
B --> C
C --> E
E --> F
F --> H
H --> I
F --> G
G --> J
J --> K
J --> L
F --> M
M --> N
style USER fill:#001a1a,stroke:#00f5ff,color:#00f5ff
style FRONT fill:#001a0d,stroke:#00ff88,color:#00ff88
style BACK fill:#1a1500,stroke:#ffd700,color:#ffd700
style AI fill:#0f0020,stroke:#a855f7,color:#a855f7
style WEB fill:#001a1a,stroke:#00f5ff,color:#00f5ff
style STORE fill:#1a0010,stroke:#ff006e,color:#ff006e
sequenceDiagram
autonumber
participant U as π€ User
participant F as π¨ Frontend
participant B as βοΈ Backend
participant L as π§ Local LLM
participant W as π Web Search
U->>F: Ask Question
F->>B: POST /ask
B->>L: Query Mistral
alt Confident Answer
L-->>B: Return Local Answer
else Needs Web Data
B->>W: Playwright Search
W-->>B: Search Results
B->>B: Apply Scoring Algorithm
end
B-->>F: JSON Response
F-->>U: Render Answer + Sources
| Script | Description |
|---|---|
| π’ START_NEXUS_FIXED.bat | Full Setup β Starts Ollama + Backend + Opens Browser |
| π΅ START_BACKEND_FIXED.bat | Backend Only β Manual frontend opening |
| π£ START_NEXUS_AI.ps1 | PowerShell β Alternative starter |
# Simply double-click any .bat file to start!π Click to expand Step-by-Step Setup Guide
# 1. Install Ollama β https://ollama.ai
# 2. Pull the Mistral model
ollama pull mistral
# 3. Clone the repository
git clone https://github.com/AshmitThakur23/Local-AI-Web-Navigator.git
cd Local-AI-Web-Navigator
# 4. Install Python dependencies
pip install -r requirements.txt
# 5. Install Playwright browsers
playwright install chrome# Terminal 1: Start Ollama
ollama serve
# Terminal 2: Start Backend
python backend/app.py
# Terminal 3: Serve Frontend (Optional)
cd frontend
python -m http.server 8000
# Visit: http://localhost:8000curl http://localhost:5000/health
# Response: {"status":"ok","message":"Nexus AI Backend is running"}π¦ Local-AI-Web-Navigator/
β
βββ π¨ frontend/
β βββ index.html # Main ChatGPT-style interface
β βββ script.js # Frontend logic & API calls
β βββ styles.css # Modern dark theme styling
β βββ setup.html # Setup wizard page
β βββ _redirects # Netlify routing config
β
βββ βοΈ backend/
β βββ app.py # Flask REST API server
β βββ agent_step3.py # Core AI agent & scoring logic
β βββ web_scraper.py # BeautifulSoup web scraper
β βββ test_mistral_speed.py # Performance testing
β βββ agent_state/ # Saved scrape batches
β
βββ π Starters/
β βββ START_NEXUS_FIXED.bat # One-click full start
β βββ START_BACKEND_FIXED.bat # Backend only
β βββ START_NEXUS_AI.ps1 # PowerShell starter
β βββ start_all_services.py # Python launcher
β
βββ π Documentation/
β βββ DEPLOYMENT_GUIDE.md
β βββ USAGE_GUIDE.md
β βββ PRODUCT_SCRAPER_GUIDE.md
β βββ NVIDIA_GPU_CONFIG.md
β βββ ... (more guides)
β
βββ requirements.txt # Python dependencies
βββ netlify.toml # Deployment config
βββ README.md # You are here! π
The Product Scraper module allows you to extract structured product data from the web with support for multiple view modes.
β
Sortable columns |
β
4-5 images per product |
β
Raw JSON data |
flowchart LR
A[π Search Query] --> B[Flask API]
B --> C[DuckDuckGo]
C --> D[Web Scraper]
D --> E[Batch Processing]
E --> F[JSON Files]
F --> G{View Mode}
G --> H[π Table]
G --> I[πΌοΈ Gallery]
G --> J[π¦ Cards]
style A fill:#001a0d,stroke:#00ff88,color:#00ff88
style F fill:#1a1500,stroke:#ffd700,color:#ffd700
style G fill:#0f0020,stroke:#a855f7,color:#a855f7
style H fill:#001a1a,stroke:#00f5ff,color:#00f5ff
style I fill:#001a1a,stroke:#00f5ff,color:#00f5ff
style J fill:#001a1a,stroke:#00f5ff,color:#00f5ff
// API Call
POST /scrape_products
{
"query": "top 20 laptops under 60000",
"limit": 20,
"batch_size": 5
}
// Response
{
"success": true,
"total_items": 20,
"total_batches": 4,
"batches": [...]
}| Method | Endpoint | Description | Request Body |
|---|---|---|---|
GET |
/health |
Health check | β |
POST |
/ask |
Ask AI question | { "question": "..." } |
POST |
/scrape_products |
Scrape products | { "query": "...", "limit": 20 } |
POST |
/shutdown |
Graceful shutdown | β |
{
"answer": "Your detailed answer here...",
"method": "local | web",
"sources": [
{
"title": "Source Title",
"url": "https://...",
"score": 5000
}
]
}π§ Click to expand Customization Options
// frontend/script.js
const API_URL = 'http://localhost:5000'; // Change if using different port# backend/agent_step3.py
OLLAMA_API = "http://127.0.0.1:11434/api/generate"
MODEL_NAME = "mistral"
channel = "chrome" # or "msedge"
headless = False # True for headless mode# backend/app.py
app.run(host="0.0.0.0", port=5001) # Change port here| Metric | Value |
|---|---|
| β‘ Local LLM Response | 3-5 seconds |
| π Web Search Response | 10-20 seconds |
| πΎ Memory Usage | ~500MB (with browser) |
| π Concurrent Requests | Supported |
| π₯οΈ GPU Acceleration | NVIDIA CUDA (optional) |
xychart-beta
title "Response Time by Query Type (seconds)"
x-axis ["Local LLM", "Web Search", "Product Scraper", "Health Check"]
y-axis "Seconds" 0 --> 25
bar [4, 15, 20, 1]
The intelligent scoring system prioritizes relevant and recent information:
| Priority | Score Boost | Trigger |
|---|---|---|
| βββββ | +5000 | Wikipedia + Historical range (e.g., "2003β2006") |
| ββββ | +3000 | Exact date match (e.g., "Oct 10, 2025") |
| βββ | +1000 | Today / Recent information |
| ββ | +500 | Wikipedia general articles |
| β | 0 | Standard results |
| π« | -200 to -800 | Old / outdated content penalty |
graph LR
Q([Query Input]) --> D{Date Signal?}
D -->|Exact date found| E1[+3000 Boost]
D -->|Today or recent| E2[+1000 Boost]
D -->|Historical range| E3[+5000 Boost]
D -->|Wikipedia match| E4[+500 Boost]
D -->|Old content| E5[-200 to -800]
E1 & E2 & E3 & E4 & E5 --> F[Final Score]
F --> G([Top Ranked Results])
style Q fill:#001a0d,stroke:#00ff88,color:#00ff88
style D fill:#1a1500,stroke:#ffd700,color:#ffd700
style E3 fill:#001a1a,stroke:#00f5ff,color:#00f5ff
style E1 fill:#001a1a,stroke:#00f5ff,color:#00f5ff
style E5 fill:#1a0000,stroke:#ff006e,color:#ff006e
style G fill:#001a0d,stroke:#00ff88,color:#00ff88
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π€οΈ Today's Information β
β β "What's the weather today in Hyderabad?" β
β β
Boosted by +1000 (recent/today priority) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π
Exact Date Query β
β β "What's happening on October 10, 2025?" β
β β
+3000 exact date match priority β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π Historical Range β
β β "What happened between 2003 and 2006?" β
β β
Wikipedia prioritized with +5000 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π§ General Knowledge β
β β "How does photosynthesis work?" β
β β
Mistral answers locally β fast & private β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Click to expand Common Issues and Solutions
# Check if port 5000 is free
netstat -ano | findstr :5000
# Reinstall dependencies
pip install -r requirements.txt
# Start Ollama first
ollama serve// Verify API_URL in frontend/script.js
const API_URL = 'http://localhost:5000';
// Make sure backend window shows:
// "Running on http://localhost:5000"# Install Playwright browsers
playwright install chrome
# Or use Edge β set channel="msedge" in agent_step3.pypython test_setup.pyflowchart LR
A[π΄ Fork Repo] --> B[πΏ Create Branch]
B --> C[π» Make Changes]
C --> D[β
Test]
D --> E[π€ Pull Request]
E --> F[π Merged!]
style A fill:#001a0d,stroke:#00ff88,color:#00ff88
style C fill:#1a1500,stroke:#ffd700,color:#ffd700
style E fill:#001a1a,stroke:#00f5ff,color:#00f5ff
style F fill:#001a0d,stroke:#00ff88,color:#00ff88
- Fork the repository
- Create a feature branch β
git checkout -b feature/amazing-feature - Commit your changes β
git commit -m 'Add amazing feature' - Push to the branch β
git push origin feature/amazing-feature - Open a Pull Request
Copyright Β© 2024 Ashmit Thakur. All rights reserved.
This project β Nexus AI: Local AI Web Navigator β was created by:
Ashmit Thakur
GitHub : https://github.com/AshmitThakur23
Repo : https://github.com/AshmitThakur23/Local-AI-Web-Navigator
Original Creation Date: October 2024
Licensed under the MIT License β see LICENSE file for details.
If you fork, clone, or use any part of this code, you MUST:
1. Give credit to the original author
2. Include this NOTICE
3. Include the LICENSE file
4. Not claim this as your own original work
Violation of these terms may result in DMCA takedown requests.
---



