aregmi.net
Resume

Using AI features in Spring Boot — prompts, tools, memory, RAG, and agents

springai ai framework spring-boot

Spring AI

Spring AI is how you add AI features to a Spring Boot app. It gives you a ChatClient (think: HTTP client but for LLMs), tool calling, memory, RAG, and structured output — all with the Spring patterns you already know.

If you've built a REST API with Spring Boot, you can build an AI-powered one. Same dependency injection, same config, same testing approach.

What's covered here

  1. Getting Started — what GenAI even is and how the pieces fit
  2. Essentials — ChatClient, the request flow, key abstractions
  3. Prompts — system prompts, guardrails, prompt catalogs
  4. Tools — letting the LLM call your Java methods
  5. Chat Memory — making conversations persist across requests
  6. RAG — grounding responses in your own data
  7. Structured Output — getting Java objects back instead of strings
  8. Agents — routing, orchestration, and multi-agent patterns

Start with Getting Started if you're new. Jump to Essentials if you already know the concepts and want to write code.

Resources