AI-Powered Multi-Agent Data Analysis Platform
Version 1.0.0 | Production Ready
DataScout is an enterprise-grade AI platform that combines multiple specialized agents to provide intelligent data analysis, natural language SQL querying, document search, and dynamic visualization capabilities.
- Supervisor Agent: LangGraph-powered intelligent routing with GPT-4o
- SQL Agent: Natural language to SQL with audit logging
- RAG Agent: PDF document search with Pinecone vector database
- Visualizer Agent: Automatic chart generation from data
- 4 Chart Types: Bar, Line, Pie, Area
- Automatic Chart Selection: LLM-powered analysis
- Interactive Recharts: Real-time data rendering
- Real-time Analytics Dashboard
- Query History & Audit Logging
- User Settings Persistence
- Background PDF Processing
- Custom Agent Creation
This project consists of two independent microservices:
FastAPI backend with LangGraph multi-agent system
- Supervisor, SQL, RAG, and Visualizer agents
- 15 API endpoints
- Pinecone vector database integration
Next.js 14 TypeScript frontend
- Real-time chat interface
- Analytics dashboard
- Dynamic visualizations
- Python 3.11+
- Node.js 18+
- OpenAI API Key
- Pinecone API Key
# Backend setup
git clone https://github.com/MBilalKhanAI/DataScout-backend.git
cd DataScout-backend
python -m venv venv && venv\\Scripts\\activate
pip install -r requirements.txt
cp .env.example .env # Add your API keys
python init_db.py
uvicorn main:app --reload
# Frontend setup (new terminal)
git clone https://github.com/MBilalKhanAI/DataScout-frontend.git
cd DataScout-frontend
npm install
cp .env.example .env.local
npm run devAccess: http://localhost:3000
DataScout/
βββ backend/ # FastAPI Backend
β βββ agents/ # AI Agent Implementations
β β βββ supervisor.py # LangGraph Orchestrator
β β βββ rag_agent.py # Document Search
β β βββ sql_agent.py # SQL Query Agent
β β βββ visualizer_agent.py # Chart Generator
β βββ services/ # Business Logic
β β βββ ingestion.py # PDF Processing
β βββ tests/ # Test Suite
β βββ main.py # FastAPI Application
β βββ requirements.txt # Python Dependencies
β
βββ frontend/ # Next.js Frontend
βββ src/
β βββ app/ # Pages & Routes
β βββ components/ # React Components
β βββ lib/ # Utilities & API
βββ package.json # Node Dependencies
Create backend/.env:
# OpenAI Configuration
OPENAI_API_KEY=sk-proj-...
# Pinecone Configuration
PINECONE_API_KEY=pcsk_...
PINECONE_INDEX_NAME=datascout
PINECONE_HOST=https://datascout-xxxxx.svc.aped-4627-b74a.pinecone.io
# Optional: LangSmith Tracing
LANGCHAIN_TRACING_V2=true
LANGCHAIN_API_KEY=lsv2_pt_...
LANGCHAIN_PROJECT=datascout-enterpriseCreate frontend/.env.local:
NEXT_PUBLIC_API_URL=http://localhost:8000| Endpoint | Method | Description |
|---|---|---|
/chat |
POST | Main chat interface |
/api/analytics/summary |
GET | Real-time metrics |
/api/history |
GET | Query history |
/api/settings |
GET/POST | User preferences |
/api/documents/upload |
POST | PDF upload & ingestion |
See individual repositories for complete API documentation.
User Query β Supervisor Agent
βββ SQL Agent β Visualizer β Chart Response
βββ RAG Agent β Text Response
βββ Clarify β Clarification Request
Backend:
- FastAPI - Modern Python web framework
- LangChain - LLM application framework
- LangGraph - Agent orchestration
- Pinecone - Vector database
- SQLite - Local database
Frontend:
- Next.js 14 - React framework
- TypeScript - Type safety
- Tailwind CSS - Styling
- Recharts - Data visualization
- Framer Motion - Animations
# Run backend tests
cd backend
python -m pytest tests/ -v
# Run specific test
python tests/test_supervisor.pyTest Coverage: 70%
Test Files: 8 comprehensive test suites
- β Environment variable validation
- β SQL injection prevention (parameterized queries)
- β Table-level access control
- β Audit logging for all queries
- β API key rotation support
- Google Cloud Run
- Railway
- Render
- Vercel (recommended for Next.js)
- Netlify
- AWS Amplify
See individual repository READMEs for deployment guides.
New Features:
- β Multi-agent orchestration with LangGraph
- β Dynamic chart generation
- β Real-time analytics dashboard
- β Query history and audit logging
- β Settings persistence
See RELEASE_NOTES.md for complete details.
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License - see LICENSE file.
- OpenAI for GPT-4o
- Pinecone for vector database
- LangChain community
- Next.js team
- Email: khan.muhammadbilal654@gmail.com
- LinkedIn: Muhammad Bilal Khan