Building AI Agents with Spring & MCP
summary
Builds a runnable Java AI agent that connects Bedrock Nova models for chat and embeddings, stores vectors in PGVector in Postgres and uses JDBC for chat memory, performs RAG with cosine similarity, and returns typed answers via structured outputs. Demonstrates local tools for scheduling adoption, migrates them to remote MCP tools with an MCP server and OAuth-based security, and shows observability via actuator/micrometer (example: 3,578 tokens used). Also shows pluggable augmentations via skills JARs; the demo finds βPrancerβ and successfully books a mock adoption slot.
AI-written summary Β· about
chapters (14)
- 0:00Introduction
- 1:06JVM and AI opportunities
- 3:35Building a dog adoption agent
- 6:46Choosing AI models and tools
- 11:34Setting up the project
- 14:39Adding chat memory
- 17:28System prompts and personality
- 19:33Integrating skills with agents
- 23:47Retrieval Augmented Generation
- 28:36Observability and cost tracking
- 30:18Adding tools for actions
- 33:48Introducing MCP servers
- 37:19Securing MCP with OAuth
- 43:59Summary and Q&A
