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.

相关推荐
凤山老林8 小时前
SpringBoot 使用 H2 文本数据库构建轻量级应用
java·数据库·spring boot·后端
一碗白开水一8 小时前
【工具相关】OpenClaw 配置使用飞书:打造智能飞书助手全流程指南(亲测有效,放心享用)
人工智能·深度学习·算法·飞书
小程故事多_808 小时前
Vibe Coding的致命隐患,你必须知道的技术债务和扩展性危机
大数据·人工智能·aigc
童话名剑8 小时前
YOLO v3(学习笔记)
人工智能·深度学习·yolo·目标检测
康康的AI博客8 小时前
农业工业变革:如何通过DMXAPI中转提升自动化效率
运维·人工智能·自动化
实在智能RPA8 小时前
从API集成到意图驱动:深度解析实在Agent在复杂ERP/OA环境下的非标接口处理架构
人工智能·ai·架构
北京耐用通信8 小时前
协议融合的工业钥匙:耐达讯自动化网关如何打通CC-Link IE转DeviceNet的通信壁垒
人工智能·物联网·网络协议·自动化·信息与通信
EasyGBS8 小时前
GB35114+GB28181:EasyGBS视频融合平台如何构建视频监控 “联网+安全” 双重保障体系
网络·人工智能·国标gb28181·gb35114
只说证事9 小时前
中专计算机专业必考的证书清单有哪些?
人工智能
赶路人儿9 小时前
UTC时间和时间戳介绍
java·开发语言