Spring AI

Active
GitHub Java Apache-2.0

Description

An application framework for AI engineering from the Spring team, providing unified LLM integration, vector storage, function calling, RAG, and agent development for Java and Spring ecosystems with support for OpenAI, Anthropic, Ollama, and more.

Key Features

  • Official Spring AI engineering framework bringing Spring ecosystem portability and modular design to AI
  • Unified API supporting all major AI model providers including OpenAI, Anthropic, Google, and Amazon
  • Supports complete model types: chat completion, embedding, text-to-image, audio transcription, and text-to-speech
  • Integrates with 15+ vector databases including PostgreSQL/PGVector, Milvus, Qdrant, and Redis
  • Built-in RAG support, chat conversation memory management, function calling, and structured output conversion
  • Spring Boot auto-configuration and Starters with one-click project initialization via start.spring.io

Use Cases

💡 Integrate AI capabilities in Java/Spring enterprise applications without switching to Python tech stack
💡 Build enterprise knowledge Q&A systems based on RAG combining vector databases and LLMs
💡 Access multiple AI model services through Spring AI in microservice architectures
💡 Build AI agent-driven business process automation using function calling capabilities
💡 Gradually introduce AI features in existing Spring Boot projects while maintaining architectural consistency

Quick Start

1. Visit start.spring.io to create a project and select Spring AI dependencies
2. Configure AI model API keys in application.yml
3. Inject ChatClient or EmbeddingModel into Spring beans
4. Call chatClient.call("hello") to send chat requests
5. Use Advisor API for RAG and chat memory
6. Auto-configure vector database connections via Spring Boot Starter

Related Projects