Example applications showing how to use Spring AI to build Generative AI projects.
You need the following software installed: Java 21+, docker, ollama, httpie, and your favourite Java IDE. This is a lot of GBs to download so please make sure to have all this stuff installed before the conference workshop, as the conference wifi may be slow, so you might not be able to run the samples.
ollama makes running models on your laptop easy and very educational. You can run the models locally and learn how they work.
Please make sure that the software list above is installed on your laptop before the workshop starts. After install:
./download-deps.sh script pull local AI models, and container
images.check-deps.sh script to check that the all the required
software is installed, the output of the script on my machine looks like../check-deps.sh
============================
Checking Java installation:
============================
✅ Java is installed. Version details:
openjdk version "25" 2025-09-16 LTS
OpenJDK Runtime Environment Temurin-25+36 (build 25+36-LTS)
OpenJDK 64-Bit Server VM Temurin-25+36 (build 25+36-LTS, mixed mode, sharing)
===============================
Checking Ollama installation:
===============================
✅ Ollama is installed. Version details:
ollama version is 0.12.0
========================================
Checking if llama3.2 model is pulled:
========================================
✅ llama3.2 model is pulled and available.
========================================
Checking if mxbai-embed-large model is pulled:
========================================
✅ mxbai-embed-large model is pulled and available.
========================================
Checking if llava model is pulled:
========================================
✅ llava model is pulled and available.
==============================
Checking Docker installation:
==============================
✅ Docker is installed. Version details:
Docker version 28.1.1, build 4eba377
Checking Docker image: pgvector/pgvector:pg17
✅ Docker image pgvector/pgvector:pg17 is pulled.
Checking Docker image: dpage/pgadmin4:9.8.0
✅ Docker image dpage/pgadmin4:9.8.0 is pulled.
===============================
Checking HTTPie installation:
===============================
✅ HTTPie is installed. Version details:
3.2.4
If you run into issues try running the commands in the check-deps.sh
script one at a time.
You will be provided with API keys for online AI services during the workshop, these keys will only be valid during the workshop. Highly recommend you get your own keys to continue experimenting after the workshop.
Generative AI is a transformational technology impacting our world in profound ways and creating unprecedented opportunities. This workshop is designed for Spring developers looking to add generative AI to existing applications or to implement brand new AI apps using the Spring AI project.
We assume no previous AI experience. The workshop will teach you key AI concepts and how to apply them in your applications, using the Spring AI project.
The workshop is hands-on. Bring your laptop and a willingness to learn. We will provide Spring AI based sample code and the API keys for the AI services. By the end of the day you will know how to add generative AI features to your Spring apps.
Spring AI provides a consistent API to work with many different types of AI providers. For example, the same code wil work with OpenAI, Google Vertex AI, Azure OpenAI, and local AI models. The major directories in this repo are:
/components/data/ this directory contains various types of example data sets used by the examples in the repo.
/components/api/ this directory contains the code that interacts with the AI providers. The code in this directory is the same for all the AI providers. Each project in this directory focuses on a different aspect of the Spring AI API, within a project you will see that the package names end with numbers indicating the order in which the code in each project should be studied.
/components/patterns/ this directory contains the code that demonstrates how to use the Spring AI API to implement common AI application patterns such as retrieval augmented generation. The code in this directory is the same for all the AI providers.
/applications/ this directory contains the spring boot applications
that interact with the specific AI providers. The configuration of each
project in this directory is different, for example, setting API keys and
configuring the AI service with the correct endpoint. To try out the samples
in this repo you will be launching the apps in this directory. Each
subdirectory contains a readme.md file with instructions on how to run the
application.
-/pgvector/ this directory contains a docker compose file to launch
postgres with the pgvector extension. This is used to demonstrate how to
use vector databases with Spring AI.
docs/ this directory contains the documentation for the repo.
Java
85.7%
Shell
14.0%
Example applications showing how to use Spring AI to build Generative AI projects.
You need the following software installed: Java 21+, docker, ollama, httpie, and your favourite Java IDE. This is a lot of GBs to download so please make sure to have all this stuff installed before the conference workshop, as the conference wifi may be slow, so you might not be able to run the samples.
ollama makes running models on your laptop easy and very educational. You can run the models locally and learn how they work.
Please make sure that the software list above is installed on your laptop before the workshop starts. After install:
./download-deps.sh script pull local AI models, and container
images.check-deps.sh script to check that the all the required
software is installed, the output of the script on my machine looks like../check-deps.sh
============================
Checking Java installation:
============================
✅ Java is installed. Version details:
openjdk version "25" 2025-09-16 LTS
OpenJDK Runtime Environment Temurin-25+36 (build 25+36-LTS)
OpenJDK 64-Bit Server VM Temurin-25+36 (build 25+36-LTS, mixed mode, sharing)
===============================
Checking Ollama installation:
===============================
✅ Ollama is installed. Version details:
ollama version is 0.12.0
========================================
Checking if llama3.2 model is pulled:
========================================
✅ llama3.2 model is pulled and available.
========================================
Checking if mxbai-embed-large model is pulled:
========================================
✅ mxbai-embed-large model is pulled and available.
========================================
Checking if llava model is pulled:
========================================
✅ llava model is pulled and available.
==============================
Checking Docker installation:
==============================
✅ Docker is installed. Version details:
Docker version 28.1.1, build 4eba377
Checking Docker image: pgvector/pgvector:pg17
✅ Docker image pgvector/pgvector:pg17 is pulled.
Checking Docker image: dpage/pgadmin4:9.8.0
✅ Docker image dpage/pgadmin4:9.8.0 is pulled.
===============================
Checking HTTPie installation:
===============================
✅ HTTPie is installed. Version details:
3.2.4
If you run into issues try running the commands in the check-deps.sh
script one at a time.
You will be provided with API keys for online AI services during the workshop, these keys will only be valid during the workshop. Highly recommend you get your own keys to continue experimenting after the workshop.
Generative AI is a transformational technology impacting our world in profound ways and creating unprecedented opportunities. This workshop is designed for Spring developers looking to add generative AI to existing applications or to implement brand new AI apps using the Spring AI project.
We assume no previous AI experience. The workshop will teach you key AI concepts and how to apply them in your applications, using the Spring AI project.
The workshop is hands-on. Bring your laptop and a willingness to learn. We will provide Spring AI based sample code and the API keys for the AI services. By the end of the day you will know how to add generative AI features to your Spring apps.
Spring AI provides a consistent API to work with many different types of AI providers. For example, the same code wil work with OpenAI, Google Vertex AI, Azure OpenAI, and local AI models. The major directories in this repo are:
/components/data/ this directory contains various types of example data sets used by the examples in the repo.
/components/api/ this directory contains the code that interacts with the AI providers. The code in this directory is the same for all the AI providers. Each project in this directory focuses on a different aspect of the Spring AI API, within a project you will see that the package names end with numbers indicating the order in which the code in each project should be studied.
/components/patterns/ this directory contains the code that demonstrates how to use the Spring AI API to implement common AI application patterns such as retrieval augmented generation. The code in this directory is the same for all the AI providers.
/applications/ this directory contains the spring boot applications
that interact with the specific AI providers. The configuration of each
project in this directory is different, for example, setting API keys and
configuring the AI service with the correct endpoint. To try out the samples
in this repo you will be launching the apps in this directory. Each
subdirectory contains a readme.md file with instructions on how to run the
application.
-/pgvector/ this directory contains a docker compose file to launch
postgres with the pgvector extension. This is used to demonstrate how to
use vector databases with Spring AI.
docs/ this directory contains the documentation for the repo.
Java
85.7%
Shell
14.0%