An Agentic AI Data Analysis System for Reliable Analytical Workflows
Analyze CSV datasets using natural language through a stateful LangGraph workflow that combines LLM reasoning, deterministic execution, safe validation, and interactive visualizations.
Generate grounded analytical insights with validated SQL, Python execution, and persistent conversational memory.
The following screenshots demonstrate the complete workflowβfrom dataset upload and conversational analysis to validated results, interactive visualizations, generated SQL, and execution analytics.
Upload a CSV dataset to start a new analysis session. The agent automatically profiles the dataset, identifies its schema, and prepares it for downstream analytical tasks.
The primary workspace where users ask analytical questions in natural language. The agent plans the workflow, generates SQL or Python when required, validates execution, and presents grounded analytical results in real time.
A complete analytical report including:
- Executive Summary
- Query Results
- Interactive Visualization
- Statistical Insights
The agent maintains conversation state using LangGraph checkpointing, allowing follow-up questions without re-uploading the dataset.
Example:
"Show the top 3"
The system automatically understands the previous analytical context.
Every analytical result is fully transparent.
The agent exposes:
- Generated SQL
- LLM reasoning
- Execution plan
- Runtime metadata
allowing users to inspect exactly how every answer was produced.
The built-in analytics dashboard tracks system performance, execution latency, retry rates, recovery statistics, and historical execution metrics for monitoring agent behavior.
Many AI data analysis tools primarily generate SQL or Python using an LLM and return the result directly. DataAgent Pro combines LLM reasoning with deterministic execution, stateful workflows, and validation pipelines to produce more reliable analytical results.
| Capability | Typical AI Data Assistant | DataAgent Pro |
|---|---|---|
| Workflow | Single-step LLM response | Stateful LangGraph multi-agent workflow |
| Calculations | Performed or generated by the LLM | Executed deterministically using DuckDB, Pandas & NumPy |
| Conversation Memory | Limited chat history | Persistent LangGraph checkpoints with PostgreSQL |
| Error Recovery | Stops on failures | Validation, reflection, and automatic retries |
| Execution Safety | Limited validation | SQL validation and Python AST security checks |
| Explainability | Final answer only | Generated SQL, execution plan, reasoning, and reports |
| Observability | Minimal execution visibility | Pipeline timeline, execution metrics, and analytics dashboard |
| Tool Integration | Direct tool calls | MCP-based tool architecture with fallback support |
- LangGraph Supervisor β Routes requests to specialized workers for modular execution.
- Persistent Memory β PostgreSQL checkpoints preserve conversation state across sessions.
- Safe Code Execution β SQL validation and Python AST checks improve reliability and security.
- MCP Tool Integration β Analytical capabilities are exposed through Model Context Protocol with automatic fallback to local implementations.
- Grounded AI Reports β The LLM explains deterministic results instead of generating numbers.
- Session Isolation β Each analysis runs in an independent DuckDB session with automatic cleanup.
DataAgent Pro follows a stateful multi-agent architecture built with LangGraph. A central Supervisor coordinates specialized workers for planning, execution, validation, visualization, and reporting, while PostgreSQL preserves workflow state across sessions.
Every generated SQL or Python script is validated before execution. If validation fails or the results are unreliable, the system automatically reflects on the failure, regenerates the query, and retries execution. After the retry limit is reached, it returns a structured failure report instead of an incorrect response.
Generated SQL and Python code are validated before execution.
- SQL validation prevents common query errors.
- Python AST validation blocks unsafe imports and dangerous functions.
- Code runs inside isolated subprocesses with execution timeouts for safer execution.
The system records execution metrics and workflow traces, allowing users to monitor:
- Execution success rate
- Retry and recovery statistics
- Execution timeline
- System performance metrics
These insights are displayed through an integrated analytics dashboard.
| Category | Technologies |
|---|---|
| Frontend | React, TypeScript, Tailwind CSS, Vite |
| Backend | FastAPI, Python |
| AI Framework | LangGraph, LangChain |
| LLMs | Groq (Llama 3.3 70B), Gemini 2.5 Flash |
| Database | PostgreSQL, DuckDB |
| Data Processing | Pandas, NumPy |
| Visualization | Plotly |
| Reporting | ReportLab |
| Tool Integration | Model Context Protocol (MCP) |
autonomous-data-analyst-agent/
β
βββ backend/ # FastAPI + LangGraph workflow
βββ frontend/ # React application
βββ screenshots/ # README images
βββ docker-compose.yml
βββ requirements.txt
βββ README.md
git clone <repository-url>
cd autonomous-data-analyst-agentdocker-compose up -dpython -m venv .venv
# Activate environment
# Windows
.venv\Scripts\activate
# Linux / macOS
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .envConfigure your API keys inside .env.
Start the backend:
uvicorn backend.main:app --reloadcd frontend
npm install
npm run devOpen:
- Frontend β
http://localhost:5173 - Backend β
http://localhost:8000
- "Show the top 7 customers by total sales."
- "Show monthly sales trends."
- "Calculate the correlation between sales and quantity."
- "Detect outliers in sales."
- "Show the percentage contribution by deal size."
- Supports CSV datasets only.
- Python code runs inside subprocess-based sandboxes rather than containers.
- MCP communication currently uses local stdio transport.
This project demonstrates practical AI engineering concepts including:
- Multi-agent orchestration with LangGraph
- Stateful workflows and checkpointing
- Safe SQL and Python execution
- MCP-based tool integration
- Reflection and retry mechanisms
- Interactive analytics and reporting
This project is licensed under the MIT License.
Chetan VK
B.Tech in Artificial Intelligence & Data Science







