Building with AI

Spring AI

Quick explainer2 min readIntermediate

Spring AI is an open-source framework that brings language models, embeddings and vector stores into Java apps built with Spring.

In plain words

Many business systems are written in Java with the Spring framework. Spring AI lets them add AI features in the same style, connecting company data and APIs to models. It offers one portable API for chat, image and embedding models across providers such as OpenAI, Anthropic, Google and Ollama, plus support for many vector databases, tool calling, mapping model output to Java objects, and evaluation helpers.

A quick example

Imagine a company with a Spring Boot web app that wants a "chat with our documentation" feature. With Spring AI, developers add a starter dependency, store document embeddings in a supported vector store such as PGVector, and answer questions using a chat model, all in Java.

Where you'll meet it

  • Adding chat and RAG to enterprise Java apps.
  • Spring Boot services that call AI models.

Related

Sources

  1. DocsSpring AI reference, Spring documentation · read 29 Sept 2026
  2. DocsSpring AI, Spring (spring.io) · read 29 Sept 2026
  3. DocsSpring AI licence, Spring AI (GitHub) · read 29 Sept 2026

Checked by WhatIsAI against the sources above · 29 Sept 2026. Spotted an error? Report it.