Get ahead
VMware offers training and certification to turbo-charge your progress.
Learn moreThis blog post is a continuation of our previous article Using Spring AI 1.0.0-SNAPSHOT: Important Changes and Updates, where we introduced the significant changes to artifact IDs, dependency management, and autoconfiguration in Spring AI 1.0.0-SNAPSHOT.
Since publishing that article, the Spring team has released an updates to the snapshots, In this follow-up article, we'll explore the latest changes and provide additional guidance for developers working with the snapshot versions. For comprehensive details, refer to the Spring AI Upgrade Notes.
As of April 4, 2025, the main branch has undergone significant changes to the module and artifact structure. Previously, spring-ai-core
contained all central interfaces, but this has now been split into specialized domain modules to reduce unnecessary dependencies in your applications.
Some classes have moved to new packages:
ContentFormatTransformer
and KeywordMetadataEnricher
moved from org.springframework.ai.transformer
to org.springframework.ai.chat.transformer
Content
, MediaContent
, and Media
moved from org.springframework.ai.model
to org.springframework.ai.content
Base module with no dependencies on other Spring AI modules. Contains:
Document
, TextSplitter
)Provides AI capability abstractions:
ChatModel
, EmbeddingModel
, and ImageModel
ToolDefinition
, ToolCallback
)Unified vector database abstraction:
VectorStore
interface for similarity searchSimpleVectorStore
for in-memory usageHigh-level conversational AI APIs:
ChatClient
interfaceChatMemory
OutputConverter
Bridges chat with vector stores for RAG:
QuestionAnswerAdvisor
: injects context into promptsVectorStoreChatMemoryAdvisor
: stores/retrieves conversation historyApache Cassandra persistence for ChatMemory
:
CassandraChatMemory
implementationNeo4j graph database persistence for chat conversations.
Comprehensive framework for Retrieval Augmented Generation:
RetrievalAugmentationAdvisor
as main entry pointThe new dependency structure follows this pattern:
spring-ai-commons
(foundation)spring-ai-model
(depends on commons)spring-ai-vector-store
and spring-ai-client-chat
(both depend on model)spring-ai-advisors-vector-store
and spring-ai-rag
(depend on both client-chat and vector-store)spring-ai-model-chat-memory-*
modules (depend on client-chat)To migrate your existing Spring AI applications:
spring-ai-core
directly, replace with the appropriate new modulesThese changes represent a significant improvement in the Spring AI architecture, allowing for more targeted dependencies and cleaner separation of concerns. By breaking the monolithic core into domain-specific modules, applications can now include only the functionality they need, resulting in smaller deployments and clearer boundaries between components.
For more details, refer to the official Spring AI documentation.