ThomasVitale/llm-apps-java-spring-ai
Samples showing how to build Java applications powered by Generative AI and LLMs using Spring AI and Spring Boot.
What it solves
This repository provides a comprehensive set of sample applications and implementation patterns for Java developers to build Generative AI applications using the Spring AI framework. It bridges the gap between AI concepts and practical Java implementation, offering concrete examples of how to integrate LLMs, vector databases, and multimodal capabilities into enterprise Java applications.
How it works
The project is organized as a collection of use cases and patterns implemented with Spring AI. It demonstrates integration with various model providers (OpenAI, Mistral AI, Ollama) and tools like PGVector for vector storage. The samples cover the entire AI application lifecycle, from data ingestion (reading PDFs, JSON, and Markdown) and document transformation (splitting and metadata enrichment) to advanced RAG (Retrieval Augmented Generation) flows including sequential, branching, and conditional RAG.
Who it’s for
Java developers and software architects who want to learn how to use Spring AI to build AI-infused applications, specifically those looking for practical, runnable samples of common AI patterns like RAG, tool calling, and structured output.
Highlights
- Diverse Model Support: Integration with OpenAI, Mistral AI, and local LLMs via Ollama.
- Advanced RAG Patterns: Implementations of naive, advanced, sequential, branching, and conditional RAG flows.
- Comprehensive Tooling: Examples of structured data extraction, text classification, and multimodal prompts.
- Enterprise-Ready Patterns: Implementations of chat memory (JDBC, Vector Store, Spring Security) and input/output guardrails.
- Data Ingestion Pipeline: Built-in document readers for various formats (PDF, JSON, Markdown, Tika) and document transformers for chunking and metadata enrichment.
Related
- Project
spring-projects/spring-aiA Spring-friendly API and abstraction layer for Java developers to integrate various AI models and vector stores into enterprise applications with portability and modularity.
- Project
opensolon/solon-aiA full-scenario Java AI development framework for building LLM applications, RAG knowledge bases, and multi-agent systems with native integration into the Java ecosystem.
- Project
agents-flex/agents-flexAgents‑Flex is a modular, Java‑first framework that bundles chat, embeddings, tool calling, RAG, vector stores, and production‑grade features (routing, observability, persistence) into interchangeable Maven modules, letting JVM developers build LLM‑driven agents, chatbots, and AI‑enhanced services without leaving the Java ecosystem.
- Project
nageoffer/ragentRagent AI is a production‑ready Java platform for building Agentic RAG applications. It provides hybrid retrieval (vector, keyword, graph, web), advanced query understanding, model tiering with fault‑tolerance, multi‑level session memory, Redis‑based traffic protection, and a full ingestion‑to‑answer loop. The code is split into seven Maven modules (infra‑ai, system, rag, agent, bootstrap, framework, mcp‑server) that isolate AI vendor, storage, and retrieval concerns, making components interchangeable. v2 uses a ReAct‑style agent loop with MCP tool calls, Skills, and human‑in‑the‑loop confirmations. Production features include circuit‑breaker, transactional RocketMQ, idempotency, tracing (Langfuse optional), SSE streaming, and Sa‑Token security. A React UI offers both chat with citation/agent view and an admin console for knowledge‑base and intent‑tree management. Targeted at Java backend engineers and interview‑preparation candidates who need a real‑world, extensible AI stack rather than a toy demo.
- Project
microsoft/generative-ai-with-javascriptA beginner‑friendly, story‑driven course that teaches JavaScript developers how to build Generative AI apps using Microsoft Foundry. It includes 8 lesson modules, a companion chat app, code samples, and step‑by‑step setup for local or Codespaces development.