Skip to content

fenil67/AutoAnalyst-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoAnalyst AI 📊

Status Stack

AutoAnalyst is an autonomous Business Intelligence agent capable of ingesting raw datasets (CSV, Excel), performing Python-based statistical analysis in a sandboxed environment, and generating boardroom-ready reports with strategic insights and visualizations.

It features a secure SaaS architecture with Google Authentication, user history persistence, and programmatic PDF export capabilities.

🚀 Key Features

  • Generative BI: Transforms raw data into "McKinsey-style" executive summaries, KPI tables, and deep-dive analysis.
  • Autonomous Coding: Uses a LangChain agent running in a secure E2B Sandbox to write and execute Python code for data visualization (Line, Bar, Donut charts).
  • Multi-File Logic: Intelligently handles multiple datasets, detecting overlapping dates or analyzing distinct files separately.
  • Professional UI: Glassmorphism-inspired React dashboard with Markdown rendering, interactive charts, and drag-and-drop file staging.
  • Secure Infrastructure:
    • Auth: Google OAuth2 + JWT Session management.
    • Database: MongoDB (Motor/AsyncIO) for storing chat history and analysis results per user.
    • Export: Client-side programmatic PDF generation (jsPDF) for high-fidelity reports.

🛠 Tech Stack

Frontend

  • Framework: React (Vite)
  • Styling: Tailwind CSS + Lucide Icons
  • State: Axios + React Hooks
  • Visualization: Custom Markdown Components (remark-gfm) + Base64 Image Rendering

Backend (The Brain)

  • API: FastAPI (Python)
  • AI Orchestration: LangChain (Graph Workflow)
  • Code Execution: E2B Code Interpreter (Sandboxed Python Environment)
  • Database: MongoDB Atlas
  • Security: OAuth2, BCrypt, JWT

📸 Screenshots

Dashboard

Chatbot

Login page

Signup page

🏗️ Architecture

  1. User Upload: Files are sent to the FastAPI backend.
  2. Agent Reasoning: The LLM (Gemini/OpenAI) plans a "Visualization Strategy" (e.g., Top 5 Rule).
  3. Sandboxed Execution: Python code is generated and executed inside an E2B Sandbox to ensure security and prevent hallucinations.
  4. Response Construction: The agent returns a structured Markdown report + Base64 encoded images.
  5. Rendering: The React frontend parses the Markdown into UI cards and renders the charts.

⚡️ Getting Started

Prerequisites

  • Node.js & npm
  • Python 3.10+
  • MongoDB Atlas URI
  • Google Cloud Console Credentials

1. Backend Setup

cd backend
python -m venv venv
source venv/bin/activate  # or venv\Scripts\activate on Windows
pip install -r requirements.txt

# Create a .env file with:
# MONGO_URL=...
# GOOGLE_CLIENT_ID=...
# SECRET_KEY=...
# E2B_API_KEY=...
# GOOGLE_API_KEY=...

python main.py

About

🤖 An autonomous Business Intelligence agent that prevents hallucinations by writing and executing secure Python code (E2B Sandbox). Features a FastAPI/React full-stack architecture, programmatic PDF reporting ("McKinsey-style"), and OAuth2 authentication. Stack: Python, LangChain, E2B, React, MongoDB.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages