Spring AI Parent 2.0.0-SNAPSHOT API

This document is the API specification for Spring AI

For further API reference and developer documentation, see the Spring AI reference documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples.

Packages
Package
Description
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Chat client API.
Provides classes for advising chat clients.
Provides the API for chat client advisors.
Provides the API for chat client advisors observations.
Spring AI chat client advisors package.
Provides classes for observing chat data.
The org.sf.ai.chat package represents the bounded context for the Chat Model within the AI generative model domain.
 
 
 
 
 
 
 
 
 
 
 
Provides the API for chat observations.
 
Provides the API for embedding observations.
 
Core observation abstractions.
Provides converters for transforming AI model text outputs into structured Java types.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Provides the API for embedding observations.
Provides the API for embedding observations.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Provides classes for observing image data.
Core support for Model Context Protocol (MCP) integration in Spring AI.
Annotations for declaring MCP capabilities (tools, prompts, resources, completion, logging, progress, sampling, elicitation) and list-changed handlers.
Adapters that bridge MCP annotation-based providers to the MCP SDK transport layer.
Common utilities for working with MCP annotation metadata.
Request context types, specifications (logging, progress, sampling, elicitation), and default implementations for MCP request handling.
Method callbacks and specifications for MCP prompt list changed notifications.
Method callbacks and specifications for MCP resource list changed notifications.
Method callbacks and specifications for MCP tool list changed notifications.
Method callbacks for MCP completion (chat) requests, sync and async.
Method callbacks and specifications for MCP elicitation (user input) requests.
Method callbacks and specifications for MCP logging.
Method callbacks and specifications for MCP progress reporting.
Method callbacks for MCP prompt template requests, sync and async.
Method callbacks and result converters for MCP resource read requests.
Method callbacks for MCP sampling (create message) requests.
Method callbacks and utilities for MCP tool invocation (call_tool).
Utilities for MCP tool support, such as JSON schema generation.
MCP providers that expose prompt list changed handlers to the transport layer.
MCP providers that expose resource list changed handlers to the transport layer.
MCP providers that expose tool list changed handlers to the transport layer.
MCP providers that expose completion (chat) handlers to the transport layer.
MCP providers that expose elicitation handlers to the transport layer.
MCP providers that expose logging handlers to the transport layer.
MCP providers that expose progress handlers to the transport layer.
MCP providers that expose prompt template handlers to the transport layer.
MCP providers that expose resource read handlers to the transport layer.
MCP providers that expose sampling (create message) handlers to the transport layer.
MCP providers that expose tool (call_tool) handlers to the transport layer.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Provides a set of interfaces and classes for a generic API designed to interact with various AI models.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Auto-configuration for chat observation.
 
 
Auto-configuration for embedding observation.
 
 
 
Auto-configuration for image observation.
 
 
Provides classes for observing model data.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Core observation abstractions.
Conventions for observation-based AI.
 
 
 
 
 
 
Management support for Ollama.
 
 
 
 
 
 
 
 
 
 
 
This package contains the core interfaces and classes supporting Retrieval Augmented Generation flows.
 
RAG Module: Generation.
RAG Sub-Module: Query Augmentation.
RAG Module: Post-Retrieval.
 
RAG Module: Pre-Retrieval.
RAG Sub-Module: Query Expansion.
RAG Sub-Module: Query Transformation.
RAG Sub-Module: Document Join.
RAG Sub-Module: Document Search.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Test support classes for ChatClient advisor integration tests.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Provides the API for chat client advisors observations.
 
 
 
 
 
 
 
 
 
Provides interfaces and implementations for working with vector databases in Spring AI.
Provides the API for embedding observations.
 
Provides the Amazon Bedrock Knowledge Base vector store implementation.
Auto-configuration for Amazon Bedrock Knowledge Base VectorStore.
Provides the API for embedding observations.
 
 
Provides the API for embedding observations.
Azure Cosmos DB vector store implementation.
 
 
 
Provides the API for embedding observations.
 
 
 
 
Provides the API for embedding observations.
 
Provides the API for embedding observations.
Provides the API for embedding observations.
 
Provides the API for embedding observations.
 
Provides the API for embedding observations.
 
Provides the API for embedding observations.
 
Provides the API for embedding observations.
 
 
Provides classes for observing and storing vector data.
 
Provides the API for embedding observations.
 
Provides the API for embedding observations.
 
Provides the API for embedding observations.
 
Provides the API for embedding observations.
 
 
Provides the API for embedding observations.
 
Provides the API for embedding observations.
Auto-configuration for Redis Vector Store.
 
 
S3 Vector Store implementation for Spring AI.
 
Provides the API for embedding observations.
 
Provides the API for embedding observations.