跪拜 Guibai
← All articles
Backend

Spring AI 2.0 vs. Spring AI Alibaba: Atomic Abstraction or Enterprise Orchestration?

By 苏三说技术 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

The Spring team explicitly chose not to build an agent framework, leaving a gap that Spring AI Alibaba fills with a LangGraph-style orchestration engine. Java shops that need multi-agent coordination now have a native option that composes with the standard Spring AI abstractions rather than replacing them.

Summary

Spring AI 2.0, released June 2026 on Spring Boot 4.1, refactors tool calling into a first-class advisor chain and strips it from individual chat models. Its mission is portability: a JDBC-like abstraction so you can swap model providers without rewriting integration code. Structured output now self-corrects, and memory management truncates by conversation turn rather than token count.

Spring AI Alibaba 1.1.2.0, built on Spring AI 1.1.2, adds what the official framework deliberately omits: a Graph workflow engine for multi-agent coordination. It ships with ReAct, Supervisor, Sequential, Parallel, Routing, and Loop agent patterns, plus visual drag-and-drop orchestration, process snapshots for fault recovery, and A2A communication backed by Nacos for distributed agents.

The two are not competitors. Spring AI Alibaba uses Spring AI's ChatClient as its foundation, then adds the orchestration runtime. A team can start with Spring AI 2.0 for standard RAG or single-agent tool calling, and introduce the Alibaba Graph engine only when workflows grow complex enough to need conditional branching, parallel execution, or human-in-the-loop checkpoints.

Takeaways
Spring AI 2.0 is a major architectural refactor, not a dependency bump; tool calling is now handled externally by ChatClient through a ToolCallingAdvisor chain.
Tools must be explicitly registered as ToolCallback beans and passed via .tools(); the old SpringBeanToolCallbackResolver and toolNames API are removed.
Structured output in 2.0 can self-correct, and EntityParamSpec allows per-call configuration of the output schema.
MessageWindowChatMemory now truncates by conversation turn boundary, preventing mid-turn cuts and duplicate memory in tool prompts.
Spring AI Alibaba's Graph engine provides 20+ standard workflow components including conditional branches, parallel processing, and exception catching, all usable through a visual drag-and-drop interface.
Graph supports process snapshots for automatic state saving and fault recovery, plus human-in-the-loop nodes for manual approval steps.
Spring AI Alibaba 1.1.2.0 added Agent Skills, parallel multi-agent execution with AllOf/AnyOf aggregation, and asynchronous tool execution.
The two frameworks compose: Spring AI Alibaba is built on Spring AI's abstractions, so a project can use Spring AI 2.0's ChatClient with Alibaba's Graph engine for orchestration.
Conclusions

Spring AI 2.0's deliberate refusal to become an agent framework is a design choice that mirrors the JDBC philosophy: provide a uniform access layer and let higher-level frameworks handle orchestration. This keeps the core small but guarantees a market for add-ons like Spring AI Alibaba.

The removal of SpringBeanToolCallbackResolver signals a shift toward explicit, auditable tool registration. Implicit bean scanning for tools is gone; every tool must be declared, which improves security and debuggability in production.

Spring AI Alibaba's version lag behind upstream Spring AI 2.0 creates a real friction point. Teams that want the Graph engine today are stuck on Spring AI 1.1.2, missing the 2.0 refactors to tool calling, memory, and structured output until Alibaba catches up.

The Graph engine's process snapshot and human-in-the-loop features target long-running, high-stakes workflows where a failed agent run cannot simply be retried from scratch. This is a different class of problem than what Spring AI 2.0 addresses alone.

Concepts & terms
Tool Calling Advisor Chain
In Spring AI 2.0, tool invocation logic is removed from individual ChatModel implementations and handled by a chain of advisors within ChatClient. ToolCallingAdvisor intercepts requests, manages the tool-calling loop, and returns results, making tool calling a composable, externalized concern.
Graph Workflow Engine
Spring AI Alibaba's core orchestration component, modeled after LangGraph. It represents multi-agent workflows as directed graphs where nodes are processing steps (agent calls, tool executions, decisions) and edges define control flow, supporting conditional routing, parallelism, and nested subgraphs.
ReAct Agent
An agent pattern that interleaves reasoning and action in a loop: the model thinks about what to do, executes a tool, observes the result, and repeats until it can answer. Spring AI Alibaba ships this as a built-in agent type within its Graph engine.
A2A (Agent-to-Agent)
A communication protocol for agents to discover and call each other across process boundaries. Spring AI Alibaba integrates A2A with Nacos for service discovery, enabling distributed agent coordination similar to how microservices communicate.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗