llm-apps-java-spring-ai
Samples showing how to build Java applications powered by Generative AI and LLMs using Spring AI and Spring Boot.
MCP Agents Market is an independent directory. We are not affiliated with ThomasVitale or llm-apps-java-spring-ai, and we do not host or distribute it. All links point to the official GitHub repository.
This collection provides comprehensive examples and patterns for building Java applications with generative AI using Spring AI and Spring Boot. It demonstrates how to integrate multiple LLM providers (OpenAI, Ollama, Mistral AI) for chat, embedding, image, and audio tasks, while showcasing advanced patterns like RAG, tool calling, and memory management. Developers can use these working samples as templates to create production-ready AI applications in Java, including chatbots, question-answering systems, and semantic search engines. The repository includes MCP client integrations for extending LLM capabilities with external tools and services.
Key Features
Use Cases
- 01Building intelligent chatbots with conversation memory and context preservation
- 02Implementing question-answering systems over enterprise document collections using RAG
- 03Creating semantic search engines with vector similarity matching
- 04Extracting structured data from unstructured text using LLM-powered transformation
- 05Classifying text content into predefined categories with AI models
- 06Generating images and audio content from text prompts via OpenAI models
Related MCP Servers
View morefirecrawl
The context API to search, scrape, and interact with the web at scale. 🔥
markitdown
Python tool for converting files and office documents to Markdown.
prompts.chat
f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.
langflow
Langflow is a powerful tool for building and deploying AI-powered agents and workflows.
llm-apps-java-spring-ai — FAQ
What is llm-apps-java-spring-ai?+
It is a collection of working sample applications demonstrating how to build Java-based generative AI applications using Spring AI and Spring Boot. The repository includes examples for chatbots, RAG systems, semantic search, and MCP integrations with multiple LLM providers.
How do I run these Spring AI samples?+
Clone the repository and navigate to the specific sample directory you want to run. Each sample is a standalone Spring Boot application that can be built with Maven or Gradle and requires Java 25 and Docker/Podman for running dependencies like PGVector.
Which LLM providers does this work with?+
The samples support OpenAI, Ollama (for local models), and Mistral AI. Different samples demonstrate integration with each provider for chat completion, embeddings, image generation, and speech processing.
Do I need API keys to use these samples?+
API keys are required for OpenAI and Mistral AI samples. Ollama samples can run entirely locally without external API keys, making them useful for development and testing without cloud costs.
Is this free to use?+
The sample code is open source and free to use. However, using commercial LLM providers like OpenAI or Mistral AI will incur costs based on their pricing. Ollama can be run locally at no cost beyond compute resources.
What are the prerequisites for running these samples?+
You need Java 25 installed and Docker or Podman for running containerized dependencies like PostgreSQL with PGVector. Individual samples may require additional setup like API keys or specific model downloads for Ollama.
How do I install llm-apps-java-spring-ai?+
Open the source repository on GitHub and follow its README. llm-apps-java-spring-ai is a mcp server — MCP Agents Market links you directly to the official repo.
Is llm-apps-java-spring-ai free?+
llm-apps-java-spring-ai is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.