← all repositories
spring-ai-alibaba/DataAgent

When Text-to-SQL Grows Up and Learns Python

DataAgent turns natural language into SQL, Python analysis, and visual reports while letting humans veto the plan before execution.

DataAgent
Velocity · 7d
+5.6
★ / day
Trend
steady
star history

What it does

DataAgent is an enterprise analytics agent built on Spring AI Alibaba Graph. It translates natural language into SQL queries, then goes further by auto-generating and executing Python code for statistical or machine-learning analysis. Results land in HTML or Markdown reports with ECharts visualizations, and the whole system can plug into Claude Desktop via MCP as a backend tool server.

The interesting bit

Most Text-to-SQL tools stop at the query. DataAgent treats SQL as just one step in a StateGraph workflow that can spawn Dockerized or local Python environments for deeper number-crunching. A built-in human-in-the-loop gate lets users inspect and adjust the execution plan before the agent runs off with it—useful when business logic is too messy to trust entirely to an LLM.

Key highlights

  • StateGraph-driven pipeline that handles multi-table joins and multi-turn conversational context
  • Auto-generated Python execution in Docker or local environments for stats and ML predictions
  • RAG layer over vector databases to retrieve business metadata and terminology, improving SQL accuracy
  • Runtime model registry for hot-swapping LLMs and embedding models (OpenAI-compatible APIs supported)
  • Native MCP server mode exposing NL2SQL and agent management to external clients

Caveats

  • Documentation and primary community support are Chinese-first; the project wears its Alibaba origins openly
  • The README claims the human-in-the-loop mechanism is “original” without citing prior art—take that with a grain of salt
  • No performance benchmarks or SQL accuracy metrics are published in the provided sources

Verdict

Worth a look if you need a Java-based, self-hostable analytics agent that bridges chat, SQL, and Python execution. Skip it if you want a lightweight, single-purpose NL2SQL library without the workflow orchestration overhead.

Frequently asked

What is spring-ai-alibaba/DataAgent?
DataAgent turns natural language into SQL, Python analysis, and visual reports while letting humans veto the plan before execution.
Is DataAgent open source?
Yes — spring-ai-alibaba/DataAgent is open source, released under the Apache-2.0 license.
What language is DataAgent written in?
spring-ai-alibaba/DataAgent is primarily written in Java.
How popular is DataAgent?
spring-ai-alibaba/DataAgent has 2.3k stars on GitHub and is currently holding steady.
Where can I find DataAgent?
spring-ai-alibaba/DataAgent is on GitHub at https://github.com/spring-ai-alibaba/DataAgent.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.