Java and Kotlin AI Integration: Spring AI and LangChain4j
For JVM developers who need to add LLM features to Spring Boot, Quarkus and Kotlin services with typed outputs, tools, retrieval, streaming and production-grade testing.
The curriculum is being prepared and reviewed. Enrollment is not open yet.
About this course
Most enterprise backends run on the JVM, and the JVM AI ecosystem has matured fast. Spring AI reached 2.0 on Spring Boot 4 with ChatClient, advisors, structured output and MCP support; LangChain4j offers declarative AI Services across Spring, Quarkus and Micronaut; OpenAI, Anthropic and Google all publish official Java SDKs; and Kotlin developers have JetBrains Koog and Embabel for agent workflows.
This course teaches how to choose and use these tools in real services. You will call providers through the official SDKs and through the frameworks, map model output to Java records and Kotlin data classes, expose methods as tools, and connect to Model Context Protocol servers with the MCP Java SDK. You will build retrieval with vector stores, stream responses with Reactor Flux or Kotlin Flow, and use virtual threads for high-concurrency blocking calls while keeping within provider rate limits. For private or offline workloads you will call Ollama or run ONNX Runtime and DJL models inside the JVM. You will test with mocks, WireMock and Testcontainers' Ollama module, evaluate output quality, and package and deploy with observability through Micrometer and OpenTelemetry. Versions are as of October 2026 (Spring AI 2.0, LangChain4j 1.x, Java 25 LTS, Kotlin 2.4).
What you will be able to do
Choose between the official provider SDKs, Spring AI, LangChain4j and Koog for a given JVM service and justify the choice
Map model output to Java records or Kotlin data classes with structured output and handle conversion failures
Implement tool calling and connect a JVM service to Model Context Protocol servers
Build a retrieval pipeline with a vector store and advisors or retrieval augmentors
Stream responses with Reactor or Kotlin Flow and run high-concurrency calls on virtual threads within rate limits
Run an embedding or classification model in-process with ONNX Runtime or DJL, or a local LLM through Ollama
Test AI-dependent JVM code with WireMock and Testcontainers and deploy it with metrics, tracing and cost controls
Syllabus
6 modules · 18 lessons · about 14 hours
1
Module 1: The JVM AI Landscape
Official SDKs, frameworks and how they fit together.3 lessons
openai-java, anthropic-java and google-genai: the official SDKs
Spring AI and LangChain4j compared: abstractions, integrations and lock-in
Kotlin-first options: Koog and Embabel
2
Module 2: Spring AI in Depth
Building AI features the Spring Boot way.3 lessons
ChatClient, prompts and structured output with entity()
Advisors for memory, retrieval and safety
Tool calling and MCP clients and servers in Spring AI
3
Module 3: LangChain4j in Depth
Declarative AI Services across Spring, Quarkus and Micronaut.3 lessons
AI Services: interfaces, structured outputs and @Tool methods
Retrieval-augmented generation with embedding stores and retrieval augmentors
LangChain4j in Quarkus and Micronaut
4
Module 4: Streaming and Concurrency on the JVM
Responsive services under real load.3 lessons
Streaming with Reactor Flux and server-sent events
Kotlin coroutines and Flow with AI clients
Virtual threads, structured concurrency and rate-limit-aware batching
5
Module 5: Local and In-process Models
Keeping inference on your own infrastructure.3 lessons
Ollama and OpenAI-compatible local servers from Java
ONNX Runtime Java and DJL for embeddings and classifiers inside the JVM
Choosing local versus hosted inference
6
Module 6: Testing, Observability and Deployment
Production readiness for AI-enabled JVM services.3 lessons
Unit and contract tests with mocks and WireMock
Integration tests with the Testcontainers Ollama module and evaluation suites
Micrometer and OpenTelemetry for AI calls, packaging and cost controls
Exam and certificate
The exam unlocks once you have completed every lesson. It draws 20 questions from a larger bank, spread across the modules, with the answer options shuffled for each attempt. You have 40 minutes and need 80% to pass. After a failed attempt you can try again after 24 hours, up to 3 attempts in total. Feedback is given per module, never as the answer key.
Passing earns a certificate of completion and assessment from the Wirewalk Institute of AI with a unique ID that anyone can check at institute.wirewalk.com/verify. It is not an accredited qualification or a vendor certification. How certification works.
The Wirewalk Institute of AI is independent. This course teaches publicly documented products and is not affiliated with or endorsed by Spring (Spring AI), LangChain4j, OpenAI, Anthropic, Google (Gemini), JetBrains (Koog, Kotlin), Embabel, Ollama, ONNX Runtime, Deep Java Library (DJL), Testcontainers, or Model Context Protocol. Product and company names are trademarks of their respective owners.
A free, one-hour, hands-on start built on one realistic job: sorting a property manager's 1,150 monthly maintenance requests. You get an API key the safe way, make real calls with curl and an official Python SDK, run them over forty work orders, read stop reasons, usage and errors, estimate the monthly cost, and decide whether the script is ready. Exercises run on your own provider account for well under a dollar.
A code-first course on integrating LLMs into Python the way production code needs it: uv projects and secrets, the OpenAI, Anthropic and Google GenAI SDKs side by side, async concurrency and streaming, Pydantic structured outputs and tools, retries, local models, embeddings and RAG, FastAPI and pandas integration, testing and evals with pytest, observability, cost tracking and deployment.
Call OpenAI, Anthropic, Gemini and local Ollama models from Perl with real CPAN modules, add streaming, concurrency and validated JSON output to text pipelines, and use AI coding assistants to modernize legacy Perl behind characterization tests.