This project builds upon Spring AI, providing extended implementations of core concepts such as ChatModel, ImageModel, AudioModel, MCP, DocumentParser, ChatMemory, ToolCallback, VectorStore, etc. It helps developers quickly integrate with Alibaba Cloud Bailian model services, vector database services, chat memory components, tool calling, and other features.
Based on these components, developers can use Spring AI ChatClient, or Spring AI Alibaba Agent Framework to quickly build their own AI agent applications. Please choose according to your specific use case.
English | 📖 中文版
spring-ai dependency issue, please lean how to configure the spring-milestones Maven repository on FAQ page.ChatClient to Develop a ChatbotTo quickly get started with Spring AI Alibaba, add 'spring-ai-alibaba-starter-dashscope' dependency to your java project.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.alibaba.cloud.ai</groupId>
<artifactId>spring-ai-extensions-bom</artifactId>
<version>1.1.2.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.alibaba.cloud.ai</groupId>
<artifactId>spring-ai-alibaba-starter-dashscope</artifactId>
</dependency>
</dependencies>
To use DashScope Java SDK based chat model implementation, use the SDK starter instead:
<dependency>
<groupId>com.alibaba.cloud.ai</groupId>
<artifactId>spring-ai-alibaba-starter-dashscope-sdk</artifactId>
</dependency>
And set spring.ai.model.chat=dashscope-sdk.
Decare a ChatClient instance that would have DashScopeChatModel automatically injected.
@RestController
@RequestMapping("/helloworld")
public class HelloworldController {
private static final String DEFAULT_PROMPT = "你是一个博学的智能聊天助手,请根据用户提问回答!";
private final ChatClient dashScopeChatClient;
public HelloworldController(ChatClient.Builder chatClientBuilder) {
this.dashScopeChatClient = chatClientBuilder
.defaultSystem(DEFAULT_PROMPT)
.defaultAdvisors(
new SimpleLoggerAdvisor()
)
.defaultOptions(
DashScopeChatOptions.builder()
.topP(0.7)
.build()
)
.build();
}
@GetMapping("/simple/chat")
public String simpleChat(@RequestParam(value = "query") String query) {
return dashScopeChatClient.prompt(query).call().content();
}
}
Please check Quick Start on our official website to learn more details.
// TBD
The community has developed a Playground agent that includes a complete front-end UI and back-end implementation. The Playground back-end is developed using Spring AI Alibaba and gives users a quick overview of all core framework capabilities such as chatbot, multi-round conversations, image generation, multi-modality, tool calling, MCP, and RAG.
You can deploy the Playground example locally and access the experience through your browser, or copy the source code and tweak it to your own business needs to build your own set of AI apps more quickly. For more examples, please refer to our official example repository: https://github.com/springaialibaba/spring-ai-alibaba-examples
Spring AI Alibaba provides comprehensive model implementations through DashScope (Alibaba Cloud's AI model service platform):
The DashScope Chat Model provides access to Bailian(百炼) -- Alibaba Cloud's large language model service, which supports Qwen series, Deepseek series models.
DashScopeChatModel supports:
DashScope SDK based chat model implementation. Configure with spring-ai-alibaba-starter-dashscope-sdk and spring.ai.model.chat=dashscope-sdk.
DashScope SDK based image model implementation. Configure with spring-ai-alibaba-starter-dashscope-sdk and spring.ai.model.image=dashscope-sdk.
DashScope SDK based embedding model implementation. Configure with spring-ai-alibaba-starter-dashscope-sdk and spring.ai.model.embedding=dashscope-sdk.
DashScope SDK based text-to-speech model implementation. Configure with spring-ai-alibaba-starter-dashscope-sdk and spring.ai.model.audio.speech=dashscope-sdk.
DashScope SDK based audio transcription model implementation. Configure with spring-ai-alibaba-starter-dashscope-sdk and spring.ai.model.audio.transcription=dashscope-sdk.
Image generation capabilities powered by DashScope, supporting text-to-image generation with various styles and parameters.
Text embedding model for converting text into vector representations, essential for RAG (Retrieval Augmented Generation) applications and semantic search.
Text-to-speech synthesis model that converts text into natural-sounding audio with support for multiple voices and languages.
Speech-to-text transcription model that converts audio into text with high accuracy.
MCP provides a standardized protocol for managing and routing AI model contexts. This extension includes:
MCP SDK Version: 0.14.0
Available Starters:
spring-ai-alibaba-starter-mcp-registryspring-ai-alibaba-starter-mcp-routerExtensive collection of pre-built tool integrations that enable AI models to interact with external services and APIs. The framework includes 40+ ready-to-use tools:
Search & Information:
Translation Services:
Map & Location:
News & Media:
Collaboration Tools:
Web Scraping:
Data & Storage:
Academic & Research:
Finance & Data:
Utilities:
Trend Analysis:
Specialized:
Each tool comes with auto-configuration support and can be easily enabled via properties configuration.
Vector database integrations for building RAG applications and semantic search capabilities:
All vector stores provide consistent APIs for:
Multiple storage backends for managing conversation history and long-term memory:
Short-term Memory:
Long-term Memory:
Available starters:
spring-ai-alibaba-starter-memory (short-term memory)spring-ai-alibaba-starter-memory-long (long-term memory)spring-ai-alibaba-starter-memory-redis)Popular RAG architecture and a variety of reusable components:
Available starters:
<dependency>
<groupId>com.alibaba.cloud.ai</groupId>
<artifactId>spring-ai-alibaba-starter-rag</artifactId>
</dependency>
Dynamic prompt management and versioning capabilities:
Starter:
<dependency>
<groupId>com.alibaba.cloud.ai</groupId>
<artifactId>spring-ai-alibaba-starter-nacos-prompt</artifactId>
</dependency>
Comprehensive document parsing capabilities supporting various formats:
Specialized document readers for various data sources and platforms:
Archive & Storage:
Academic & Research:
Collaboration Platforms:
Code Repositories:
Media:
Databases:
Communication:
AI Data:
Each reader can extract and structure content from its respective source, making it ready for RAG pipelines and AI processing.
ARMS (Application Real-Time Monitoring Service) integration for comprehensive AI application observability:
Starter:
<dependency>
<groupId>com.alibaba.cloud.ai</groupId>
<artifactId>spring-ai-alibaba-starter-arms-observation</artifactId>
</dependency>
We welcome contributions! Please see our contributing guidelines and follow the development standards outlined in each module's README.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Java
99.4%
This project builds upon Spring AI, providing extended implementations of core concepts such as ChatModel, ImageModel, AudioModel, MCP, DocumentParser, ChatMemory, ToolCallback, VectorStore, etc. It helps developers quickly integrate with Alibaba Cloud Bailian model services, vector database services, chat memory components, tool calling, and other features.
Based on these components, developers can use Spring AI ChatClient, or Spring AI Alibaba Agent Framework to quickly build their own AI agent applications. Please choose according to your specific use case.
English | 📖 中文版
spring-ai dependency issue, please lean how to configure the spring-milestones Maven repository on FAQ page.ChatClient to Develop a ChatbotTo quickly get started with Spring AI Alibaba, add 'spring-ai-alibaba-starter-dashscope' dependency to your java project.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.alibaba.cloud.ai</groupId>
<artifactId>spring-ai-extensions-bom</artifactId>
<version>1.1.2.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.alibaba.cloud.ai</groupId>
<artifactId>spring-ai-alibaba-starter-dashscope</artifactId>
</dependency>
</dependencies>
To use DashScope Java SDK based chat model implementation, use the SDK starter instead:
<dependency>
<groupId>com.alibaba.cloud.ai</groupId>
<artifactId>spring-ai-alibaba-starter-dashscope-sdk</artifactId>
</dependency>
And set spring.ai.model.chat=dashscope-sdk.
Decare a ChatClient instance that would have DashScopeChatModel automatically injected.
@RestController
@RequestMapping("/helloworld")
public class HelloworldController {
private static final String DEFAULT_PROMPT = "你是一个博学的智能聊天助手,请根据用户提问回答!";
private final ChatClient dashScopeChatClient;
public HelloworldController(ChatClient.Builder chatClientBuilder) {
this.dashScopeChatClient = chatClientBuilder
.defaultSystem(DEFAULT_PROMPT)
.defaultAdvisors(
new SimpleLoggerAdvisor()
)
.defaultOptions(
DashScopeChatOptions.builder()
.topP(0.7)
.build()
)
.build();
}
@GetMapping("/simple/chat")
public String simpleChat(@RequestParam(value = "query") String query) {
return dashScopeChatClient.prompt(query).call().content();
}
}
Please check Quick Start on our official website to learn more details.
// TBD
The community has developed a Playground agent that includes a complete front-end UI and back-end implementation. The Playground back-end is developed using Spring AI Alibaba and gives users a quick overview of all core framework capabilities such as chatbot, multi-round conversations, image generation, multi-modality, tool calling, MCP, and RAG.
You can deploy the Playground example locally and access the experience through your browser, or copy the source code and tweak it to your own business needs to build your own set of AI apps more quickly. For more examples, please refer to our official example repository: https://github.com/springaialibaba/spring-ai-alibaba-examples
Spring AI Alibaba provides comprehensive model implementations through DashScope (Alibaba Cloud's AI model service platform):
The DashScope Chat Model provides access to Bailian(百炼) -- Alibaba Cloud's large language model service, which supports Qwen series, Deepseek series models.
DashScopeChatModel supports:
DashScope SDK based chat model implementation. Configure with spring-ai-alibaba-starter-dashscope-sdk and spring.ai.model.chat=dashscope-sdk.
DashScope SDK based image model implementation. Configure with spring-ai-alibaba-starter-dashscope-sdk and spring.ai.model.image=dashscope-sdk.
DashScope SDK based embedding model implementation. Configure with spring-ai-alibaba-starter-dashscope-sdk and spring.ai.model.embedding=dashscope-sdk.
DashScope SDK based text-to-speech model implementation. Configure with spring-ai-alibaba-starter-dashscope-sdk and spring.ai.model.audio.speech=dashscope-sdk.
DashScope SDK based audio transcription model implementation. Configure with spring-ai-alibaba-starter-dashscope-sdk and spring.ai.model.audio.transcription=dashscope-sdk.
Image generation capabilities powered by DashScope, supporting text-to-image generation with various styles and parameters.
Text embedding model for converting text into vector representations, essential for RAG (Retrieval Augmented Generation) applications and semantic search.
Text-to-speech synthesis model that converts text into natural-sounding audio with support for multiple voices and languages.
Speech-to-text transcription model that converts audio into text with high accuracy.
MCP provides a standardized protocol for managing and routing AI model contexts. This extension includes:
MCP SDK Version: 0.14.0
Available Starters:
spring-ai-alibaba-starter-mcp-registryspring-ai-alibaba-starter-mcp-routerExtensive collection of pre-built tool integrations that enable AI models to interact with external services and APIs. The framework includes 40+ ready-to-use tools:
Search & Information:
Translation Services:
Map & Location:
News & Media:
Collaboration Tools:
Web Scraping:
Data & Storage:
Academic & Research:
Finance & Data:
Utilities:
Trend Analysis:
Specialized:
Each tool comes with auto-configuration support and can be easily enabled via properties configuration.
Vector database integrations for building RAG applications and semantic search capabilities:
All vector stores provide consistent APIs for:
Multiple storage backends for managing conversation history and long-term memory:
Short-term Memory:
Long-term Memory:
Available starters:
spring-ai-alibaba-starter-memory (short-term memory)spring-ai-alibaba-starter-memory-long (long-term memory)spring-ai-alibaba-starter-memory-redis)Popular RAG architecture and a variety of reusable components:
Available starters:
<dependency>
<groupId>com.alibaba.cloud.ai</groupId>
<artifactId>spring-ai-alibaba-starter-rag</artifactId>
</dependency>
Dynamic prompt management and versioning capabilities:
Starter:
<dependency>
<groupId>com.alibaba.cloud.ai</groupId>
<artifactId>spring-ai-alibaba-starter-nacos-prompt</artifactId>
</dependency>
Comprehensive document parsing capabilities supporting various formats:
Specialized document readers for various data sources and platforms:
Archive & Storage:
Academic & Research:
Collaboration Platforms:
Code Repositories:
Media:
Databases:
Communication:
AI Data:
Each reader can extract and structure content from its respective source, making it ready for RAG pipelines and AI processing.
ARMS (Application Real-Time Monitoring Service) integration for comprehensive AI application observability:
Starter:
<dependency>
<groupId>com.alibaba.cloud.ai</groupId>
<artifactId>spring-ai-alibaba-starter-arms-observation</artifactId>
</dependency>
We welcome contributions! Please see our contributing guidelines and follow the development standards outlined in each module's README.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Java
99.4%