Breaking02 / IT
Spring AI Agent checks graph types before runtime
Developers can wrap an existing `ChatClient` to use it as an agent in a graph.

The Spring AI team released Spring AI Agent 0.8.0, giving Java and Kotlin developers a way to catch type mismatches between connected graph steps before runtime. The team said in its official blog on 3 Dec 2026 that the module builds on Spring AI 2.1.
The release is available in the experimental spring-projects-experimental/spring-ai-agent repository. Developers can wrap an existing ChatClient in a ChatClientAgent and add it to a graph. They can also register any agent that implements Agent<I, O> as a ChatClient tool, leaving the model to decide whether to call it.
ModelGraphAgent combines model and tool calls with steps such as checks and human approval. The IDE or compiler can catch mismatches between one step’s output type and the next step’s input type. A check after a model call receives the completed output, so any text already streamed falls outside that check.
Kotlin has dedicated extensions and a domain-specific language for defining graphs. During a run, developers can read events in a loop through the Source<T> stream interface. Each receiveNext() call blocks the calling thread until the next event, with execution using virtual threads where available and a platform thread pool on runtimes such as Java 17.
GraphAgent treats each subagent as a graph step, with its own model, tools, instructions and permissions. The graph’s connections determine which agent runs next. In parallel branches, each subagent works on a copy of the conversation and returns only its result to the parent agent.
The blog’s flight rebooking example uses parallel branches to search for several options at once. Its first() policy takes the first option found and cancels the remaining searches. The run fails if the searches find no option within the example’s 30-second limit.
SessionFeature keeps a compacted conversation history, and CheckpointFeature lets a run resume after a crash or a pause for human input. With checkpointing enabled, the system saves a checkpoint after each graph step and each round of tool calls in ChatClientAgent. It provides in-memory and file-based checkpoint stores.
The release also supports A2A, a protocol for communication between agents. A2ARemoteAgent can call a remote agent in the same graph as local agents or expose it as a ChatClient tool. Any agent implementing Agent<I, O> can also be exposed as an A2A server.
For Spring AI 3.0, the team said it plans to use the virtual-thread programming model across its APIs and remove Reactor as a required dependency. It plans to recommend Spring MVC and RestClient with virtual threads on Java 25 and later. Support for Java 17 and Java 21 is set to continue under the plan.
The team is taking design and API feedback through repository issues before integration. The blog leaves open whether the experimental API will be compatible with Spring AI 3.0. The team plans to integrate Spring AI Agent into 3.0, which it plans to release in 2027.