The Spring team released Spring AI 2.1.0 to Maven Central on November 20, 2026, together with a 2.0.3 maintenance build for the older line. The new version arrives five months after 2.0.0, runs on Spring Boot 4.2, and bundles over 430 commits made by 86 people.
The release matters for two reasons. It brings the largest set of agent-building features the project has shipped so far, and it closes 13 security vulnerabilities that are missing from the 2.1 milestones and release candidates, so anyone testing those builds should move to the final version.
What is new in Spring AI 2.1
The announcement groups the work into a handful of themes. Many of them were previewed in the milestone and RC builds, but 2.1.0 is the first production-ready release that combines them.
- MCP 2026-07-28: both server and client support for the latest Model Context Protocol spec, which drops sessions entirely, alongside the existing STDIO, SSE and Streamable HTTP options.
- Decision Models: a typed API for yes/no, multiple-choice and score decisions that returns a probability for each possible answer.
- Message parts: messages now keep an ordered list of text, reasoning, tool call, tool result and media parts, so provider-specific blocks are not lost between turns.
- OpenAI Responses API: a new chat model that talks to the /v1/responses endpoint, offered alongside the existing Chat Completions model.
- Session API: a replacement for ChatMemory with an event log, compaction and recall.
- Bring-your-own embeddings: eleven vector stores can store and search with vectors computed outside Spring AI.
- Reorganized reference documentation with a quickstart and four tutorials.
Stateless MCP and Decision Models
The 2026-07-28 MCP revision removes the initialize handshake and the session. Each request now carries the protocol version and client capabilities on its own. In Spring AI, a server opts in by setting the server protocol property to MODERN, and existing annotated tool, resource and prompt beans work without changes.
On the client side, a Streamable HTTP connection can be marked as modern, and legacy and modern connections can run in the same application. Because a modern client keeps no session, Spring AI creates one per ChatClient request by default, with shared and custom scopes available for other cases.
Decision Models target a common problem: turning free text from a chat model into a dependable result. Developers describe the allowed answers, and the model picks one while reporting how likely each option is.
The application can then act only above a chosen confidence level. OpenAI, Ollama and System One implementations ship with Boot starters, and the API also powers a new document reranker, a prompt-injection filter for RAG and a tool index.
Building blocks for agents
The new Session API was ported into the core from a community-run project of the same name. Every message and event is recorded in a log that only grows, and the prompt is assembled from a selected window over it.
When history is trimmed, the trim happens between complete turns, which keeps each tool call paired with its result, and trimmed content stays searchable.
A JDBC repository supports PostgreSQL, MySQL, MariaDB, SQL Server and H2. ChatMemory and its advisors are now deprecated and are scheduled for removal in Spring AI 3.0.0, with a migration guide that maps the old API to the new one.
Several other harness features land at the same time:
- Tools can require human confirmation before they run, and the paused state can survive an application restart.
- The tool calling loop now limits calls per tool and per turn, 40 and 150 by default.
- Guardrail refusals are marked, so caching and validation advisors do not treat them as normal answers.
- A provider-neutral finish reason category tells code whether an answer completed, was cut off or was filtered.
Security fixes and behavior changes
The 13 CVEs cover server-side request forgery in the Bedrock Converse URL check, prompts written to logs at WARN level, memory exhaustion in Tika text extraction and denial of service through crafted PDFs and deep recursion.
Several fixes deal with filter injection flaws that could break tenant separation in the Redis, Typesense and Coherence integrations, plus cross-user data exposure in the Redis semantic cache.
Three of these fixes change behavior. The semantic cache advisor now needs a scope resolver bean, the Tika reader stops at 10 million characters by default, and the Typesense store rejects filter values that contain a backtick. Spring AI 2.0.3 carries the same fixes for teams that are not ready to move to 2.1.
What it means for developers
For Java teams building AI features, the security list alone justifies an upgrade. Applications that use Redis or Typesense for multi-tenant vector search should treat the injection and isolation fixes as urgent, and anyone running a 2.1 milestone or RC is exposed until they switch to the GA build.
The Session API is the change most likely to need planning. ChatMemory still works, but it is deprecated, and new code should start on sessions. Applications that call recent OpenAI reasoning models with tools should look at the Responses API model, since the announcement notes that Chat Completions no longer supports that combination from GPT-5.4 onward.
Decision Models are worth trying for classification, routing and guardrail checks. The Ollama implementation runs locally without an API key, which makes it a cheap way to test the idea before wiring it into production code.
How to upgrade
Spring AI 2.1 requires Spring Boot 4.2, so both versions should move together. The team says most applications only need the two version bumps, with the upgrade notes listing exceptions such as the switch to version 3.x of Anthropic's Java SDK. New projects can start from start.spring.io.
Readers who followed the preview builds can compare this release with our earlier report on Spring AI 2.1.0-RC2, and with the Spring Boot 4.2.0 release it depends on. Looking ahead, the team plans to start a separate Spring AI Agent project in early December and to ship 2.1.1 with extra MCP client transports during the same month.
Conclusion
Spring AI 2.1.0 turns the preview work of recent months into a stable release, with stateless MCP, typed decisions, richer messages and a proper session layer for agents. The 13 security fixes make the upgrade a priority even for teams that do not need the new features yet.
Sources
See my articles more often when you search Google.
