How akash-aiml/data_analyst_agent works
AI Data Analyst is a CSV-to-validated-report platform, exposed through a FastAPI/React dashboard and a Streamlit app. The principal workflow ingests and profiles a dataset, plans and executes sandboxed analyses with a reflection loop, verifies evidence, then produces insights and a shareable Sweetviz report. The README documents the stages and major capabilities; sampled source confirms key upload, pipeline invocation, profiler-tool, and API boundaries. Several insight and web-dashboard implementation details were not sampled, so those connections are shown only where documented.
Main entry points: graph.py LangGraph Orchestrator · insight_node.py Insight Agent · agent.py Data Profiler · llm.py LLM Failover and Cache
Components 24
User Interfaces
- React Dashboard
frontend/src/pages/Profile.tsx - Streamlit App
app.py - Upload and Run
ui/components/pipeline_runner.py - Pipeline Service
ui/services/pipeline_service.py
Analysis Pipeline
- LangGraph Orchestrator
graph.py - Shared Agent State
state/graph_state.py - Data Profiler
agents/profiler/agent.py - EDA Report Tool
tools/profiling_tool.py - Analysis Planner
agents/analysis/agent.py - Sandbox Executor
tools/python_executor.py - Plan Reflector
agents/analysis/agent.py
Evidence and Reports
- Insight Agent
agents/insight/insight_node.py - Evidence Validation
agents/insight/validation.py - Recompute Verification
agents/insight/verify.py - Report Generator
agents/insight/report_generator.py - Grounded Chat
agents/insight/chat.py - Sweetviz HTML Report
- Summary Report
Platform Services
- REST API
api/main.py - LLM Failover and Cache
llm.py
Other components
- Analyst
- Model Providers
- CSV Dataset
- Browser
Connections 32
- Analyst → React Dashboard: uses dashboard
- Analyst → Streamlit App: uses app
- React Dashboard → REST API: calls API
- Analyst → Upload and Run: uploads CSV
- Upload and Run → Pipeline Service: runs pipeline
ui/components/pipeline_runner.py - Pipeline Service → LangGraph Orchestrator: invokes graph
ui/services/pipeline_service.py - Pipeline Service → Shared Agent State: builds state
ui/services/pipeline_service.py - REST API → LangGraph Orchestrator: runs pipeline
api/main.py - REST API → Browser: serves report
api/main.py - Browser → Sweetviz HTML Report: views report
- LangGraph Orchestrator → Data Profiler: routes stage
graph.py - LangGraph Orchestrator → Analysis Planner: routes stage
graph.py - LangGraph Orchestrator → Sandbox Executor: routes stage
- LangGraph Orchestrator → Plan Reflector: routes stage
graph.py - LangGraph Orchestrator → Insight Agent: routes stage
graph.py - Data Profiler → EDA Report Tool: generates profile
agents/profiler/agent.py - Data Profiler → Shared Agent State: updates state
- Analysis Planner → Sandbox Executor: plans tasks
agents/analysis/agent.py - Sandbox Executor → Plan Reflector: returns results
agents/analysis/agent.py - Plan Reflector → Sandbox Executor: adds tasks
agents/analysis/agent.py - Insight Agent → Evidence Validation: validates output
- Insight Agent → Recompute Verification: recomputes evidence
- Insight Agent → Report Generator: compiles reports
- Report Generator → Sweetviz HTML Report: delivers profile
- Report Generator → Summary Report: writes summary
- Grounded Chat → Insight Agent: grounds answers
- Data Profiler → LLM Failover and Cache: requests model
agents/profiler/agent.py - Analysis Planner → LLM Failover and Cache: requests model
agents/analysis/agent.py - Insight Agent → LLM Failover and Cache: requests model
- Grounded Chat → LLM Failover and Cache: requests model
- LLM Failover and Cache → Model Providers: fails over
- CSV Dataset → Data Profiler: reads dataset
agents/profiler/agent.py