Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DataScout Enterprise Platform

AI-Powered Multi-Agent Data Analysis Platform
Version 1.0.0 | Production Ready

License: MIT Python 3.11+ Next.js 14 FastAPI

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.


🌟 Key Features

πŸ€– Multi-Agent Orchestration

  • 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

πŸ“Š Dynamic Data Visualization

  • 4 Chart Types: Bar, Line, Pie, Area
  • Automatic Chart Selection: LLM-powered analysis
  • Interactive Recharts: Real-time data rendering

πŸ” Enterprise Features

  • Real-time Analytics Dashboard
  • Query History & Audit Logging
  • User Settings Persistence
  • Background PDF Processing
  • Custom Agent Creation

πŸ—οΈ Project Repositories

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

View Backend Repository β†’

Next.js 14 TypeScript frontend

  • Real-time chat interface
  • Analytics dashboard
  • Dynamic visualizations

View Frontend Repository β†’


πŸš€ Quick Start

Prerequisites

  • Python 3.11+
  • Node.js 18+
  • OpenAI API Key
  • Pinecone API Key

Installation

# 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 dev

Access: http://localhost:3000


πŸ“ Project Structure

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

πŸ”§ Configuration

Backend Environment Variables

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-enterprise

Frontend Environment Variables

Create frontend/.env.local:

NEXT_PUBLIC_API_URL=http://localhost:8000

πŸ“š API Endpoints

Core Endpoints

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.


πŸ—οΈ Architecture

Agent Workflow

User Query β†’ Supervisor Agent
    β”œβ”€β†’ SQL Agent β†’ Visualizer β†’ Chart Response
    β”œβ”€β†’ RAG Agent β†’ Text Response
    └─→ Clarify β†’ Clarification Request

Technology Stack

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

πŸ§ͺ Testing

# Run backend tests
cd backend
python -m pytest tests/ -v

# Run specific test
python tests/test_supervisor.py

Test Coverage: 70%
Test Files: 8 comprehensive test suites


πŸ“– Documentation


πŸ”’ Security

  • βœ… Environment variable validation
  • βœ… SQL injection prevention (parameterized queries)
  • βœ… Table-level access control
  • βœ… Audit logging for all queries
  • βœ… API key rotation support

🚒 Deployment

Backend

  • Google Cloud Run
  • Railway
  • Render

Frontend

  • Vercel (recommended for Next.js)
  • Netlify
  • AWS Amplify

See individual repository READMEs for deployment guides.


πŸ“ Release Notes

Version 1.0.0 (January 2026)

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.


🀝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.


πŸ“„ License

This project is licensed under the MIT License - see LICENSE file.


πŸ™ Acknowledgments

  • OpenAI for GPT-4o
  • Pinecone for vector database
  • LangChain community
  • Next.js team

πŸ“§ Contact


About

AI-Powered Multi-Agent Data Analysis Platform. Portfolio project showcasing FastAPI backend with LangGraph + Next.js 14 frontend. Full-stack microservices architecture.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages