Build AI Applications with Spring AI

Build AI Applications with Spring AI

Fu Cheng
This is a sample of the book's content.Buy on Leanpub

Table of Contents

Spring AI Basics›

  • Getting Started
    • Prerequisites
    • Spring Boot Application
    • Use Model Service
    • Consolidate Local and Production Environment
  • Chat Completion
    • Model
    • ChatModel
    • Create Prompts
    • Chat Response
    • ChatClient
    • Use Custom Chat Options
    • Prompt Template
    • Advisor
  • Streaming Chat Completion
    • StreamingChatModel
    • Streaming Web Application
    • Streaming JSON Events
  • Structured Output Converter
    • StructuredOutputConverter
    • ListOutputConverter
    • MapOutputConverter
    • BeanOutputConverter
    • Use ChatClient
  • Multimodal Input
    • Media
    • Image Understanding

Retrieval-Augmented Generation›

  • RAG Introduction
    • Reduce Hallucinations
    • Naive RAG
  • Embedding Model
    • EmbeddingModel
    • EmbeddingOptions
    • BatchingStrategy
    • Use EmbeddingModel
  • Documents
    • Create Documents
    • Document Reader
    • Document Transformer
    • Document Writer
  • Vector Store
    • VectorStore
    • Create VectorStore
    • Add Documents
    • Delete Documents
    • Similarity Search
    • VectorStore REST API
    • SimpleVectorStore
    • Pgvector
    • Vector Store Cloud Services
  • RAG
    • Simple RAG
  • Modular RAG
    • Query
    • Pre-Retrieval
    • Retrieval
    • Post-Retrieval
    • Generation
    • RetrievalAugmentationAdvisor
  • RAG Examples
    • Text-to-SQL
    • PDF Q&A

MCP›

  • MCP Introduction
  • Quick Start
    • Java Development Basics
    • stdio Server
    • HTTP SSE Server
    • MCP Client
    • Spring Integration
    • Spring AI Integration
  • MCP Server
    • Shared Models
    • ServerExchange
    • Prompt Templates
    • Resources
    • Tools
    • Completions
    • Logging
    • Pagination
  • MCP Client
    • Roots
    • Sampling
  • MCP Examples
    • File System MCP Server

Agent›

  • Agent Introduction
    • Cooking Suggestion Agent
  • Agent Components
    • Profile
    • Persona
    • Tools
    • Knowledge and memory
    • Reasoning and evaluation
    • Planning and feedback
  • Agentic Patterns
    • Task Execution
    • Evaluator-Optimizer
    • Parallelization Workflow
    • Routing Workflow
    • Chain Workflow
    • Agent as Tool
    • Tool as Agent
    • Orchestrator-Workers Workflow
  • Agent Development
    • Persona
    • Knowledge
    • Tools
    • Reasoning
    • Task

Source Code and Materials›

    Build AI Applications with Spring AI/Agent/Agent Introduction

    Agent Introduction

    https://leanpub.com/spring-ai

    Cooking Suggestion Agent

    https://leanpub.com/spring-ai

    Up next

    Agent Components

    In this chapter

    • Agent Introduction
    • Cooking Suggestion Agent