Spring AI Spring Boot Auto Configuration modules providing automatic setup for AI models, vector stores, MCP, and retry capabilities
Complete reference for all Spring AI Spring Boot Auto Configuration properties.
Prefix: spring.ai.retry
| Property | Type | Default | Description |
|---|---|---|---|
max-attempts | int | 10 | Maximum retry attempts |
backoff.initial-interval | Duration | 2s | Initial backoff interval |
backoff.multiplier | int | 5 | Backoff multiplier |
backoff.max-interval | Duration | 3m | Maximum backoff interval |
on-client-errors | boolean | false | Retry on 4xx errors |
on-http-codes | List<Integer> | [] | HTTP codes to retry |
exclude-on-http-codes | List<Integer> | [] | HTTP codes to never retry |
See Detailed Retry Documentation →
Prefix: spring.ai.mcp.client
| Property | Type | Default | Description |
|---|---|---|---|
enabled | boolean | true | Enable MCP client |
type | ClientType | SYNC | Client type (SYNC/ASYNC) |
name | String | spring-ai-mcp-client | Client name |
request-timeout | Duration | 20s | Request timeout |
initialized | boolean | true | Initialize on startup |
root-change-notification | boolean | true | Enable root change notifications |
toolcallback.enabled | boolean | true | Enable tool callbacks |
Prefix: spring.ai.mcp.server
| Property | Type | Default | Description |
|---|---|---|---|
enabled | boolean | true | Enable MCP server |
type | ServerType | SYNC | Server type (SYNC/ASYNC) |
transport | TransportType | STDIO | Transport (STDIO/SSE/STREAMABLE_HTTP) |
name | String | spring-ai-mcp-server | Server name |
change-notification.enabled | boolean | true | Enable change notifications |
See Detailed MCP Client Documentation →
See Detailed MCP Server Documentation →
Prefix: spring.ai.chat.client
| Property | Type | Default | Description |
|---|---|---|---|
enabled | boolean | true | Enable chat client |
log-prompt | boolean | false | Log prompt content |
log-completion | boolean | false | Log completion content |
Prefix: spring.ai.chat.memory.repository.{type}
| Repository | Properties | Description |
|---|---|---|
| jdbc | initialize-schema, platform, schema | JDBC-backed memory |
| mongo | create-indices, ttl | MongoDB-backed memory |
| cassandra | Uses Spring Boot Cassandra config | Cassandra-backed memory |
| cosmosdb | endpoint, key, database, container | Cosmos DB-backed memory |
| neo4j | Uses Spring Boot Neo4j config | Neo4j-backed memory |
Prefix: spring.ai.chat.observations
| Property | Type | Default | Description |
|---|---|---|---|
log-prompt | boolean | false | Log prompt content |
log-completion | boolean | false | Log completion content |
include-error-logging | boolean | false | Include error logging |
See Detailed Chat Infrastructure Documentation →
Prefix: spring.ai.openai
| Property | Type | Default | Description |
|---|---|---|---|
api-key | String | - | OpenAI API key |
base-url | String | https://api.openai.com | Base URL |
organization-id | String | - | Organization ID |
chat.options.model | String | gpt-3.5-turbo | Model name |
chat.options.temperature | Double | 0.7 | Temperature (0-2) |
chat.options.max-tokens | Integer | - | Max tokens |
embedding.options.model | String | text-embedding-ada-002 | Embedding model |
Prefix: spring.ai.anthropic
| Property | Type | Default | Description |
|---|---|---|---|
api-key | String | - | Anthropic API key |
base-url | String | https://api.anthropic.com | Base URL |
chat.options.model | String | claude-3-5-sonnet-20241022 | Model name |
chat.options.temperature | Double | 0.7 | Temperature (0-1) |
chat.options.max-tokens | Integer | 4096 | Max tokens |
Prefix: spring.ai.azure.openai
| Property | Type | Default | Description |
|---|---|---|---|
api-key | String | - | Azure OpenAI key |
endpoint | String | - | Azure endpoint URL |
chat.options.deployment-name | String | - | Deployment name |
chat.options.temperature | Double | 0.7 | Temperature (0-2) |
See Detailed Provider Documentation →
Prefix: spring.ai.vectorstore.pgvector
| Property | Type | Default | Description |
|---|---|---|---|
initialize-schema | boolean | false | Initialize schema |
schema-name | String | public | Schema name |
table-name | String | vector_store | Table name |
index-type | IndexType | HNSW | Index type (HNSW/IVF) |
distance-type | DistanceType | COSINE_DISTANCE | Distance metric |
dimensions | Integer | 1536 | Vector dimensions |
Prefix: spring.ai.vectorstore.pinecone
| Property | Type | Default | Description |
|---|---|---|---|
api-key | String | - | Pinecone API key |
environment | String | - | Environment (e.g., us-east1-gcp) |
project-id | String | - | Project ID |
index-name | String | - | Index name |
namespace | String | default | Namespace |
Prefix: spring.ai.vectorstore.weaviate
| Property | Type | Default | Description |
|---|---|---|---|
scheme | String | http | Scheme (http/https) |
host | String | localhost:8080 | Host and port |
api-key | String | - | API key |
object-class | String | Document | Object class name |
initialize-schema | boolean | false | Initialize schema |
See Detailed Vector Store Documentation →
Prefix: spring.ai.vectorstore.observations
| Property | Type | Default | Description |
|---|---|---|---|
include-query-content | boolean | false | Include query in traces |
include-results | boolean | false | Include results in traces |
Prefix: spring.ai.tools.observations
| Property | Type | Default | Description |
|---|---|---|---|
include-content | boolean | false | Include tool content |
Prefix: spring.ai.tools
| Property | Type | Default | Description |
|---|---|---|---|
throw-exception-on-error | boolean | false | Throw on tool errors |
Many properties support environment variable substitution:
spring.ai.openai.api-key=${OPENAI_API_KEY}
spring.ai.anthropic.api-key=${ANTHROPIC_API_KEY}
spring.ai.azure.openai.api-key=${AZURE_OPENAI_API_KEY}
spring.ai.azure.openai.endpoint=${AZURE_OPENAI_ENDPOINT}See Quick Start Guide and Real-World Scenarios for complete configuration examples.