Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
7dcdae8
fix: 多步骤SQL生成注入上一步结果
luming97 Jan 13, 2026
523fb13
chore: apply spring-javaformat
luming97 Jan 13, 2026
0b9edf8
Update README.md (#333)
mengnankkkk Jan 14, 2026
2b358cf
Update QUICK_START.md for API implementation status
zxuexingzhijie Jan 14, 2026
f97f1da
feat(build): use spotless to apply the license to java file (#312)
jackxu2011 Jan 14, 2026
eb6c946
fix: 修复生成echart图空指针异常,增加配置 (#337)
davidathena Jan 14, 2026
a6f4c36
build(fix): fix build mvn error with no .mvn floder (#325)
jackxu2011 Jan 15, 2026
1686d7b
fix: 测试模型改为流式调用,防止出现enable_thinking配置的报错 (#338)
davidathena Jan 16, 2026
8969d9d
docs: add English README (#344)
eltociear Jan 16, 2026
f1d9afb
docs: create SECURITY.md for security policy (#343)
Cyril-the-Real Jan 17, 2026
13ca19b
feat: 增加语义分块、递归分块、句子分块 (#300)
zihenzzz Jan 18, 2026
78f22d2
refactor: unify the angentId's type to Long (#314)
jackxu2011 Jan 21, 2026
c2a8a8d
refactor(filestorage): refactor some FileStorage code (#329)
jackxu2011 Jan 21, 2026
184abed
fix: 修改提示词,使用Structured Output特性保持模型输出 (#367)
davidathena Jan 23, 2026
9241965
fix: 修复人工复核功能按钮显示问题 (#365)
ChPi Jan 24, 2026
5fb42b3
feat: 报告中允许展示Echart同时可以下载Markdown和Html两种报告 (#340)
davidathena Jan 24, 2026
63316b7
feat: 增强docker python使用,允许配置远程的docker (#330)
EnjoyIot Jan 27, 2026
0052c1d
fix(datasource): 添加 PostgreSQL Schema 配置支持 (#375)
s88868888 Jan 27, 2026
af6e17d
fix: 移除agent 人工复核字段 (#378)
ChPi Jan 27, 2026
5dbdcb5
feat(ollama): 适配ollama使用(#387) (#392)
TouHouQing Jan 28, 2026
9583c73
fix:修复milvus 召回Q/A知识库的时候出现double强转int报错问题 #379 (#389)
497727358 Jan 28, 2026
6bb1de0
refactor: refactor datasource controller (#391)
jackxu2011 Jan 29, 2026
37fac5b
fix: resolve text contrast issue in dark mode (#394)
TouHouQing Jan 29, 2026
180763b
feat(AgentRun): 报告格式切换、全屏查看、输入选项折叠及会话侧边栏抽屉 (#404)
SmileSnow819 Feb 1, 2026
2f6ca5a
feat: simple vector store support serialize to disk. (#384)
weiyuc Feb 2, 2026
5004b2c
feat: 接入oracle (#397)
zihenzzz Feb 2, 2026
77252a8
refactor: datasoure (#377)
mengnankkkk Feb 2, 2026
f567bee
fix: 多步骤SQL生成注入上一步结果
luming97 Jan 13, 2026
db00d97
chore: apply spring-javaformat
luming97 Jan 13, 2026
5174c8f
Merge remote-tracking branch 'origin/fix/#321' into fix/#321
luming97 Feb 2, 2026
3318558
fix: 多步骤SQL生成注入计划与历史结果
luming97 Feb 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: ./CI/github-actions/setup-deps
- run: make tools
- run: make test
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,5 @@ modified_mcp_config.json
.idea/LocalCodeIndex/

uploads/*
vectorstore/*
.java-version
3 changes: 3 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
wrapperVersion=3.3.4
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip
2 changes: 2 additions & 0 deletions CI/linter/license/.licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,6 @@ header:
- '**/*.properties'
- 'CI/linter/codespell/.codespell.ignorewords'
- 'CI/linter/codespell/.codespell.skip'
- 'mvnw'
- 'mvnw.cmd'
comment: never
78 changes: 78 additions & 0 deletions CONTRIBUTING-en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
[中文](./CONTRIBUTING-zh.md) | English

## How to Contribute

## Thank you for contributing to Spring AI Alibaba-DataAgent!

Since the beginning of open-source development, DataAgent has received a lot of attention from the community. Every issue and PR from the community helps the project and contributes to building a better Spring AI.

We sincerely thank all developers who have submitted issues and PRs to this project. We hope more developers from the community will join us in making this project better.

## How to Contribute

Before contributing code, please take a moment to understand the process for contributing to Spring AI Alibaba.

### What to Contribute?

We welcome any contributions at any time, whether it's a simple typo fix, bug fix, or new feature. Please feel free to raise issues or submit PRs. We also value documentation and integration with other open-source projects, and welcome contributions in these areas.

For complex modifications, we recommend adding a Feature label in an Issue first, with a brief description of the design and changes.

### Where to Start?

If you're a first-time contributor, you can start with tasks from [good first issue](https://github.com/spring-ai-alibaba/DataAgent/labels/good%20first%20issue) and [help wanted](https://github.com/spring-ai-alibaba/DataAgent/labels/help%20wanted).

### Fork the Repository and Clone It Locally

- Click the `Fork` icon in the upper right corner of [this project](https://github.com/spring-ai-alibaba/DataAgent) to fork alibaba/spring-ai-alibaba to your own space.
- Clone the spring-ai-alibaba repository from your account locally. For example, if your account is `chickenlj`, run `git clone https://github.com/chickenlj/DataAgent.git` to perform the clone operation.

### Configure Github Information

- Run `git config --list` on your machine to view your global git username and email.
- Check if the displayed user.name and user.email match your github username and email.
- If your company has its own gitlab or uses other commercial gitlab, there may be a mismatch. In this case, you need to set a separate username and email for the spring-ai-alibaba project.
- For instructions on setting username and email, please refer to the official github documentation: [Setting your username](https://help.github.com/articles/setting-your-username-in-git/#setting-your-git-username-for-a-single-repository), [Setting your email](https://help.github.com/articles/setting-your-commit-email-address-in-git/).

### Merge Latest Code

After forking, the original repository's main branch may have new commits. To avoid conflicts between your PR and the main branch, you need to merge the main branch in a timely manner.

- In your local spring-ai-alibaba directory, run `git remote add upstream https://github.com/spring-ai-alibaba/DataAgent` to add the original repository address to the remote stream.
- In your local spring-ai-alibaba directory, run `git fetch upstream` to fetch the remote stream locally.
- In your local spring-ai-alibaba directory, run `git checkout main` to switch to the main branch.
- In your local spring-ai-alibaba directory, run `git rebase upstream/main` to rebase the latest code.

### Configure Spring AI Standard Code Format

As an implementation of Spring AI, Spring AI Alibaba directly follows the Spring AI project code standards. Please refer to the relevant code format specifications before starting. You need to configure the code format before submitting code.

### Development

Develop your feature. **After development, we recommend using `mvn clean package` to ensure the modified code compiles locally. This command also automatically formats the code in Spring style**. Then submit the code. Before submitting, create a new branch for this feature and use that branch for code submission.

### Local CI

After completing local development, we strongly recommend running the `make` command provided in the project's `CI\make` directory for local continuous integration (CI) checks before submitting a PR, to ensure the code meets project standards and specifications. If you have any questions about local CI, you can enter `make help` in the console to learn more.

### Local Checkstyle

To reduce unnecessary code style issues, Spring AI Alibaba provides local Checkstyle checking. You can run `mvn checkstyle:check` in the project root directory to check if the code style meets the specifications.

### Remove Unused Imports

To ensure code cleanliness, please remove unused imports from Java files. You can run `mvn spotless:apply` to automatically remove unused imports.

### Submit Latest Code

After coding is complete, you need to format and check the commit message based on the PR specification `[lint-pr-title.yml](.github/workflows/lint-pr-title.yml)` to ensure the commit message meets the specifications.
Commit format: git commit -m "type(module): space followed by compliant commit message", for example `feat(docs): update contribute-zh`

### Merge Latest Code

- Similarly, before submitting a PR, you need to rebase the main branch code (or the corresponding target branch if your target branch is not main). Please refer to the previous section for specific steps.
- If there are conflicts, resolve them first.

### Submit PR

Submit a PR, describe the changes and implemented features according to the `Pull request template`, and wait for code review and merge to become a Spring AI Alibaba Contributor and contribute to a better Spring AI Alibaba.
2 changes: 2 additions & 0 deletions CONTRIBUTING-zh.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
中文 | [English](./CONTRIBUTING-en.md)

## 如何贡献

## 感谢你为 Spring AI Alibaba-DateAgent 贡献!
Expand Down
122 changes: 122 additions & 0 deletions README-en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
<div align="center">
<p><a href="./README.md">中文</a> | English</p>
<h1>Spring AI Alibaba DataAgent</h1>
<p>
<strong>Enterprise-grade Intelligent Data Analyst powered by <a href="https://github.com/alibaba/spring-ai-alibaba" target="_blank">Spring AI Alibaba</a></strong>
</p>
<p>
Text-to-SQL | Python Deep Analysis | Intelligent Reports | MCP Server | RAG Enhancement
</p>

<p>
<a href="https://github.com/alibaba/spring-ai-alibaba"><img src="https://img.shields.io/badge/Spring%20AI%20Alibaba-1.1.0.0-blue" alt="Spring AI Alibaba"></a>
<img src="https://img.shields.io/badge/Spring%20Boot-3.4.8+-green" alt="Spring Boot">
<img src="https://img.shields.io/badge/Java-17+-orange" alt="Java">
<img src="https://img.shields.io/badge/License-Apache%202.0-red" alt="License">
<a href="https://deepwiki.com/spring-ai-alibaba/DataAgent"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
</p>

<p>
<a href="#-introduction">Introduction</a> •
<a href="#-core-features">Core Features</a> •
<a href="#-quick-start">Quick Start</a> •
<a href="#-documentation">Documentation</a> •
<a href="#-community--contribution">Community</a>
</p>
</div>

<br/>

<div align="center">
<img src="img/LOGO.png" alt="DataAgent" width="1807" style="border-radius: 10px; box-shadow: 0 4px 8px rgba(0,0,0,0.1);">
</div>

<br/>

## Introduction

**DataAgent** is an enterprise-grade intelligent data analysis Agent built on **Spring AI Alibaba Graph**. It goes beyond traditional Text-to-SQL tools, evolving into an AI-powered data analyst capable of executing **Python deep analysis** and generating **multi-dimensional chart reports**.

The system adopts a highly extensible architecture design, **fully compatible with OpenAI API specifications** for chat models and embedding models, and supports **flexible integration with any vector database**. Whether for private deployment or integration with mainstream LLM services (such as Qwen, Deepseek), it can be easily adapted to provide flexible and controllable data insight services for enterprises.

Additionally, this project natively supports **MCP (Model Context Protocol)**, enabling seamless integration as an MCP server into MCP-compatible ecosystem tools such as Claude Desktop.

## Core Features

| Feature | Description |
| :--- | :--- |
| **Intelligent Data Analysis** | StateGraph-based Text-to-SQL conversion, supporting complex multi-table queries and multi-turn conversation intent understanding. |
| **Python Deep Analysis** | Built-in Docker/Local Python executor, automatically generating and executing Python code for statistical analysis and machine learning predictions. |
| **Intelligent Report Generation** | Analysis results are automatically summarized into HTML/Markdown reports with ECharts visualizations, WYSIWYG. |
| **Human Feedback Mechanism** | Innovative Human-in-the-loop mechanism, supporting user intervention and adjustments during the plan generation phase. |
| **RAG Retrieval Enhancement** | Integrated vector database, supporting semantic retrieval of business metadata and terminology libraries to improve SQL generation accuracy. |
| **Multi-Model Orchestration** | Built-in model registry, supporting runtime dynamic switching between different LLM and Embedding models. |
| **MCP Server** | Compliant with MCP protocol, supporting external provision of NL2SQL and agent management capabilities as a Tool Server. |
| **API Key Management** | Comprehensive API Key lifecycle management with fine-grained permission control. |

## Project Structure

![dataagent-structure](img/dataagent-structure.png)


## Quick Start

> For detailed installation and configuration guide, please refer to [Quick Start Guide](docs/QUICK_START.md).

### 1. Prerequisites
- JDK 17+
- MySQL 5.7+
- Node.js 16+

### 2. Start Services

```bash
# 1. Import database
mysql -u root -p < data-agent-management/src/main/resources/sql/schema.sql

# 2. Start backend
cd data-agent-management
./mvnw spring-boot:run

# 3. Start frontend
cd data-agent-frontend
npm install && npm run dev
```

### 3. Access the System
Open your browser and visit `http://localhost:3000` to start creating your first data agent!

## Documentation

| Document | Contents |
| :--- | :--- |
| [Quick Start](docs/QUICK_START.md) | Environment requirements, database import, basic configuration, getting started |
| [Architecture Design](docs/ARCHITECTURE.md) | System layered architecture, StateGraph and workflow design, core module sequence diagrams |
| [Developer Guide](docs/DEVELOPER_GUIDE.md) | Development environment setup, detailed configuration manual, coding standards, extension development (vector DB/models) |
| [Advanced Features](docs/ADVANCED_FEATURES.md) | API Key invocation, MCP server configuration, custom hybrid retrieval strategies, Python executor configuration |
| [Knowledge Configuration Best Practices](docs/KNOWLEDGE_USAGE.md) | Explanation and usage of semantic models, business knowledge, and agent knowledge |

## Community & Contribution

- **DingTalk Group**: `154405001431` ("DataAgent User Group 1") Some users may not be able to join due to account security issues. If possible, please try with a different account.
- **Contribution Guide**: Community contributions are welcome! Please refer to the [Developer Guide](docs/DEVELOPER_GUIDE.md) to learn how to submit PRs.

## License

This project is licensed under the Apache License 2.0.

## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=spring-ai-alibaba/DataAgent&type=Date)](https://star-history.com/#spring-ai-alibaba/DataAgent&Date)

## Contributors

<a href="https://github.com/spring-ai-alibaba/DataAgent/graphs/contributors">
<img src="https://contrib.rocks/image?repo=spring-ai-alibaba/DataAgent" />
</a>

---

<div align="center">
Made with ❤️ by Spring AI Alibaba DataAgent Team
</div>
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<div align="center">
<p>中文 | <a href="./README-en.md">English</a></p>
<h1>Spring AI Alibaba DataAgent</h1>
<p>
<strong>基于 <a href="https://github.com/alibaba/spring-ai-alibaba" target="_blank">Spring AI Alibaba</a> 的企业级智能数据分析师</strong>
Expand Down Expand Up @@ -97,7 +98,7 @@ npm install && npm run dev

## 🤝 加入社区 & 贡献

- **钉钉交流群**: `154405001431` ("DataAgent用户1群")
- **钉钉交流群**: `154405001431` ("DataAgent用户1群") 部分用户可能因为账号安全问题无法加入,条件允许的情况下可换账号申请。
- **贡献指南**: 欢迎社区贡献!请查阅 [开发者文档](docs/DEVELOPER_GUIDE.md) 了解如何提交 PR。

## 📄 许可证
Expand Down
7 changes: 7 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Security Policy

## Reporting a Vulnerability

Please report any security issue or Higress crash report to [ASRC](https://security.alibaba.com/)(Alibaba Security Response Center) where the issue will be triaged appropriately.

Thank you in advance for helping to keep Spring AI Alibaba DataAgent secure.
1 change: 1 addition & 0 deletions data-agent-frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
pnpm-lock.yaml
pnpm-workspace.yaml

node_modules
dist
Expand Down
57 changes: 55 additions & 2 deletions data-agent-frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions data-agent-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"dompurify": "^3.2.4",
"echarts": "^6.0.0",
"highlight.js": "^11.11.1",
"markdown-it": "^12.0.6",
"markdown-it-container": "^3.0.0",
"marked": "^12.0.2",
"vue": "^3.4.0",
"vue-router": "^4.2.0"
Expand Down
Loading