spring-ai-alibaba README

The project's README from github.com/alibaba/spring-ai-alibaba. As one markdown file: README.md.

Spring AI Alibaba

License CI Status Ask DeepWiki Maven Central gitleaks badge

A production-ready framework for building Agentic, Workflow, and Multi-agent applications.

Agent Framework Docs, Graph Docs, Spring AI, Examples.

Architecture

architecture

Spring AI Alibaba Admin is a one-stop Agent platform that supports visualized Agent development, observability, evaluation, and MCP management, etc. It also integrates with open-source low-code platforms like Dify, enabling rapid migration from DSL to Spring AI Alibaba project.

Spring AI Alibaba Agent Framework is an agent development framework that can quickly develop agents with built-in Context Engineering and Human In The Loop support. For scenarios requiring more complex process control, Agent Framework offers built-in workflows like SequentialAgent, ParallelAgent, RoutingAgent, LoopAgent.

Spring AI Alibaba Graph serves as the underlying runtime of the Agent Framework, providing essential capabilities such as persistence, workflow orchestration, and streaming required for long-running stateful agents. Compared to the Agent Framework, users can build more flexible multi-agent workflows based on the Graph API.

Core Features

architecture

Getting Started

Prerequisites

Quickly Run a ChatBot

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

  1. Download the code.

    git clone --depth=1 https://github.com/alibaba/spring-ai-alibaba.git
    cd spring-ai-alibaba
    
  2. Start the ChatBot.

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

    # 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
    
    # Maven installation is optional when using mvnw.
    ./mvnw -pl examples/chatbot spring-boot:run
    
  3. Chat with ChatBot.

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

chatbot-ui

Chatbot Code Explained

  1. Add dependencies

    <dependencies>
      <dependency>
        <groupId>com.alibaba.cloud.ai</groupId>
        <artifactId>spring-ai-alibaba-agent-framework</artifactId>
        <version>1.1.2.0</version>
      </dependency>
      <!-- Assume you are going to use DashScope Model. Refer to docs for how to choose model.-->
      <dependency>
        <groupId>com.alibaba.cloud.ai</groupId>
        <artifactId>spring-ai-alibaba-starter-dashscope</artifactId>
        <version>1.1.2.1</version>
      </dependency>
    </dependencies>
    
  2. Define Chatbot

    For more details of how to write a Chatbot, please check the Quick Start on our official website.

📚 Documentation

Project Structure

This project consists of several core components:

Spring AI Alibaba Ecosystem

Repository Description ⭐
Spring AI Alibaba Graph A low-level orchestration framework and runtime for building, managing, and deploying long-running, stateful agents. GitHub Repo stars
Spring AI Alibaba Admin Local visualization toolkit for the development of agent applications, supporting project management, runtime visualization, tracing, and agent evaluation. GitHub Repo stars
Spring AI Extensions Extended implementations for Spring AI core concepts, including DashScopeChatModel, MCP registry, etc. GitHub Repo stars
Spring AI Alibaba Examples Spring AI Alibaba Examples. GitHub Repo stars
JManus A Java implementation of Manus built with Spring AI Alibaba, currently used in many applications within Alibaba Group. GitHub Repo stars
DataAgent A natural language to SQL project based on Spring AI Alibaba, enabling you to query databases directly with natural language without writing complex SQL. GitHub Repo stars
DeepResearch Deep Research implemented based on spring-ai-alibaba-graph. GitHub Repo stars

Contact Us

Resources

Star History

Star History Chart


Made with ❤️ by the Spring AI Alibaba Team

spring-ai-alibaba (alibaba/spring-ai-alibaba)

Searching Database…

这是什么?Spring AI Alibaba 是一个可用于生产环境的 Java 框架,用于构建智能体、工作流和多智能体应用,它基于 Spring AI 构建。
这是我可以在上面开发的框架,还是现成的智能体应用?这是一个分层的 Java 框架:Agent Framework 用于快速构建智能体,底层的 Graph 运行时用于自定义工作流,另外还有一个可选的 Admin 平台,提供可视化界面,用于开发和可观测性。
如何让一个基础智能体跑起来?从 examples/chatbot 下载社区聊天机器人示例,设置你的 LLM 提供商 API Key(例如来自阿里云百炼),启动应用,然后在浏览器中与它对话。
试用之前需要先安装什么?JDK 17 或更高版本,以及来自 LLM 提供商(如 DashScope 或 OpenAI)的 API Key。
开始使用时是否需要单独的 Admin 或 Studio 项目?不需要。Agent Framework 或 Graph API 可以作为 Java 库独立使用;Admin 平台和内嵌的 Studio 界面是单独的可选组件,用于可视化开发、调试和可观测性。
这是为谁设计的?面向希望在现有基于 Spring 的应用中加入智能体 AI 能力(如聊天机器人、多智能体工作流、语音智能体)的 Java 开发者。
它提供了哪些内置的多智能体模式?它内置了现成的编排模式,包括 SequentialAgent、ParallelAgent、RoutingAgent 和 LoopAgent,用于组合复杂的多步骤智能体任务。
智能体能否跨服务相互通信?可以。框架集成了与 Nacos 配合使用的 A2A(Agent-to-Agent)支持,可以在独立的服务之间实现分布式的智能体协调与协作。
它支持语音交互吗?支持。它提供基于 WebSocket 的实时语音智能体,可以接收音频或文本输入,并以生成的音频作答。
这里的上下文工程(Context Engineering)是什么?它是一组内置的最佳实践,用于提升智能体的可靠性,包括人工介入、上下文压缩与编辑、工具调用次数限制、工具重试、规划以及动态工具选择。
我能导出工作流图吗?可以。基于图的工作流可以导出为 PlantUML 和 Mermaid 格式,用于可视化和文档编写。
Creator
alibaba
Size
226.6 MB
Stars
11K
Age
2y
Commits · 90 Days