News

Spring AI 2.0 Goes GA, Giving Java Developers a More Mature AI App Stack

Spring AI 2.0 has reached general availability, marking a broader maturation point for Java developers building generative AI applications inside the familiar Spring ecosystem.

Spring is a Java application framework that changes normal Java development by letting developers write business classes as simple components while Spring automatically wires dependencies, configures infrastructure such as web servers, databases, transactions and security, and supplies production-ready plumbing that would otherwise require a lot of manual code.

The new release, announced by the Spring team, is not simply another AI model wrapper. It is part of the larger Spring strategy of giving enterprise Java developers common abstractions, auto-configuration, production features and portability across infrastructure choices. In this case, the infrastructure choices include large language models, vector databases, chat memory stores, tool-calling systems and Model Context Protocol (MCP) integrations.

Spring AI 2.0
[Click on image for larger view.] Spring AI 2.0 (source: Microsoft).

The broader Spring ecosystem is the long-running Java application platform behind Spring Framework, Spring Boot, Spring Data, Spring Security, Spring Cloud and many other projects. Spring Framework supplies the core programming model, especially dependency injection and application wiring. Spring Boot adds convention-based setup, auto-configuration, starters, embedded servers and production features so developers can create stand-alone applications without hand-assembling every dependency and configuration file.

Spring AI applies that same philosophy to AI engineering. Rather than making Java developers directly code against every model provider, embedding API, vector database and tool-calling mechanism, Spring AI gives them common APIs and Boot-friendly configuration. The Spring AI reference documentation says the project is intended to streamline AI app development "without unnecessary complexity" and addresses the core integration challenge of "Connecting your enterprise Data and APIs with AI Models."

From Python-Inspired To Spring-Native
Spring AI was inspired by Python-first AI frameworks such as LangChain and LlamaIndex, but the project has been clear that it is not trying to be a direct port. The documentation says the project was founded on the belief that the next wave of generative AI apps will not be "only for Python developers."

That positioning is important because many enterprise development teams are not starting from a blank Python notebook. They already have Java services, Spring Boot APIs, relational databases, security layers, observability pipelines, cloud deployments and CI/CD practices. Spring AI is for those teams: Java and Spring developers who want to add chat, retrieval-augmented generation (RAG), agents, tools, embeddings or AI-powered user experiences to existing application architectures.

Spring AI 1.0, which went GA in May 2025, established that baseline with portable APIs for chat models, embeddings, vector stores, structured output, tool/function calling, chat memory, RAG and Spring Boot starters. It gave Java developers a first stable Spring-style way to build AI applications with model providers and vector databases without writing all the glue code themselves.

Spring AI 2.0 is about hardening and reorganizing that foundation. The Spring team said the project had grown quickly in features, model support, users and contributions, prompting a reset around "scope, quality and consistency." The new release has been designed for Spring Boot 4.0/4.1 and Spring Framework 7.0, brings null-safety annotations across the codebase, improves JSON serialization handling and refactors options and configuration so developers get more consistent behavior across models and applications.

The GitHub release notes also show the kind of work that often matters more in production than flashy demos: updated Google GenAI models, OpenAI tool-call metadata preservation, fixes in chat memory repositories, updated documentation, upgrade notes and dependency updates including Spring Boot 4.1.0 and MCP SDK 2.0.0.

Agentic AI Gets A Cleaner Foundation
The biggest conceptual change in Spring AI 2.0 is how it handles agentic behavior.

In AI app development, "agents" generally refer to systems that can reason through a task, call tools, fetch data, use memory and perform multi-step actions instead of simply answering one prompt. In Spring AI terms, those tools may be ordinary Java methods exposed to the model. For example, an application could let a model call a product lookup service, query a support-ticket system or retrieve a customer order status.

In Spring AI 1.x, the Spring team said tool calling was harder to build on because each chat model had its own private tool-calling loop. The 2.0 release moves that loop into the advisor chain used by the ChatClient API, making it a first-class, composable part of the framework. As the announcement puts it: "You could call tools; you could not build on top of tool calling."

That change gives developers a cleaner place to intercept, customize, observe and compose agent behavior. Spring AI 2.0 auto-registers ToolCallingAdvisor with ChatClient to handle the full tool-call round trip, while still allowing developers to opt out and manually control each iteration when needed.

The release also adds ToolSearchToolCallingAdvisor, which is intended for applications with many available tools. Instead of sending every tool definition with every model request, the advisor supports progressive tool disclosure by indexing the full tool set once per session and letting the model retrieve relevant tools as needed. That is a practical scaling feature for enterprise apps where a model may have access to dozens or hundreds of business functions.

Structured output also gets a production-oriented improvement. Spring AI has supported mapping model output to Java objects, but models can still return malformed or non-conforming JSON. Spring AI 2.0 adds StructuredOutputValidationAdvisor, which can self-correct after validation failures.

MCP Moves Into The Main Story
Spring AI 2.0 also strengthens support for Model Context Protocol, the emerging protocol for connecting AI systems to external tools, resources and prompts.

The Spring team says it builds and maintains the official MCP Java SDK, and Spring AI 2.0 ships with MCP Java SDK 2.0.0. The release folds MCP annotations into Spring AI, including @McpTool, @McpResource and @McpPrompt, so a Spring service can expose capabilities to an MCP server through method annotations.

That fits the larger Spring pattern: take something that could otherwise require custom integration code and wrap it in a familiar programming model. For Java teams, MCP support means Spring services can participate in the growing AI tool ecosystem while still using Spring MVC, WebFlux, security, observability and configuration patterns.

Azure Cosmos DB Gets Vendor-Backed Spring AI Modules
Microsoft is also using the Spring AI 2.0 release to highlight new Azure Cosmos DB integrations for Java AI apps.

Those integrations are now maintained by Microsoft rather than the core Spring AI team, a change the Spring AI announcement called out as part of a broader move toward vendor-maintained modules. Microsoft said the Azure Cosmos DB repository ships four modules: a vector store backed by Azure Cosmos DB, Spring Boot auto-configuration for that vector store, a ChatMemoryRepository implementation for durable conversation memory and auto-configuration for that chat memory repository.

The practical significance is that Spring AI apps can use Azure Cosmos DB as both an operational database and an AI persistence layer. The vector store stores document embeddings and performs similarity search using DiskANN-powered indexing, while the chat memory repository stores long-term conversation history. Microsoft’s Spring AI Cosmos DB documentation emphasizes that the modules work with Spring AI’s standard abstractions, so developers can swap implementations without changing application code.

For Azure-focused Java developers, that turns Cosmos DB into an option for RAG, agent memory and operational data in the same application stack. Microsoft said the modules support keyless authentication through DefaultAzureCredential, configurable vector index types and Spring Boot auto-configuration.

What It Means For Developers
Spring AI 2.0 is best understood as a sign that AI development is becoming another mainstream enterprise application concern, not a separate experimental track.

For Java developers, it offers an alternative to building AI apps exclusively with Python-first frameworks or manually coding against each provider SDK. For Spring Boot teams, it means AI capabilities can be added using familiar ideas: starters, auto-configuration, dependency injection, templates, advisors, annotations, repositories and observability.

The release does come with migration work. The upgrade notes document breaking changes from Spring AI 1.1.x to 2.0.0, including renamed modules, moved classes and changes around advisors and tool search. Teams already using Spring AI 1.x should treat 2.0 as a meaningful upgrade rather than a drop-in patch.

Still, the direction is clear. Spring AI 1.0 made Java AI applications a stable Spring project. Spring AI 2.0 makes the framework more consistent, more agent-ready and more aligned with Spring Boot 4 and MCP. For enterprise Java shops, that means generative AI can increasingly be treated as part of the standard application stack -- not a sidecar written in another language, but another set of capabilities wired into Spring.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Spring AI 2.0 Goes GA, Giving Java Developers a More Mature AI App Stack

    Spring AI 2.0 advances the Java framework for generative AI apps with a Spring Boot 4 baseline, cleaner agentic tooling, Model Context Protocol support and vendor-backed integrations including Azure Cosmos DB.

  • Kubernetes for Developers

    Microsoft's Dan Wahlin previews his introductory "Kubernetes for Developers" session at Visual Studio Live! San Diego 2026, explaining how developers can get past the Kubernetes learning curve by starting locally, mastering Pods first, and using Services to make containerized applications reliably accessible.

  • VS Code Keeps Eye on Costs in v1.126 Update

    Visual Studio Code 1.126 adds session-level Copilot cost information, continuing Microsoft's recent focus on helping developers monitor and manage usage-based GitHub Copilot billing.

  • Open VSX 1.0.0 Puts Focus on Open Extension Registry for VS Code Ecosystem

    Eclipse Open VSX has reached 1.0.0, highlighting its role as a vendor-neutral registry for VS Code-compatible extensions.

Subscribe on YouTube