AI-powered multi-engine search system with intelligent result synthesis
Project description
Nexus AI Search Engine ๐
A powerful AI-powered multi-engine search system that orchestrates parallel searches across 5 different search engines with intelligent result synthesis using AI.
โจ Features
-
๐ Multi-Engine Search - Searches across 5 different engines simultaneously:
- ๐ฆ DuckDuckGo
- ๐ Google
- ๐ SearXNG
- ๐ Wikipedia
- ๐ท๏ธ Wikidata
-
๐ค AI-Powered Query Breakdown - Analyzes user queries and generates focused sub-queries
-
๐ก Intelligent Result Synthesis - Combines and ranks results across all engines
-
โก Real-time WebSocket Support - Live streaming of results
-
๐จ Modern UI - Beautiful, futuristic dark theme interface
-
๐ No API Keys Required - All search engines work for free
-
๐ Fast & Async - Built with FastAPI for high performance
๐ System Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Frontend (HTML/CSS/JS) โ
โ Beautiful UI with Real-time Updates โ
โโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ WebSocket
โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ FastAPI Backend Server โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Query Processor (Intent Detection) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Search Orchestrator (Parallel) โ โ
โ โ โโ DuckDuckGo Engine โ โ
โ โ โโ Google Engine โ โ
โ โ โโ SearXNG Engine โ โ
โ โ โโ Wikipedia Engine โ โ
โ โ โโ Wikidata Engine โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Result Synthesizer (AI Ranking) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Quick Start
Prerequisites
- Python 3.8+
- pip or conda
- Modern web browser
Installation
Option 1: Automated Setup (Recommended)
# Windows
python start_app.py
# Linux/Mac
python3 start_app.py
This will automatically start both backend and frontend servers.
Option 2: Manual Setup
Backend Setup:
# Navigate to backend directory
cd backend
# Create virtual environment
python -m venv venv
# Activate virtual environment
# On Windows:
.\venv\Scripts\Activate
# On Linux/Mac:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Start the backend
python main.py
Backend runs on: http://localhost:8000
Frontend Setup (in a new terminal):
# Navigate to frontend directory
cd frontend
# Start HTTP server
python -m http.server 3000
Frontend runs on: http://localhost:3000
3. Open in Browser
Navigate to: http://localhost:3000
โ๏ธ Configuration
Environment Variables
Copy .env.example to .env and configure as needed:
# Backend Configuration
SEARXNG_INSTANCE=https://searx.work
OLLAMA_HOST=http://localhost:11434
OLLAMA_MODEL=llama3
# Server Settings
BACKEND_PORT=8000
FRONTEND_URL=http://localhost:3000
# Search Settings
SEARCH_TIMEOUT=15
MAX_RESULTS_PER_ENGINE=10
Search Engines - All FREE!
All 5 search engines work without any API keys or authentication:
- SearXNG - Metasearch (246+ engines)
- DuckDuckGo - Privacy-focused
- Qwant - European privacy search
- Wikipedia - Knowledge base
- Wikidata - Structured data
No configuration needed! All engines are free forever with no rate limits.
Optional: Ollama LLM Integration
For enhanced AI query breakdown and synthesis:
- Install Ollama: https://ollama.ai
- Pull a model:
ollama pull llama3.2 - Make sure Ollama is running (it will auto-start)
The system will automatically detect and use Ollama if available.
๐ Usage Guide
Search Examples
Try these queries to see the AI in action:
- Simple factual: "What is quantum computing?"
- Complex analysis: "Latest breakthroughs in fusion energy and their implications"
- Technical: "How does neural network backpropagation work?"
- Current events: "Climate change solutions 2026"
Key Features
โ
5 FREE Search Engines - SearXNG, DuckDuckGo, Qwant, Wikipedia, Wikidata
โ
AI Query Breakdown - Automatically generates focused sub-queries
โ
Parallel Search - All engines search simultaneously
โ
Intelligent Synthesis - Deduplicates and ranks results by relevance
โ
Real-time Updates - Live progress for each engine
โ
Beautiful UI - Modern, responsive dark theme interface
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Ctrl/Cmd + K |
Focus search input |
Enter |
Search |
Escape |
Clear search and reset UI |
๐๏ธ Project Structure
Ai_search/
โโโ backend/
โ โโโ __init__.py
โ โโโ main.py # FastAPI application
โ โโโ config.py # Configuration management
โ โโโ query_processor.py # AI query breakdown
โ โโโ search_orchestrator.py # Parallel search coordination
โ โโโ result_synthesizer.py # AI result ranking
โ โโโ engines/
โ โ โโโ brave.py
โ โ โโโ duckduckgo.py
โ โ โโโ google.py
โ โ โโโ qwant.py
โ โ โโโ searxng.py
โ โ โโโ wikipedia.py
โ โ โโโ wikidata.py
โ โโโ requirements.txt
โโโ frontend/
โ โโโ index.html # Main HTML
โ โโโ styles.css # Beautiful UI styling
โ โโโ script.js # Frontend logic
โ โโโ hologram.js # Visualization effects
โโโ start_app.py # One-command startup
โโโ README.md # This file
โโโ .env.example # Configuration template
๐ง Development
Backend Structure
- main.py - FastAPI server with WebSocket support
- query_processor.py - Analyzes queries and generates sub-queries
- search_orchestrator.py - Manages parallel searches across all engines
- result_synthesizer.py - Ranks and deduplicates results
- config.py - Centralized configuration
Frontend Structure
- index.html - Semantic HTML structure
- styles.css - CSS variables and responsive design
- script.js - Main frontend logic
- hologram.js - Real-time visualization
API Endpoints
POST /search - Execute a search
GET /health - Health check
WS /ws/search - WebSocket for live results
๐ Performance
- Concurrent Searches: All 5 engines search in parallel
- Average Response Time: 3-8 seconds (depending on query complexity)
- Result Deduplication: Automatic removal of duplicate results
- Smart Ranking: Results ranked by relevance, authority, and consensus
๐ฆ Dependencies
Backend
- FastAPI - Modern web framework
- Uvicorn - ASGI server
- HTTPX - HTTP client
- Aiohttp - Async HTTP requests
- BeautifulSoup4 - HTML parsing
- SPARQLWrapper - Wikidata queries
- DuckDuckGo Search - DuckDuckGo API
Frontend
- Vanilla HTML/CSS/JavaScript (no build tools needed!)
- CSS Grid & Flexbox for responsive design
- WebSocket API for real-time updates
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
To contribute:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
๐ License
This project is open-source and available under the MIT License - see the LICENSE file for details.
๐ Troubleshooting
Backend won't start
# Check if port 8000 is in use
netstat -tulpn | grep 8000
# Kill process on port 8000 and try again
Frontend can't connect to backend
- Ensure backend is running on http://localhost:8000
- Check browser console (F12) for CORS errors
- Verify both services are running
Slow search results
- Check internet connection
- SearXNG instance might be overloaded, try another instance
- Increase SEARCH_TIMEOUT in .env
๐ง Support
For issues, questions, or suggestions, please open an issue on GitHub.
๐ Star History
If you find this project useful, please consider giving it a star! โญ
Built with โค๏ธ by Davood
Troubleshooting
Backend won't start
Error: Module not found
# Make sure virtual environment is activated
.\venv\Scripts\Activate
# Reinstall dependencies
pip install -r requirements.txt
No results from SearXNG or Qwant
Issue: Public SearXNG instances may be slow or rate-limited
Solution: Try a different SearXNG instance in .env:
SEARXNG_INSTANCE=https://searx.fmac.xyz
# or
SEARXNG_INSTANCE=https://searx.tiekoetter.com
Qwant Issue: If Qwant API changes, other engines still provide results
WebSocket connection failed
Issue: Frontend can't connect to backend
Check:
- Backend is running on port 8000
- No firewall blocking localhost connections
- Browser console for specific errors (F12)
Results are slow
Normal: First search takes 5-8 seconds (5 engines in parallel) If very slow: Some engines may be timing out, check backend console logs
API Documentation
Backend API docs: http://localhost:8000/docs (Swagger UI)
Endpoints
GET /- API infoGET /health- Health checkPOST /search- Execute search (REST)WS /ws/process- Real-time search updates (WebSocket)
System Requirements
- Python: 3.8+
- Browser: Modern browser with WebSocket support
- RAM: 500MB minimum
- Internet: Required for search engines
Next Steps
Enhancements You Can Add
- User Authentication: Track search history
- Search History: Save and revisit past searches
- Export Results: Download as PDF or JSON
- Filter by Source: Checkbox to include/exclude engines
- Advanced Settings: Timeout, max results per engine
- Dark/Light Mode: Theme switcher
- Voice Search: Web Speech API integration
Credits
Search Engines Used (All 100% Free):
- SearXNG (Privacy-focused metasearch - 246+ engines)
- DuckDuckGo (Privacy-first search)
- Qwant (European privacy search)
- Wikipedia (Knowledge base)
- Wikidata (Structured data)
Built with: FastAPI, Vanilla JavaScript, Canvas API, WebSockets
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nexus_ai_search-1.0.0.tar.gz.
File metadata
- Download URL: nexus_ai_search-1.0.0.tar.gz
- Upload date:
- Size: 22.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c4f4cc35c87f907b9d4d0807814a8f56f1e196610c740854285402c04458769
|
|
| MD5 |
fc8c9cfd7f4dad7e065121214aee9540
|
|
| BLAKE2b-256 |
d06170df281b70c20637452482ce36ae7814f7d845a8a45752bd95ad1d54ff78
|
File details
Details for the file nexus_ai_search-1.0.0-py3-none-any.whl.
File metadata
- Download URL: nexus_ai_search-1.0.0-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9099d851a3d615ae621415705e507282860ff01225a1583c2e6f36d78257174b
|
|
| MD5 |
d4773569f25f69007399803c1b42a834
|
|
| BLAKE2b-256 |
626044bdb7f5f08f79ab15243fde8ed87fcbbe211e614b7934e6343eb92a0272
|