Integration Problem

The Spring AI project aims to streamline the development of applications that incorporate artificial intelligence functionality without unnecessary complexity.

The project draws inspiration from notable Python projects, such as LangChain and LlamaIndex, but Spring AI is not a direct port of those projects. The project was founded with the belief that the next wave of Generative AI applications will not be only for Python developers but will be ubiquitous across many programming languages.

Spring AI addresses the fundamental challenge of AI integration: Connecting your enterprise Data and APIs with the AI Models.
Interactive

Spring AI provides abstractions that serve as the foundation for developing AI applications. These abstractions have multiple implementations, enabling easy component swapping with minimal code changes.

Spring AI provides the following features:

  • Portable API support across AI providers for Chat, text-to-image, and Embedding models. Both synchronous and streaming API options are supported. Access to model-specific features is also available.

  • Support for all major AI Model providers such as Anthropic, OpenAI, Microsoft, Amazon, Google, and Ollama. Supported model types include:

  • Structured Outputs - Mapping of AI Model output to POJOs.

  • Support for all major Vector Database providers such as Apache Cassandra, Azure Vector Search, Chroma, Milvus, MongoDB Atlas, Neo4j, Oracle, PostgreSQL/PGVector, PineCone, Qdrant, Redis, and Weaviate.

  • Portable API across Vector Store providers, including a novel SQL-like metadata filter API.

  • Tools/Function Calling - permits the model to request the execution of client-side tools and functions, thereby accessing necessary real-time information as required.

  • Observability - Provides insights into AI-related operations.

  • Document injection ETL framework for Data Engineering.

  • AI Model Evaluation - Utilities to help evaluate generated content and protect against hallucinated response.

  • Spring Boot Auto Configuration and Starters for AI Models and Vector Stores.

  • ChatClient API - Fluent API for communicating with AI Chat Models, idiomatically similar to the WebClient and RestClient APIs.

  • Advisors API - Encapsulates recurring Generative AI patterns, transforms data sent to and from Language Models (LLMs), and provides portability across various models and use cases.

  • Support for Chat Conversation Memory and Retrieval Augmented Generation (RAG).

This feature set lets you implement common use cases such as “Q&A over your documentation” or “Chat with your documentation.”

The concepts section provides a high-level overview of AI concepts and their representation in Spring AI.

The Getting Started section shows you how to create your first AI application. Subsequent sections delve into each component and common use cases with a code-focused approach.