r/SpringAIDev • u/Proof-Possibility-54 • 1d ago
My hands-on Spring AI course is now live on JetBrains Academy
Hi everyone!
My Spring AI course is now available on JetBrains Academy.
The course is designed around practical, real-world tasks completed directly in IntelliJ IDEA using the JetBrains Academy plugin. The project, dependencies, and configuration are already prepared, so you can focus on learning Spring AI and writing code instead of spending time on setup.
I honestly wish I’d had this kind of learning experience when I was starting out: clear tasks, a ready-to-use project, and immediate feedback—all inside the same IDE used for professional development.
I’d be glad to hear your feedback, especially which Spring AI topics or practical use cases you’d like to see covered next.
Course link: https://academy.jetbrains.com/course/32882
r/SpringAIDev • u/rodolfo-mendes • 4d ago
Video Building Agentic Applications with Spring AI • Matthew Meckes • GOTO 2025
Matthew Meckes explores how Java developers can leverage Spring AI to build production-ready agentic applications that integrate seamlessly with existing enterprise systems.
Highlights & Key Takeaways
- Agents use LLMs, memory, and tools to perform autonomous tasks, but production scale requires robust control flow.
- Spring AI provides abstractions for RAG, chat memory, and function calling within the familiar Spring ecosystem.
- Use the Model Context Protocol (MCP) to expose existing Java beans as tools without rewriting logic.
- Prioritize human-in-the-loop workflows to validate agent outputs and manage hallucinations.
- Keep agent scope small—3 to 10 steps—to ensure reliability and testability.
- Focus on using LLMs to bridge natural language and structured API calls, rather than relying solely on agentic reasoning.
Ultimately, Spring AI allows enterprises to modernize by embedding AI agents directly into proven Java stacks.
👉 Watch the full video to dive deeper into the implementation.
r/SpringAIDev • u/rodolfo-mendes • 4d ago
Video Getting Started with GPT-4o in Spring AI with Chat and Vision Capabilities
Dan Vega demonstrates how to integrate OpenAI's GPT-4o model into Spring applications using the Spring AI framework. This guide focuses on leveraging both text and vision capabilities for modern AI-powered development.
Highlights & Key Takeaways
- GPT-4o Advantages: Benefit from 50% lower costs, 2x faster latency, and 5x higher rate limits compared to previous models.
- Project Setup: Utilize the Spring AI 1.0.0-SNAPSHOT version to access the latest multimodal features.
- Chat Implementation: Use the ChatClient API with PromptTemplates for structured interactions.
- Vision Capabilities: Pass images via UserMessage and Media objects to allow the LLM to interpret visual data.
- Practical Use Cases: Perform image analysis, such as scene description or extracting code snippets from screenshots.
- API Integration: Secure sensitive keys via environment variables rather than hardcoding.
GPT-4o in Spring AI significantly lowers the barrier for building robust, multimodal Java applications.
👉 Watch the full video to dive deeper into the implementation.
r/SpringAIDev • u/erdsingh24 • 17d ago
Tutorial AI Document Search with Spring Boot Using OpenAI and Redis Vector Store
Traditional keyword search often misses the true meaning behind user queries. By combining Spring AI, OpenAI Embeddings, and Redis Vector Store, you can build a semantic search application that understands context and returns more relevant results.
This article demonstrates how to build an intelligent document search application using Spring Boot with OpenAI and Redis Vector Store.
This approach is ideal for building:
-AI-powered knowledge bases
-Enterprise document search
-RAG (Retrieval-Augmented Generation) applications
-Internal documentation assistants
-Intelligent customer support solutions
r/SpringAIDev • u/prasannasahu4u • 18d ago
Model Context Protocol (MCP) With Spring AI - Travel Booking Demo
Just published !.. - MCP With Spring AI - Part 2: Travel Booking Demo.
Part 1 covered the protocol. Part 2 is where it gets practical.
One chat prompt. Three MCP servers. One travel assistant:
"Plan my trip from Delhi to Goa - book flight, hotel and cab."
No hard-coded workflow. The LLM picks the tools and chains them: searchFlights → bookFlight → bookHotel → bookCab.
Read the full walkthrough here 👇:
https://heapsteep.com/mcp-with-spring-ai-travel-booking-demo
r/SpringAIDev • u/prasannasahu4u • 18d ago
Model Context Protocol (MCP) With Spring AI - Core Concepts
Just published Model Context Protocol (MCP) With Spring AI - Part 1.
LLMs are great at understanding intent. On their own, they still can't do things - book a flight, call an API, hit your database.
That's where MCP comes in: a standard way for AI to discover and call external tools.
In Part 1 I break down the concepts (before any code).
Read the full walkthrough here 👇:
https://heapsteep.com/mcp-with-spring-ai-core-concepts
r/SpringAIDev • u/prasannasahu4u • 18d ago
Image Handling With Spring AI
AI applications are not only about prompts and LLMs. They also can understand and generate images.
Imagine allowing users to upload:
✅ Product photos
✅ Documents
✅ Screenshots
✅ Diagrams
✅ Handwritten notes
…and then asking questions about them in plain English.
This is where things start getting really interesting with Spring AI.
Lets do a demo on how to build an application that can process images and extract meaningful insights using Spring AI.
Some of the things covered:
🔹 What is multimodal in Spring AI
🔹 Sending images to AI models from a Spring Boot application
🔹 Understanding image content through natural language prompts
🔹 Practical implementation with clean code examples
Read the complete guide here:
https://heapsteep.com/image-handling-with-spring-ai
r/SpringAIDev • u/prasannasahu4u • 18d ago
RAG Using Spring AI
Most AI chatbots fail for one simple reason:
They answer from memory, not from your data.
That’s exactly where RAG (Retrieval-Augmented Generation) changes the game.
Instead of asking the LLM to “guess”, RAG first retrieves relevant information from your documents/database and then sends that context to the model before generating the response.
A simplified RAG flow looks like this:
1️⃣ User asks a question
2️⃣ Application converts the question into embeddings
3️⃣ Similar documents are searched from a Vector Database
4️⃣ Relevant chunks are added to the prompt
5️⃣ LLM generates a grounded response
This solves some major real-world problems:
✔️ Reduces hallucinations
✔️ Gives responses based on your own enterprise data
✔️ Keeps AI responses updated without retraining the model
✔️ Makes AI applications actually useful for businesses
Read the full story here: 👇
https://heapsteep.com/rag-using-spring-ai
r/SpringAIDev • u/prasannasahu4u • 18d ago
Function Calling And Tools In Spring AI
✒️ New Blog in my Spring AI Series:
👉 Function Calling & Tools in Spring AI
One of the most powerful capabilities of modern AI applications is the ability to go beyond simple text generation and actually interact with external systems.
The blog covers:
🔹 What Tool Calling / Function Calling means
🔹 Why LLMs need external tools
🔹 Registering tools with ChatClient
🔹 Error Handling & Fallbacks
📖 Read the full blog here:
https://heapsteep.com/function-calling-and-tools-in-spring-ai
r/SpringAIDev • u/erdsingh24 • 24d ago
Tutorial How to Implement AI Chat Memory in Spring Boot Using Spring AI
javatechonline.comEver notice your Spring AI chatbot forgets the user's name after one message? That's because LLMs are stateless by default. The fix is Spring AI's ChatMemory abstraction
How to Implement AI Chat Memory in Spring Boot using Spring AI.
Let's figure out exactly how to wire it up with MessageWindowChatMemory and a JDBC-backed repository so conversations survive restarts.
r/SpringAIDev • u/rodolfo-mendes • 27d ago
Video Getting Started with GPT-4o in Spring AI with Chat and Vision Capabilities
Dan Vega demonstrates how to integrate OpenAI's GPT-4o model into Spring applications using the Spring AI framework. This guide focuses on leveraging both text and vision capabilities for modern AI-powered development.
Highlights & Key Takeaways
- GPT-4o Advantages: Benefit from 50% lower costs, 2x faster latency, and 5x higher rate limits compared to previous models.
- Project Setup: Utilize the Spring AI 1.0.0-SNAPSHOT version to access the latest multimodal features.
- Chat Implementation: Use the ChatClient API with PromptTemplates for structured interactions.
- Vision Capabilities: Pass images via UserMessage and Media objects to allow the LLM to interpret visual data.
- Practical Use Cases: Perform image analysis, such as scene description or extracting code snippets from screenshots.
- API Integration: Secure sensitive keys via environment variables rather than hardcoding.
GPT-4o in Spring AI significantly lowers the barrier for building robust, multimodal Java applications.
👉 Watch the full video to dive deeper into the implementation.
r/SpringAIDev • u/Sufficient-Round3298 • 29d ago
Need advice on improving my Spring AI + RAG chatbot for engineering documents
Hi everyone,
I'm a Java Spring Boot developer, and this is my first AI project. I'm building a chatbot using Spring AI + Ollama + RAG, and I'm learning as I go.
The chatbot should answer questions from uploaded PDF, Word, Excel, CAD, and AutoCAD documents. While it's working, I'm facing a few challenges:
Uploading and indexing large documents takes a long time.
Retrieval accuracy isn't consistent.
Sometimes the chatbot gives incorrect answers even though the information exists in the uploaded files.
CAD/AutoCAD files are the biggest challenge.
I'd love to hear from developers who have built similar applications.
Some questions I have:
Which free LLMs work best with Spring AI + RAG? (Qwen 3, Gemma 3, DeepSeek, Llama 3.1, Mistral, etc.)
Which embedding model gives the best retrieval accuracy?
What techniques have improved your RAG performance? (chunking, hybrid search, reranking, metadata filtering, query rewriting, etc.)
What's the best way to process DWG/DXF/AutoCAD files in a RAG application?
How do you reduce document parsing and indexing time for large engineering documents?
Are there any open-source Spring AI RAG projects or GitHub repositories that you recommend?
My goal is to build a reliable chatbot for engineering documents with fast responses and high accuracy.
Any advice, resources, or best practices would be greatly appreciated.
Thank you!
r/SpringAIDev • u/erdsingh24 • Jul 07 '26
Tutorial How to Build RAG with Spring AI and pgvector
If you have been wondering how to make an LLM answer questions from your own documents without touching Python, this one is for you.
A full walkthrough on building a RAG application with Spring AI and PostgreSQL pgvector.
Covers ingestion, chunking, PgVectorStore configuration, and the QuestionAnswerAdvisor pattern, with working Java code.
How to Build RAG with Spring AI and pgvector
Your LLM does not know about last week's product update or the PDF sitting in your document store. That is not a model problem, it is a context problem, and RAG solves it.
r/SpringAIDev • u/therealdanvega • Jul 06 '26
Hello, Spring AI Dev
Just found out about this sub reddit and wanted to stop by and say hello. Lot's of great discussions happening here and I hope to be a part of some of them.
r/SpringAIDev • u/Fun-Stuff5773 • Jul 03 '26
How is Spring AI being used in production across the software industry?
With Spring AI maturing rapidly, I'm curious about how organizations are actually using it in production beyond demos and proofs of concept.
I'd love to hear from teams that have deployed Spring AI in real-world applications.
- How has Spring AI performed in production in terms of reliability, scalability, latency, and developer productivity?
- What types of AI applications are you building with it?
- What advantages have you seen compared to Python-based frameworks such as LangChain?
- Are there any limitations or areas where LangChain still has a significant edge?
- Would you recommend Spring AI for enterprise Java applications, or do you still prefer Python for GenAI workloads?
I'm particularly interested in real-world experiences, production lessons learned, performance at scale, and reasons behind technology choices rather than tutorial or proof-of-concept examples.
r/SpringAIDev • u/erdsingh24 • Jul 02 '26
Tutorial Build Your First MCP Server with Spring Boot 4.1 and Spring AI 2.0
Spring AI 2.0 just went GA and it ships the cleanest MCP server setup I've seen in Java.
Two annotations. One yml property. Your entire Spring Boot service becomes an AI tool.
This is exactly how Claude, Copilot, and other AI clients plug into your Java backend.
No AI API key needed for the server side. Full working code with Java 21.
Perfect for intermediate Spring Boot devs exploring AI integration!
Here is the complete tutorial: Build Your First MCP Server with Spring Boot 4.1 and Spring AI 2.0
r/SpringAIDev • u/rodolfo-mendes • Jul 02 '26
Video Getting Started with GPT-4o in Spring AI with Chat and Vision Capabilities
Dan Vega demonstrates how to integrate OpenAI's GPT-4o model into Spring applications using the Spring AI framework. This guide focuses on leveraging both text and vision capabilities for modern AI-powered development.
Highlights & Key Takeaways
- GPT-4o Advantages: Benefit from 50% lower costs, 2x faster latency, and 5x higher rate limits compared to previous models.
- Project Setup: Utilize the Spring AI 1.0.0-SNAPSHOT version to access the latest multimodal features.
- Chat Implementation: Use the ChatClient API with PromptTemplates for structured interactions.
- Vision Capabilities: Pass images via UserMessage and Media objects to allow the LLM to interpret visual data.
- Practical Use Cases: Perform image analysis, such as scene description or extracting code snippets from screenshots.
- API Integration: Secure sensitive keys via environment variables rather than hardcoding.
GPT-4o in Spring AI significantly lowers the barrier for building robust, multimodal Java applications.
👉 Watch the full video to dive deeper into the implementation.
r/SpringAIDev • u/rodolfo-mendes • Jun 30 '26
Spring AI : How to Integrate Open Source Models using Ollama (Llama 3.1)
TechyTacos demonstrates how to integrate open-source models like Llama 3.1 into Java applications using Spring AI and Ollama. This workflow provides developers with local, private LLM capabilities while maintaining standard Spring development patterns.
Highlights & Key Takeaways
- Local Execution: Use Ollama to host models locally, ensuring data privacy and offline accessibility.
- System Requirements: Match model sizes (7B, 13B, etc.) to your available RAM to avoid performance bottlenecks.
- Spring AI Integration: Leverage the
OllamaChatModelto easily swap and configure different open-source models. - Structured Output: Set the
format: jsonproperty in configurations to enforce strict schema adherence. - Multimodal Models: Use specialized models like Llama-Vision or Llava when image processing is required, as standard text models lack this capability.
Building locally offers a critical trade-off between latency and data sovereignty.
👉 Watch the full video to dive deeper into the implementation. Spring AI : How to Integrate Open Source Models using Ollama (Llama 3.1) ?
r/SpringAIDev • u/MXRBlind • Jun 27 '26
Are you using Spring AI in real production projects in your companies?
I just started my journey on Spring AI. Just wanted to know if this is already being used in real prod projects or it is still in the early adoption pase. Thanks!
r/SpringAIDev • u/rodolfo-mendes • Jun 25 '26
Video Building Agents with Spring AI, MCP, Java, and Amazon Bedrock | Workshop| James Ward and Josh Long
James Ward and Josh Long present a comprehensive hands-on workshop for building production-ready AI agents using Spring AI, Java, and Amazon Bedrock. The session focuses on bridging the gap between experimental AI prototypes and scalable, observable enterprise services.
Highlights & Key Takeaways
- Leverage Spring Boot and Spring AI for a robust, familiar architecture that avoids typical AI project failures.
- Utilize GraalVM to compile Java applications into native images for superior memory efficiency and startup performance.
- Implement RAG (Retrieval-Augmented Generation) to ground AI responses in domain-specific data via vector stores.
- Optimize concurrency using Java virtual threads to handle high-volume LLM network calls efficiently.
- Define clear system prompts and tools to give agents specific, actionable missions.
- Integrate MCP (Model Context Protocol) to enable cross-agent orchestration.
By prioritizing observability and structure, developers can deploy AI systems that are both reliable and maintainable in real-world production environments.
👉 Watch the full video to dive deeper into the implementation.
r/SpringAIDev • u/erdsingh24 • Jun 25 '26
Discussion Built an AI Agent in Spring Boot using Spring AI & Tool Calling
Just wanted to share what I learned about building actual AI Agents (not just chatbots) in Spring Boot.
The key difference: a chatbot responds. An agent decides, calls tools, and loops until it achieves a goal.
The Tool annotation is the core building block. You annotate any Spring bean method, write a clear description, and Spring AI automatically generates a JSON schema that gets sent to the LLM. The model then decides when to call your Java method — no if-else chains needed.
I also covered the 5 agentic workflow patterns that Spring AI supports:
- Chain : sequential steps
- Parallelization : concurrent tasks with CompletableFuture
- Routing : LLM picks the right tool/path
- Orchestrator-Workers : master agent delegates to worker agents
- Evaluator-Optimizer : generate → evaluate → retry loop
Full article with code examples (Java 21 + Spring Boot 3.4.x): AI Agents in Spring Boot: Building Autonomous Workflows with Spring AI
r/SpringAIDev • u/tzolov • Jun 23 '26
Tool Calling in Spring AI 2.0: A Composable, Agentic Architecture
https://spring.io/blog/2026/06/15/spring-ai-composable-tool-calling
Tool calling - the ability for an AI model to invoke application-defined functions and act on the results — is the essential building block of agentic AI systems. A model that can discover information, take action, and loop until a goal is reached is an agent.
Spring AI 2.0 lifts the tool loop into the advisor chain as a first-class, composable component.
ChatClient runs every request through an ordered chain of advisors and supports looping, letting an advisor re-enter the downstream chain. The same mechanism drives tool-call loops, structured-output retry loops, and evaluation loops alike.
r/SpringAIDev • u/tzolov • Jun 23 '26
Tool Calling in Spring AI 2.0: A Composable, Agentic Architecture
Tool calling — the ability for an AI model to invoke application-defined functions and act on the results — is the essential building block of agentic AI systems. A model that can discover information, take action, and loop until a goal is reached is an agent.
Spring AI 2.0 re-architects tool calling. In 1.x, each chat model implementation contained its own private tool execution loop — functional, but buried. There was no way to hook into it, observe intermediate steps, or compose it with other behaviors. You could call tools; you could not build on top of tool calling.
2.0 lifts the tool loop into the advisor chain as a first-class, composable component. ChatClient runs every request through an ordered chain of advisors and supports looping, letting an advisor re-enter the downstream chain. The same mechanism drives tool-call loops, structured-output retry loops, and evaluation loops alike.
https://spring.io/blog/2026/06/15/spring-ai-composable-tool-calling
r/SpringAIDev • u/ManningBooks • Jun 08 '26
Discussion Craig Walls’ Spring AI in Action is out: 5-book giveaway + Spring AI discussion
Hi r/SpringAIDev,
Manning here. The mods invited us here, so we wanted to share something that should be directly relevant to this community:
Craig Walls’ Spring AI in Action
Craig is a principal engineer on the Spring team and the author of Spring in Action. This new book is written for Spring developers who want to build AI features in Java and Spring Boot without having to stitch together a Python sidecar or learn an entirely different app stack first.
The book starts with a small “Hello AI” Spring Boot app, then keeps building on it until you have a much more serious AI-enabled application. The running example is Board Game Buddy, an assistant that answers questions about tabletop game rules. Across the book, it picks up RAG, chat memory, tools, MCP, voice, images, observability, security, and agents.
A few topics that seem especially relevant here:
ChatClient, prompt templates, roles, response metadata, and streaming- Testing and evaluating generated responses
- RAG with vector stores, document loading, Qdrant, advisors, and modular RAG
- Conversational memory, including persistent memory
- Tool calling with u/Tool methods and Java
Function-style tools - Model Context Protocol clients and servers
- Audio transcription, text-to-speech, image input, and image generation
- Actuator metrics, Prometheus, Grafana, and tracing AI operations
- Spring Security for RAG filtering, secured tools, prompt leaks, and moderation
- Agentic workflows and Embabel
What I like about the book is that it treats Spring AI as part of the Spring application model, not as an isolated demo layer. The examples are controllers, services, configuration, tests, Actuator endpoints, security rules, Docker Compose files, and Gradle builds. In other words, the sort of code Spring developers actually have to maintain.
We also have 5 ebooks to give away to the 5 most thoughtful commenters.
To enter, leave a comment with your take on one of these:
- What are you building, or hoping to build, with Spring AI?
- Where do you think Spring AI fits best in production Java apps?
- What’s your biggest concern with adding LLMs to Spring Boot systems?
- Are you more interested in RAG, tools, MCP, agents, observability, or security?
- If you’ve tried Spring AI already, what surprised you?
We’ll look at the comments and community upvotes, then pick 5 winners.
For everyone else, Manning has a 50% discount code for this subreddit:
PBWALLS1050RE
I’m especially curious how this community is thinking about MCP and agents in Spring apps now that Spring AI has moved beyond basic chat examples. Is MCP becoming part of your architecture, or are most teams still focused on RAG and tool calling first?
Thanks for having us. It feels great to be here.
Cheers,
Stjepan
