- 📍 Live Demo
- 📖 Overview
- 🖼️ System Architecture
- 🛠️ Tech Stack
- 🚀 Key Features
- 🖥️ UI Walkthrough
- ⚙️ Installation
- ☁️ Deployment
- 📄 License
- 📞 Contact
🚀 Try it now:
-
Streamlit Profile -[Link]
-
🌟 Project Demo Try the Live Application Here: Agentic BI SaaS Platform
-
Note: The live demo is hosted on Streamlit Cloud. It provides a full read-only experience of the platform, allowing you to ask queries and visualize data instantly.
-
UI Walkthrough
Agentic BI SaaS is a next-generation Business Intelligence platform that replaces static dashboards with conversational analytics. Instead of manually filtering charts, users ask questions in plain English (e.g., "Show me the revenue trend for the East region in Feb 2026"), and a swarm of AI Agents collaborates to generate real-time SQL queries, execute them securely, and visualize the results.
Built for Enterprise Scalability, this project features a Service-Oriented Architecture (SOA) with a decoupled React-like UI (Streamlit) and a robust API Backend (FastAPI + LangGraph).
This project leverages a Multi-Agent Swarm Architecture orchestrated by LangGraph. Each agent specializes in a distinct cognitive task, ensuring high accuracy and resilience.
- � Metadata Agent: Analysis user intent & schema mapping (Context-Aware).
- 🕸️ RAG Agent: Retrieves certified business definitions from Vector DB.
- 📝 SQL Agent: Generates dialect-specific SQL (SQLite/PostgreSQL) with 99% syntax accuracy.
- 🛡️ Impact Agent: Governance layer; predicts query cost & blocks destructive operations (DROP/DELETE).
- ⚙️ Execute Agent: Runs verified SQL in a sandboxed environment.
- 📊 BI Agent: synthesizes results into JSON configs for Front-end rendering.
| Component | Technology | Description |
|---|---|---|
| Frontend | Streamlit | Interactive UI with Tabs, Real-time Logs, and Plotly Charts. |
| Backend | FastAPI | High-performance Async REST API for Agent communication. |
| Orchestration | LangGraph | Stateful workflow management / Cyclic Graph for Agents. |
| LLM Framework | LangChain | Prompt engineering & Tool abstractions. |
| AI Models | Groq (Llama 3) | Ultra-fast inference for real-time SQL generation. |
| Memory | Mem0 (mem0ai) | Long-term user preference & session storage. |
| Database | SQLite / SQLAlchemy and FAISS , VectorDB | Relational data storage with ORM. |
| Task Scheduling | APScheduler | Background jobs and reporting. |
| Visualization | Plotly Express | Dynamic, interactive data visualizations. |
How businesses interact with data.Instead of navigating complex dashboards, users simply ask questions in natural language and AI swarm does the rest.
Traditional BI tools require SQL expertise,static dashboard configurations, and constant IT dependency.Business users waste hours waiting for reports that could be answered instantly.
I built an Enterprise-Grade Agentic BI Platform using cutting-edge AI orchestration. Here's how it works:
🧠 6-Agent Cognitive Swarm (LangGraph Orchestrated):
- Metadata Agent → Analyzes user intent & schema mapping
- RAG Agent → Retrieves certified business definitions from Vector DB
- SQL Agent → Generates production-ready SQL queries (99% accuracy)
- Impact Agent → Governance layer; blocks unsafe queries & PII exposure
- Execute Agent → Sandboxed SQL execution
- BI Agent → Synthesizes results into intelligent visualizations
AI/ML & NLP Layer:
- LangGraph (Multi-Agent Orchestration)
- LangChain (Prompt Engineering Framework)
- Groq (Llama 3.3 - 70B) for ultra-fast inference
- HuggingFace (Text embeddings & transformer models)
- FuzzyWuzzy (NLP fuzzy string matching for typo-tolerant queries)
- Mem0 (Long-term AI memory for user preferences)
Vector & Retrieval:
- FAISS (Facebook AI Similarity Search - Vector DB)
- RAG Pipeline (Retrieval Augmented Generation)
- MCP (Model Context Protocol for agent-tool communication)
Backend:
- FastAPI (Async REST API)
- SQLAlchemy + SQLite/PostgreSQL
- APScheduler (Background task management)
Frontend:
- Streamlit/Next.js (Interactive UI with Real-time Agent Logs)
- Plotly (Dynamic, responsive visualizations)
DevOps:
- Docker-ready containers
- CI/CD pipeline (GitHub Actions)
- Self-Healing Pipeline:Auto-corrects SQL errors using reflexion loops
- Typo-Resilient:FuzzyWuzzy NLP handles misspelled queries intelligently
- Semantic Search:FAISS-powered vector similarity for context retrieval
- Governance:Built-in RBAC & PII detection
- Memory:Learns user preferences across sessions
- Scalability:SaaS & On-Prem deployment ready
Type complex business questions like "Compare marketing ROI vs Sales for Top 5 products" and get instant charts. No SQL knowledge required.
The system uses LangGraph to implement Reflexion. If an agent generates invalid SQL, the Execute Agent feeds the error back to the SQL Agent for auto-correction.
Built-in Impact Agent ensures security. It calculates "Query Cost" and blocks unauthorized access to sensitive PII columns or tables.
Powered by mem0, the system "remembers" your preferred region, currency, and chart types across sessions.
A dedicated "System Logs" tab provides transparency. Watch the "Thought Process" of every agent in real-time (e.g., Metadata Agent identified 'Sales' table, Impact Agent approved query).
The main workspace.
- Chat Interface: Ask questions.
- Dynamic Dashboard: Charts (Bar, Line, Pie) render automatically based on data type.
- Reasoning Engine: View the "Why" behind the answer (Show SQL & Thinking).
- Project Vision & Mission : Agentic BI SaaS is an enterprise-grade Business Intelligence platform powered by Agentic AI. Users can ask business questions in plain English, and the system intelligently converts them into trusted, governed, explainable insights.
- To democratize data access within enterprises, reducing the dependency on data analyst teams for routine reporting.
- 🚀 AI Analyst , 🧠 Long-Term Memory ,🔐 Enterprise Gov
- In simple words: This system replaces manual BI dashboards with an AI analyst that remembers, learns, and scales securely.
Detailed documentation of the libraries used.
- Interactive badges for every tool.
- Explanation of RAG (Retrieval Augmented Generation) implementation.
- 📐 Design & Architecture Specification : Comprehensive documentation covering Software Requirements (SRS), High-Level Design (HLD), and Low-Level Design (LLD).
- 📝 1. Software Requirements Specification (SRS) -m🏗️ 2. High Level Design (HLD)
- ⚙️ 3. Low Level Design (LLD)
- High-Level Design (HLD) & Low-Level Design (LLD).
- Interactive Graphviz flowcharts showing data movement between Frontend -> API -> Database.
- Live Event Feed: See backend logs in the frontend.
- Filters: Filter by
Error,Success, or specificAgent. - Export: Download logs as
CSVorTXTfor auditing.
- Python 3.10+
- Git
git clone https://github.com/Ratnesh-181998/agentic-bi-natural-language-querying.git
cd agentic-bi-natural-language-querying/agentic-bi-saaspip install -r requirements.txtCreate a .env file in the root directory:
GROQ_API_KEY="your_groq_api_key"
OPENAI_API_KEY="optional_if_using_openai"
SIMULATION_MODE=FalsePopulate the SQLite database with synthetic enterprise data (Sales, CRM, Inventory):
python seed_db.pyThe app requires both the Backend (FastAPI) and Frontend (Streamlit) to run.
Terminal 1 (Backend):
uvicorn app.main:app --port 8000 --reloadTerminal 2 (Frontend):
streamlit run ui/presentation_app.pyAccess the app at
http://localhost:8501
- Fork this repo to your GitHub.
- Login to share.streamlit.io.
- "New App" -> Select Repository.
- Main File Path:
agentic-bi-saas/ui/presentation_app.py. - Advanced Settings (Secrets): Paste your
.envcontents here. - Deploy! 🚀
The project is container-ready.
Dockerfile:
FROM python:3.11-slim
WORKDIR /app
COPY . .
RUN pip install -r requirements.txt
EXPOSE 8501 8000
CMD sh -c "uvicorn app.main:app --host 0.0.0.0 --port 8000 & streamlit run ui/presentation_app.py --server.port 8501"Build & Run:
docker build -t agentic-bi .
docker run -p 8501:8501 -p 8000:8000 --env-file .env agentic-biAutomate testing and deployment to AWS/GCP.
.github/workflows/deploy.yml
name: Deploy to Cloud
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
lfs: true # Important for Large Files
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Dependencies
run: |
pip install -r agentic-bi-saas/requirements.txt
- name: Run Tests
run: |
cd agentic-bi-saas
python -m pytest tests_scripts/Distributed under the Apache 2.0 License. See LICENSE for more information.

