Zafer-Liu/Data-Analysis-Agent
🚀你的私人数据分析助手。通过对话式交互,自动生成可视化报表与商业洞察,让数据决策变得像聊天一样简单。 🚀 Your personal data analysis assistant. Say goodbye to complex SQL and Excel formulas. An LLM-powered data analysis agent. Chat with your data to instantly generate visualizations and business insights. Making data-driven decisions has never been easier.
📊 Data‑Analysis‑Agent (智析 Agent)
What it is – An open‑source, conversational AI agent that lets non‑technical users analyse business data by simply typing natural‑language questions. It connects to Excel/CSV files or relational databases, automatically infers the schema, generates and runs SQL, picks an appropriate Plotly chart, and returns a written business insight.
Key capabilities
- Natural‑language to SQL – No need to write queries; the LLM translates user intent into SQL and executes it.
- Multi‑source support – Excel, CSV, SQLite, MySQL, PostgreSQL, SQL Server (future: DuckDB, Spark).
- Auto‑charting – Chooses from 41 chart types across 6 categories (trend, comparison, distribution, geographic, relational, proportion) and renders them with Plotly.
- Streaming feedback – Uses Server‑Sent Events to show a step‑by‑step progress bar (schema detection → SQL generation → execution → chart & insight).
- LLM‑agnostic – Works with any OpenAI‑compatible API (OpenAI, DeepSeek, AtlasCloud, etc.) and lets you configure
base_url,modelandapi_key. - Advanced analytics – Supports out‑lier handling, percentile grouping, K‑means clustering, decision‑tree modeling, and can export results as Excel, DOCX, or PPT.
- Extensible – Can attach a local/remote “MCP” for extra skills and ingest a business knowledge base.
How to get it
- Windows installer – Download
BusinessAnalyticsAgent_v1.2.0_LTS.exefrom the Releases page and run it (requires Python 3.10+). - Cross‑platform zip – Download the source zip, run
start.bat(Windows) orstart.command(macOS) which creates a virtual environment, installs dependencies and launches a Flask server athttp://localhost:5001. - One‑click script – Run the provided PowerShell (
install.ps1) or shell (install.sh) script to install globally and add adata-analysis-agentcommand. - Manual clone –
git clone https://github.com/ZaVar‑Liu/Data-Analysis-Agent.git && pip install -r requirements.txt && python app.py.
Typical workflow
> 最近 12 个月销售趋势
[1/4] 读取数据结构…
[2/4] 生成 SQL…
[3/4] 执行查询…
[4/4] 生成折线图并给出增长分析
You can also force a chart (/chart …), run raw SQL (/sql …), or invoke deeper analyses (/kmeans, /tree).
Configuration – In the UI sidebar under ⚙, enter your LLM API key, optional base URL and model name. The default models are deepseek‑v4‑flash (DeepSeek) and gpt‑4o‑mini (OpenAI).
Extending & contributing – The project follows PEP 8, uses conventional commits, and welcomes PRs for bug fixes, new chart types, or advanced analytics. See the CONTRIBUTING.md for the workflow.
License – CC BY‑NC 4.0 (non‑commercial use only; commercial licensing available from the author).
For more details, see the README sections on Features, Installation, Slash Commands, and the FAQ.
Related
- Project
- Project
- Project
- Project
- Project