QuantaOrion-Agent is a next-generation, multimodal AI platform engineered to transcend the boundaries of traditional conversational agents. Harnessing the power of Retrieval-Augmented Generation (RAG), advanced web search, and dynamic document analysis, QuantaOrion-Agent orchestrates a seamless fusion of real-time web intelligence, contextual document retrieval, and deep conversational memory.
At its core, QuantaOrion-Agent leverages a sophisticated pipeline that unifies web-scale search APIs, state-of-the-art embedding models, and large language models (LLMs) to deliver contextually aware, evidence-backed responses. Whether synthesizing insights from the latest web content, extracting knowledge from user-uploaded documents, or maintaining coherent multi-turn dialogues, QuantaOrion-Agent adapts fluidly to the user’s intent—empowering research, decision-making, and discovery.
QuantaOrion-Agent is not just an assistant—it is a stellar nexus of knowledge, designed to illuminate, synthesize, and guide users through the ever-expanding universe of information.
- Multi-format Support: Upload documents (PDF, DOCX, TXT, MD)
- Instant Summarization: Receive AI-generated summaries upon upload
- Contextual Q&A: Ask questions based on uploaded content
- Smart Extraction: Advanced text processing and chunking
When you ask a question after uploading a document:
- 🎯 Document Context: Locates relevant snippets in your uploaded documents
- 🌐 Real-time Web Search: Performs live web search for current information
- 🧠 Intelligent Synthesis: Returns a comprehensive 3-part response:
- 🔗 Relevant web links with summaries
- 📄 Matching document excerpts
- 💡 AI-generated answer combining both sources
- URL Analysis: Paste any URL for instant content summarization
- Structured Output: Clear, organized summaries with key points
- Content Extraction: Smart parsing of web content
- Enhanced Capabilities: Outperforms standard chatbots in real-world scenarios
- Real-time Information: Access to current events, people, and concepts
- Context Awareness: Maintains conversation flow and memory
- Multi-source Responses: Combines web search with AI reasoning
- Conversation Storage: All chats saved in Supabase database
- Thread Management: Create and continue multiple conversation threads
- Document Persistence: Uploaded documents remain accessible across sessions
- Search History: Track and revisit previous queries
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | Next.js 14 (React) | Modern, responsive UI with server-side rendering |
| Backend | Flask (Python) | High-performance async API with CORS support |
| Database | Supabase (PostgreSQL) | Real-time database with built-in auth |
| AI Engine | OpenAI GPT-4 / Google Gemini | Advanced language model integration |
| Web Search | Serper API / NewsAPI | Real-time web search capabilities |
| Vector Store | FAISS / Sentence Transformers | Efficient document embedding storage |
| Deployment | Vercel + Cloud Platforms | Scalable, global deployment |
- Python 3.8+
- Node.js 18+
- npm or yarn
- Git
git clone https://github.com/Likhith623/advanced-rag-agent.git
cd advanced-rag-agent# Create virtual environment
python -m venv venv
# Activate virtual environment
# On macOS/Linux:
source venv/bin/activate
# On Windows:
venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Create environment file
cp .env.example .env
# Edit .env with your API keys (see Environment Variables section)
# Start the backend server
python main.py# Navigate to frontend directory (new terminal)
cd front_end
# Install dependencies
npm install
# or
yarn install
# Create environment file
cp .env.local.example .env.local
# Edit .env.local with your configuration
# Start the development server
npm run dev
# or
yarn dev- Frontend: http://localhost:3000
- Backend API: http://localhost:8080
- Health Check: http://localhost:8080/health
# Database
SUPABASE_URL=your_supabase_project_url
SUPABASE_KEY=your_supabase_anon_key
# AI APIs
OPENAI_API_KEY=your_openai_api_key
GEMINI_API_KEY=your_google_gemini_key
# Web Search
SERPER_API_KEY=your_serper_api_key
NEWS_API_KEY=your_newsapi_key
# Application
DEBUG=true
LOG_LEVEL=info
PORT=8080# API Configuration
NEXT_PUBLIC_API_URL=http://localhost:8080
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
# Application
NEXT_PUBLIC_APP_NAME=Advanced RAG Agent
NEXT_PUBLIC_APP_VERSION=1.0.0Click to expand API key setup instructions
Supabase
- Go to supabase.com
- Create a new project
- Copy URL and anon key from Settings > API
OpenAI
- Visit platform.openai.com
- Create account and add billing
- Generate API key in API Keys section
Google Gemini
- Go to ai.google.dev
- Get API key for Gemini Pro
Serper (Web Search)
- Visit serper.dev
- Sign up for free tier
- Copy API key from dashboard
NewsAPI
- Go to newsapi.org
- Register for free account
- Get your API key
advanced-rag-agent/
├── 📁 front_end/ # Next.js frontend
│ ├── 📁 app/ # App Router (Next.js 13+)
│ │ ├── 📄 layout.js # Root layout
│ │ ├── 📄 page.js # Main chat interface
│ │ └── 📄 globals.css # Global styles
│ ├── 📁 components/ # React components
│ ├── 📁 lib/ # Utility libraries
│ ├── 📄 package.json # Node dependencies
│ ├── 📄 next.config.mjs # Next.js configuration
│ └── 📄 .env.local.example # Environment template
├── 📄 main.py # Flask backend entry point
├── 📄 requirements.txt # Python dependencies
├── 📁 uploads/ # File upload directory
├── 📄 comprehensive_news_knowledge.txt # Knowledge base
├── 📄 .env.example # Environment template
├── 📄 .gitignore # Git ignore rules
├── 📄 README.md # This file
└── 📄 LICENSE # MIT License
# 1. Upload a research paper
POST /upload
- file: research_paper.pdf
- conversation_id: conv_123
# 2. Ask questions about the document
POST /api/news
{
"query": "What are the main findings in this research?",
"user_email": "user@example.com",
"conversation_id": "conv_123"
}
# Response includes:
# - Document context from uploaded PDF
# - Related web search results
# - AI-synthesized answerPOST /api/news
{
"query": "latest developments in quantum computing",
"user_email": "user@example.com"
}POST /api/news
{
"query": "https://example.com/article",
"user_email": "user@example.com"
}# Install Vercel CLI
npm install -g vercel
# Deploy frontend
cd front_end
vercel --prod
# Set environment variables in Vercel dashboard# For Railway
railway login
railway init
railway up
# For Render
# Connect your GitHub repo and deploy
# For Google Cloud Run
gcloud run deploy advanced-rag-agent \
--source . \
--platform managed \
--region us-central1 \
--allow-unauthenticated# Dockerfile for backend
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
EXPOSE 8080
CMD ["python", "main.py"]curl http://localhost:8080/healthcd front_end
npm run test # Run unit tests
npm run build # Production build
npm run lint # Code linting- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Python: Follow PEP 8, use Black formatter
- JavaScript: Follow ESLint rules, use Prettier
- Commits: Use conventional commit messages
Common Issues and Solutions
Backend won't start
# Check Python version
python --version # Should be 3.8+
# Reinstall dependencies
pip install -r requirements.txt --force-reinstall
# Check environment variables
cat .envFrontend build errors
# Clear cache and reinstall
rm -rf node_modules package-lock.json
npm install
# Check Node version
node --version # Should be 18+Database connection issues
- Verify Supabase URL and key
- Check network connectivity
- Ensure database is not paused
File upload issues
- Check file size limits
- Verify supported file formats
- Ensure uploads/ directory exists
Likhith Vasireddy
- GitHub: @Likhith623
⭐ Star this repository if you find it helpful!