AI Agents & Agentic Workflows with Spring AI, MCP and Java
Build AI Agents with Java, Spring AI, MCP, OpenAI, Gemini, Ollama, Spring Boot, Tool Calling, Memory & Agentic Workflows
Build AI Agents with Java, Spring AI, MCP, OpenAI, Gemini, Ollama, Spring Boot, Tool Calling, Memory & Agentic Workflows
Build AI Agents and Agentic Workflows using Spring AI, MCP and Java. (Latest Spring Boot 4.X, Spring AI 2.X)
This entire course is about developing our own AI Agents From Scratch. It is a deep-dive, architecture-first masterclass on building production-grade AI Agents and Agentic Workflows using Java, Spring AI and the Model Context Protocol (MCP).
What you will master:
Building AI Agents using Spring AI and Java
Designing Agentic Workflows and multi-turn reasoning systems
Understanding MCP Architecture and communication flow
Implementing MCP Tools, Resources and Prompts
Building Human-in-the-Loop workflows using Elicitation
Handling asynchronous workflows using Progress Notifications
Integrating OpenAI, Gemini and local models using Ollama
Using ChatClient, ChatMemory and Advisors effectively
Implementing Structured Output and Prompt Engineering techniques
Designing AI-Powered Microservices using Spring Boot
Writing Integration Tests for MCP-based systems
Applying real-world AI architecture patterns and implementation best practices
By the end of the course, you will be able to:
Build production-grade AI Agents and Agentic Workflows using Spring AI and Java
Design and implement MCP Servers with Tools, Resources and Prompts
Integrate OpenAI, Gemini and local LLMs into Spring Boot applications
Build context-aware AI systems using ChatMemory, Advisors and Structured Output
Apply production-oriented AI architecture patterns, testing strategies and best practices
Throughout the course, we will build practical, production-style AI systems using Spring Boot, Spring AI and MCP.
FAQ area empty
Introduction to Generative AI
316 Xem trướcUnderstanding LLMs & Core Parameters
145 Xem trướcIntroduction to Ollama
194 Xem trước*** Source Code & GitHub Project Repository ***
Running Ollama Using Docker
165 Xem trướcRunning Models Locally with Ollama
299Creating an OpenAI API Key
509Creating a Gemini API Key
194Introduction to ChatClient
245LLMs Are Non-Deterministic
229Playground Project Structure Discussion
306 Xem trướcPlayground Project Setup
505 Xem trướcFirst LLM Interaction
231Learning Approach: Start Simple
75First LLM Interaction Demo
256Clarification: Which Spring Profile to Use
74Implementing Streaming Responses
293Clarification: Why We Use JUnit for Demos
60LLM Tokens Overview
211OpenAI Tokenizer Demo
87Understanding Metadata, Tokens, and Rate Limits
411OPTIONAL: Max Tokens
391OPTIONAL: Fine-Tuning Creativity with Temperature
205Configuring Default ChatOptions
41Dynamic Model Selection at Runtime
312Configuring Multi-Model Beans
194Working with Multi-Model Providers
337Native Structured Output
364Structured Output: Single Entity Mapping
214Structured Output: Multiple Entity Mapping
179Multiple Entity Mapping: OpenAI Issue and Workaround
174Core Concept: System Prompts
167System Prompt Implementation Demo
210Default System Prompts
52Dynamic Context with Prompt Templates
200Prompt Templates Demo
116COURSE ASSIGNMENT: Movie Recommender Engine
Troubleshooting the Movie Recommendation Issue
81Prompt Engineering: Iterative Refinement
134Movie Recommendation Issue Fix
66Section Summary & Key Takeaways
387Introduction to Advisors
153Custom Advisor Implementation
219Understanding Advisor Parameters
170Simple Logger Advisor
78Understanding Message Roles
280Message Roles Demo
72How ChatMemory Works
360NOTE: Spring AI 2.0 Breaking Change
72ChatMemory Demo
232Why Conversation IDs Matter
162Parallel Conversations Demo
355Section Summary & Key Takeaways
176TalentFlow: Application Overview
283Multi-Module Project Structure Overview
153Exploring Candidate Service
310Exploring Job Service
402Career Advisor: Architecture Discussion
272Career Advisor: Project Setup
136Implementing Job and Candidate Clients
347Career Advisor Prompts
239Clarification: Do we have duplicate tasks?
118Find Jobs API Implementation: Part 1
410Find Jobs API Implementation: Part 2
196Compare Jobs API Implementation
255Generate Resume API Implementation
255Career Advisor Configuration
493Career Advisor: Managing Secrets
122Career Advisor APIs Demo
442Exploring Hiring Service
243Hiring Service: Job Client Implementation
57Hiring Service Prompts
265Hiring Advisor Implementation
278Job Application Submission: Architecture & Design Discussion
166Job Application Submission Implementation
304Job Application Evaluation Implementation
223Fetching Job Applications API Implementation
107Fetching Candidate Applications API Implementation
378Hiring Service Configuration
147Hiring Service APIs Demo
225TalentFlow: Environment Preparation
86TalentFlow: End-to-End Demo
611Section Summary & Key Takeaways
90The Problem: Why We Need the Model Context Protocol (MCP)
206Setting Expectations: Core Protocol Theory
82Protecting Data in MCP
89High-Level MCP Architecture Overview
287Core Capabilities: Understanding MCP Server Features
93MCP Capability Discovery
210Request-Response Lifecycle: MCP Execution Flow
290Clarification: How LLM Executes Tools
138Understanding MCP Transports
184Spring MCP Modules
73MCP Playground: Project Structure Discussion
176MCP Playground: Project Setup
447NOTE: Model Support For Tool Calling
84MCP Properties & Secrets
140Developing Our First MCP Tool
163[OPTIONAL] Introduction To Anthropic MCP Inspector
188[OPTIONAL] Testing Tool Calls with MCP Inspector
201[OPTIONAL] Best Practices: Tool Naming and Descriptions
237Architectural Discussion: Host-Server Tool Integration & Execution
119MCP Host Project Setup
472System Message For Tool Calling
58End-to-End MCP Tool Call Demo
319Multi-Tool Execution Demo
63How LLM Executes Multiple Tool Calls
122Clarification: Tool Execution Response Void Type
77Looking Ahead: The Role of MCP Resources and Prompts
93Section Summary & Key Takeaways
276Section Goal
143Best Practices: Tool Parameter Name and Description
107File Operations Project Setup
221File Operations Demo
411Structured Input From LLM
59Providing Context to AI Models via System Messages
202Structured Input: Practical Demo
182Tool Design Approaches
93Pattern 1: Assistant-Driven Decisions
347Assistant-Driven Decisions: Vulnerability Demo
265Architectural Pitfalls: Why Assistant-Driven Decisions Fail
72Communicating Tool Execution Results
111Pattern 2: Encapsulated Tool Design
208Handling Tool Execution Errors Robustly
141Pattern 3: Encapsulated & Robust Tool Design
98Advanced Context: Passing Metadata to MCP Servers via Meta
184MCP Meta: Project Setup
355MCP Meta: Demo
142Advanced Error Handling via Data-Oriented Programming
101Section Summary & Key Takeaways
215Introduction to Agentic Workflows
221Flight Agent Architecture
160Flight Agent: Project Walkthrough Part 1
365Flight Agent: Project Walkthrough Part 2
331Shaping Agent Behavior via System Message
108Exploring Agent Capabilities via Practical Scenarios
253Flight Agent: Execution Demo Part 1
274Flight Agent: Execution Demo Part 2
179Flight Agent Goal-Driven Orchestration
118Introduction to Progress Notifications
191Core Concept: Understanding Progress Tokens
120How Progress Notifications Work Between Host & Server
235Real-Time Streaming: Exposing Progress Updates via Flux
444How Progress Notifications Work Between Host & UI
162Progress Notification: Project Setup
504End-to-End Progress Notification Demo
141Introduction to Elicitation
215Elicitation Execution Flow Overview
277Collecting Structured User Input
178Architectural Pitfalls: Thread Blocking & Timeout Issues
184Human-in-the-Loop: High-Level Design Discussion
247MCP Server Project Setup
309MCP Host Project Setup
587Elicitation Final Demo
198Introduction to MCP Resources
320Architectural Problem: How MCP Servers Ingest Data
175Core Concept: Designing Custom Resource URIs
250How Resources Work
550Core Concept: Understanding Resource Read Results
97MCP Server Project Setup
639MCP Host Client Component
247MCP Host Project Setup
391Resource Navigation Demo
251LLM Insights via Resources: Integration Demo
236Clarification: How to Compare Resources
76Resource-Related Error Handling
137Section Summary & Key Takeaways
217Introduction to MCP Prompts
259MCP Server Prompt Handlers
170End-to-End Execution Flow
169Enhancing UX: Implementing Auto-Complete for Prompts
265MCP Server: Project Setup
446Clarification: Prompt Message Structure & Roles
181MCP Host: Project Setup
240Context Injection: Prompt Execution Dem0
228Section Summary & Key Takeaways
85Capstone Overview: Analytics Agent
122Security Boundaries: How AI Database Access is Controlled
277System Architecture: High-Level Design Discussion
181MCP Server: Project Setup
394Fault Tolerance: SQL Error Handling for Agents
109MCP Host: Project Setup
318System Scalability: Strategy For Supporting More Tables
72Capstone Execution: Analytics Agent Final Demo
370No prior AI knowledge is required. We will start from the fundamentals with a hands-on approach.
Knowledge of Java and Spring Boot is required.
OpenAI and Gemini APIs may incur small usage costs. Expected cost for this course is approximately 1 USD.
Build AI Agents using Spring AI and Java
Design Agentic Workflows and multi-turn reasoning systems
Implement MCP Servers using Spring Boot
Build and expose MCP Tools, Resources and Prompts
Integrate OpenAI, Gemini and local LLMs using Ollama
Build Human-in-the-Loop workflows using Elicitation
Handle asynchronous workflows using Progress Notifications
Write Integration Tests for MCP-based AI systems
Implement Structured Output and Prompt Engineering techniques
Use ChatClient, ChatMemory and Advisors effectively