๐ค Spring AI (+ LangChain4j)
Checklist
-
ChatClientfluent API, system/user messages, prompt templates - Model portability: Anthropic, OpenAI, Gemini, Ollama (local), Bedrock
- Streaming responses (Flux โ SSE)
- Structured output โ Java records
- Tool calling (
@Toolmethods) and returning tool results - Advisors: chat memory, RAG (
QuestionAnswerAdvisor), logging, safeguards -
VectorStoreabstraction: pgvector, Redis, etc.; ETL pipeline (DocumentReader โ splitter โ embed โ store) - MCP: Spring AI MCP server & client starters โญ โ MCP
- Observability: Micrometer metrics for tokens and latency
- Evaluation helpers (relevancy/fact-checking evaluators)
- Compare with LangChain4j (AI Services, agents) and know when youโd pick each
๐งช Labs (๐ข warm-up โ ๐ก core โ ๐ด hard โ โซ boss)
- ๐ข
ChatClientwith streaming + structured output into records - ๐ก
@Toolmethods + advisors (memory, logging); compare with LangChain4j AI Services - ๐ด An ETL pipeline into pgvector +
QuestionAnswerAdvisor, then replace it with your own hybrid retriever - ๐ด Orbit MCP server with the Spring AI MCP starter (tools + resources + OAuth)
- โซ The MCP client side: connect external MCP servers as Orbit tools with scopes
๐ง Cognitive tasks
- Framework vs hand-rolled: what does Spring AIโs tool calling do that your Go loop does by hand?
๐ฐ๏ธ Orbit integration
- orbit-knowledge (RAG) and orbit-tools (MCP server/client) โ Orbit v4 - Agents, RAG & MCP
Go deeper
โ๏ธ LLM Inference Internals ยท ๐งฉ AI & Agent Patterns ยท ๐ค MCP
Resources
- docs.spring.io/spring-ai โญ ยท Spring AI examples repo ยท Dan Vega + Josh Long videos on Spring AI ยท docs.langchain4j.dev Related: AI Engineering Roadmap