Use Spring AI to add generative AI features like virtual assistants, text summaries, and suggestions to your Java applications.
No matter what kind of software you’re building, there’s a huge demand for AI features! Until recently, though, Java developers have had few good tools for adding AI features to existing and new applications. Spring AI, an exciting new extension for Spring and Spring Boot, changes the equation. Spring AI provides generative AI capabilities natively within the framework, so you can stick with Java end-to-end. Spring AI in Action shows you how!
In Spring AI in Action you will:
Learn Spring AI from the ground up!
Create text summaries, virtual assistants and more in Spring Boot applications
RAG and other techniques to improve LLM responses
Text from images and images from text
Spring AI makes it much, much easier to add generative AI features to Spring applications. With this powerful framework extension, you can write familiar Java code to build AI features like virtual assistants, text summaries, and smart search suggestions.
About the Technology When it comes to AI applications, no Python, no problem! The Spring AI framework makes it possible to add LLM-based features to any Spring application using Java or other JVM languages like Kotlin. From setting up Retrieval Augmented Generation (RAG) to creating AI agents, Spring AI is fast, powerful, and instantly familiar.
About the Book In Spring AI in Action, bestselling author Craig Walls shows you how to build AI applications natively using Spring AI and Spring Boot. You’ll start with a simple “Hello AI World” example and quickly advance to more sophisticated techniques, including RAG, AI agents, tool use, speech, and AI observability. You’ll see Craig’s practical example-driven approach—with a relentless emphasis on getting stuff done.
What's Inside
Learn Spring AI from the ground up!
Create text summaries, virtual assistants and more
RAG, agents, and multimodal AI
Chat and conversational memory
AI tool use
About the Reader For Spring developers. No Generative AI skills required.
About the Author Craig Walls is a principal engineer, a member of the Spring engineering team, and a frequent conference speaker. He is the author of Spring in Action, the bestselling book ever published on Spring Framework.
Quotes Clearly explains key topics with approachable examples. - From the Foreword by Rod Johnson
A real treasure trove of new technologies and ideas. - Hermann L. Woock, oose eG
Extensive knowledge, clear-cut explanations, and wonderful demos. - Dan Vega, Broadcom
Well written and loaded with pragmatic examples! - John Thompson, Spring Framework Guru
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.
O’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
I wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
I’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
I'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.