spring ai alibaba

一、什么是 Spring AI Alibaba

Spring AI Alibaba 是一款以 Spring AI 为基础,深度集成百炼平台,支持 ChatBot、工作流、多智能体应用开发模式的 AI 框架。

在 1.0 版本中,Spring AI Alibaba 提供以下核心能力,让开发者可以快速构建自己的 Agent、Workflow 或 Multi-Agent 应用。

Graph 多智能体框架。 基于 Spring AI Alibaba Graph,开发者可快速构建工作流、多智能体应用,无需关心流程编排、上下文记忆管理等底层实现。通过 Graph 与低代码、自规划智能体结合,为开发者提供从低代码、高代码到零代码构建智能体的更灵活选择。

通过 AI 生态集成,解决企业智能体落地过程中关心的痛点问题。 Spring AI Alibaba 支持与百炼平台深度集成,提供模型接入、RAG 知识库解决方案;支持 ARMS、Langfuse 等可观测产品无缝接入;支持企业级的 MCP 集成,包括 Nacos MCP Registry 分布式注册与发现、自动 Router 路由等。

探索具备自主规划能力的通用智能体产品与平台。 社区发布了基于 Spring AI Alibaba 框架实现的 JManus 智能体,除了对标 Manus 的通用智能体能力外,我们的目标是基于 JManus 探索自主规划在智能体开发方向的应用,为开发者提供从低代码、高代码到零代码构建智能体的更灵活选择。

官网:https://java2ai.com/

github:https://github.com/alibaba/spring-ai-alibaba

二、Quickly Run a ChatBot

There's a ChatBot example provided by the community at examples/chatbot.

1,Download the code.

java 复制代码
git clone --depth=1 https://github.com/alibaba/spring-ai-alibaba.git
cd spring-ai-alibaba/examples/chatbot

2,Start the ChatBot.

Before starting, set API-KEY first (visit Aliyun Bailian to get API-KEY):

bash 复制代码
# this example uses 'spring-ai-alibaba-starter-dashscope', visit https://java2ai.com to learn how to use OpenAI/DeepSeek.
export AI_DASHSCOPE_API_KEY=your-api-key

这里我们修改application.properties使用本地Ollama模型:

bash 复制代码
# Spring AI Configuration - DashScope (Disabled)
spring.autoconfigure.exclude=\
  com.alibaba.cloud.ai.autoconfigure.dashscope.DashScopeChatAutoConfiguration,\
  com.alibaba.cloud.ai.autoconfigure.dashscope.DashScopeAgentAutoConfiguration,\
  com.alibaba.cloud.ai.autoconfigure.dashscope.DashScopeAudioSpeechAutoConfiguration,\
  com.alibaba.cloud.ai.autoconfigure.dashscope.DashScopeAudioTranscriptionAutoConfiguration

# Spring AI Configuration - Ollama (Enabled)
spring.ai.ollama.base-url=http://localhost:11434
spring.ai.ollama.chat.enabled=true
spring.ai.ollama.chat.model=qwen2.5:0.5b
spring.ai.ollama.chat.temperature=0.7
spring.ai.model.chat=ollama
bash 复制代码
mvn spring-boot:run

3,Chat with ChatBot.

Open the browser and visit http://localhost:8080/chatui/index.html to chat with the ChatBot.

相关推荐
m4Rk_6 小时前
【论文阅读】Agent 记忆机制(83):Inside Out——用可演化 PersonaTree 构建 Agent 的核心长期记忆
论文阅读·人工智能·学习·开源·github
运行时异常6 小时前
【WMS 仓储系统集成 AI Agent 实战】第 8 讲(终篇):生产部署与并发安全——Semaphore 放进 Flux.defer 的坑,压测抓了一晚上
人工智能·安全
杨杨杨大侠6 小时前
Jev、Kev、Laya:决策模型怎么选,什么时候需要微调?
人工智能·python·agent
代码方舟6 小时前
零信任架构实战:基于天远人企关联构建自动化供应链金融网关
运维·人工智能·架构·自动化
EatFan6 小时前
Spring Boot 4 落地观察:从 yudao-cloud、matecloud、JPower 看国产脚手架的升级路线与迁移清单
java·spring boot·后端·spring cloud·微服务·后端开发·jdk 21
虹科网络安全6 小时前
“顶会”看安全(十八):超越越狱:揭示由能力边界模糊引发的 LLM 应用安全风险
人工智能·安全
Maiko Star6 小时前
* LangChain 提示词模板详解:ChatPromptTemplate 的使用与高级特性
java·人工智能·langchain
鬓戈6 小时前
Rust 语言与 AI 应用生态调研及学习路径
人工智能·学习·rust
天远API6 小时前
零信任架构实战:基于天远人企关联构建自动化图谱网关
网络·人工智能·架构·自动化
爱吃提升7 小时前
文生视频模型发展趋势(2026)
人工智能·音视频