AI Analytics Agent is a powerful, interactive dashboard built with Streamlit that leverages AI to provide deep insights into business data. It combines traditional analytics (KPIs, forecasting, segmentation) with Generative AI (LLMs) to allow users to ask questions about their data in natural language.
The application features a modern, responsive UI with real-time data simulation, anomaly detection, and predictive modeling.
- π Comprehensive KPI Dashboard: Real-time tracking of Revenue, Growth, and Customer Satisfaction.
- π€ AI-Powered Insights: Integrated Chatbot to answer questions about data trends and forecasts.
- π Predictive Analytics: Time-series forecasting and trend analysis using machine learning.
- π₯ Customer Segmentation: Clustering analysis to identify key customer groups.
- π¨ Anomaly Detection: Automated detection of unusual patterns in data.
- π± Responsive Design: A sleek, glassmorphism-inspired UI that works on all devices.
The following diagram illustrates the high-level architecture of the AI Analytics Agent:
graph TD
User([π€ End User])
subgraph Frontend [π₯οΈ Streamlit Frontend]
UI[User Interface]
Sidebar[Sidebar Controls]
Charts[Plotly Charts]
Chat[Chat Interface]
end
subgraph Core [βοΈ Application Logic]
DataGen[Data Generators]
MLModels[ML & Forecasting]
Anomaly[Anomaly Detection]
State[Session State Mgmt]
end
subgraph AI [π§ AI Layer]
LLMHub[LLM Integration]
PromptEng[Prompt Engineering]
end
User -->|Interacts| UI
UI -->|Triggers| DataGen
UI -->|Displays| Charts
User -->|Asks Questions| Chat
Chat -->|Queries| LLMHub
DataGen -->|Feeds| MLModels
MLModels -->|Results| Charts
DataGen -->|Checks| Anomaly
Anomaly -->|Alerts| UI
- Python 3.8 or higher
- pip (Python package installer)
-
Clone the repository:
git clone https://github.com/yourusername/ai-analytics-agent.git cd ai-analytics-agent -
Install dependencies:
pip install -r requirements.txt
(Note: If
requirements.txtis missing, you can install the main packages directly:pip install streamlit plotly pandas numpy)
To start the dashboard, run the following command in your terminal:
streamlit run app.pyThe application will open in your default web browser at http://localhost:8501.
classDiagram
class App {
+run()
+setup_page()
}
class DataEngine {
+generate_kpis()
+generate_forecast()
}
class Views {
+render_dashboard()
+render_sidebar()
}
App --> Views : Renders
App --> DataEngine : Uses