Logo

WHY DEVS
WILL FLOCK TO
SPRING AI

Josh Long
Spring Developer Advocate, Broadcom
Back to podcasts

Building AI Native Apps with Spring AI

with Josh Long

Transcript

Chapters

Trailer
[00:00:00]
Introduction
[00:01:06]
Spring AI capabilities
[00:02:06]
Where AI comes in
[00:04:09]
Demo rationale: adopt a dog
[00:07:13]
Project setup and dependencies
[00:10:00]
System prompt engineering
[00:17:02]
Spring Data JDBC Access
[00:21:01]
RAG with PGVector
[00:23:03]
Tool calling and scheduling
[00:28:00]
Extracting to MCP Service
[00:36:48]
Observability and production readiness
[00:40:10]
Outro
[00:42:56]

In this episode

What happens when the OG Spring Dev, Josh Long, teams up with Simon Maple on AI Native Dev?

You get a front row seat to them building a Spring powered app that showcases the future of AI integration.

While building the app, they discuss:
• why developers are adopting Spring AI
• how Spring is becoming the go-to for AI engineering
• why companies route users from humans to IVRs
• understanding model context protocol

Introduction

In this episode of the AI Native Dev podcast, host Simon Maple speaks with Josh Long, Spring Developer Advocate at Broadcom, live from DevOps UK. Together, they explore how Spring AI empowers Java and Spring developers to integrate AI seamlessly into production systems, with a focus on practical tooling and architecture.

Introducing Spring AI

Josh introduces Spring AI as a new abstraction layer that allows developers to build AI-powered applications using familiar Spring Boot constructs. Designed to integrate easily with existing Spring-based microservices, Spring AI provides a unified interface for working with models, embeddings, and vector stores—enabling developers to embed intelligence directly into their applications without learning entirely new paradigms.

Building an AI Dog Adoption Assistant

To demonstrate Spring AI in action, Josh walks through building a chat-based assistant that helps users adopt dogs. Using OpenAI as the LLM, a PostgreSQL database for dog profiles, and PGVector as a vector store, the app supports natural conversations, retains memory, and performs similarity searches. Josh configures prompts and advisors to maintain context, guiding the assistant toward its intended use case and preventing misuse.

Tool Calling and Business Logic

A key highlight is Spring AI’s tool calling capability, which lets models invoke Java methods directly. Josh creates a scheduling service that lets users book adoption appointments. This logic is exported as a tool and made available to the model, showcasing how LLMs can go beyond Q&A to actually drive business logic via natural language. This marks a shift toward chat interfaces becoming primary UI layers in applications.

Embracing Model Context Protocol (MCP)

To make the architecture more modular, Josh introduces the Model Context Protocol (MCP)—a new protocol from Anthropic that connects models to remote tools and services. Spring AI offers first-class support for MCP, and Josh demonstrates extracting the scheduling logic into a standalone service. With this setup, AI agents can invoke external tools over HTTP while maintaining a clean separation of concerns.

Production Readiness and Observability

The episode concludes with a focus on making AI integration production-ready. Josh enables observability using Micrometer, tracks token usage to avoid runaway costs, and compiles the app into a native image for fast startup and low memory usage. He emphasizes the importance of understanding token economics and runtime efficiency to ensure that AI-driven services scale sustainably in real-world systems.

Conclusion

Josh and Simon wrap up by highlighting the practical strengths of Spring AI: familiar abstractions, flexible model support, and seamless integration of AI capabilities into existing Java infrastructure. With support for tool calling, RAG, and MCP, Spring AI positions itself as a powerful bridge between traditional enterprise apps and modern AI workflows—making it an exciting time to be both a Spring and AI developer.

Chapters

Trailer
[00:00:00]
Introduction
[00:01:06]
Spring AI capabilities
[00:02:06]
Where AI comes in
[00:04:09]
Demo rationale: adopt a dog
[00:07:13]
Project setup and dependencies
[00:10:00]
System prompt engineering
[00:17:02]
Spring Data JDBC Access
[00:21:01]
RAG with PGVector
[00:23:03]
Tool calling and scheduling
[00:28:00]
Extracting to MCP Service
[00:36:48]
Observability and production readiness
[00:40:10]
Outro
[00:42:56]