What if you could run a Spring AI application without a Maven or Gradle project?
In this Spring AI Recipe, see how JBang turns a few Java files into a runnable Spring AI chat loop.
CrAIg Walls
mastodon 4.7.3Java Champion / Alexa Champion / Author of “Spring AI in Action”, “Spring in Action” & “Build Talking Apps for Alexa” / Disney Parks Fanatic / tabletop games player
Securing an MCP server with an API key is easy, but sometimes you need something more robust. In this recipe, we’ll put OAuth 2.0 to work with Spring AI to secure an MCP server.
Conversational memory helps an AI remember what you've talked about. But the longer the conversation runs, the more context it has to carry around. What if it could remember the important stuff without remembering every word?
#SpringAI #Java #SpringBoot #GenerativeAI #ChatMemory #SpringAIRecipes
How local can a local LLM get? With ModelJars and Models, you can skip the model server entirely and run inference inside the same JVM as your Spring AI application.
See how in this Spring AI Recipe!
As your AI application gains more tools, do you really need to send all of them to the LLM on every request?
In this Spring AI Recipe, I show how ToolSearchTool discovers the right tools on demand, keeping prompts lean as your toolbox grows.
Retrieval found the documents. But are they really the best documents to put in your prompt?
In this Spring AI Recipe, we apply reranking to ensure the most relevant context.
Today's Spring AI recipe is giving me some technical challenges. As such, I find myself delaying publication of the recipe until I sort out the issues.
I hope that you'll accept my apologies for the delay. I hope to get it working and publish the recipe tomorrow. Otherwise, I'll set it aside and give you a different recipe tomorrow.
Head up: I’ve scheduled more Spring AI recipes to auto-publish this week even while I’m on a ship sailing in Alaska. But, my ability to push the code to GitHub and the updates to habuma.com will depend on connectivity that I may not have. But I’ll push them as soon as I can. Sorry for the delays.
Graph-based workflows give you explicit control over how an agent moves from one task to the next. In this recipe, see how to build graph-based workflows with LangGraph4j and Spring AI.
Tools give your agent capabilities. Skills give it direction.
Today's Spring AI recipe shows how to guide agent behavior with Skills in Spring AI.
Spring AI’s ToolCallAdvisor unlocks something SimpleLoggerAdvisor couldn’t previously see: the full tool-calling conversation between your app and the LLM. See every request, tool negotiation, and response across all Spring AI model abstractions.
Your agent may be smart. But does it remember anything?
In today's Spring AI recipe, learn how to add long-term memory to your agents so that it learns and remembers significant information.
Vector search understands what you mean. BM25 finds the exact terms you use. Why choose?
In this Spring AI Recipe, we combine them with hybrid search and Reciprocal Rank Fusion to get the best of both worlds.
I’ll be speaking at UberConf 2026 this July, including sessions on Spring AI alongside a fantastic lineup of Java, architecture, cloud, leadership, and software development topics.
Use my speaker discount code (uber26sp-cw) for $300 off registration. Attendees also receive 25 NFJS Virtual Credits (12.5 days of virtual training).
You don't need a full-blown agent framework to build an agent. If you've used Spring AI's ChatClient with tools, you may already be using one of the most fundamental agentic patterns: ReAct. See how in today's Spring AI Recipe.
In today's Spring AI Recipe, we see how playing "HyDE and seek" gives better results from RAG queries.
Want to run Spring AI against a local LLM?
This recipe shows how to use open-weight models with LM Studio, Docker Model Runner, and Ollama, with surprisingly few changes to your app.
When mixing chat memory with RAG, follow-up questions make perfect sense to people, but not to your vector store. This recipe shows how to make RAG conversation-aware by folding chat history into retrieval queries.
In the past few recipes, you've created MCP servers. Now give the tools from those servers to your agent and put it to work.
Today’s Spring AI recipe shows how to build an MCP client.
Why should a Java-based STDIO MCP server need a build step before a client can run it? With JBang, it doesn’t. You can build Spring AI MCP servers and clients that run straight from Java source.
What if you don’t need an LLM to generate an answer, but simply need AI to make a judgment? In my latest Spring AI Recipe, I explore Jev, System One models, and fast, structured AI judgments.
Understanding why an LLM chose a specific tool can be just as important as the tool call itself. Today's Spring AI Recipe shows how to use AugmentedToolCallbackProvider to capture and inspect tool-selection reasoning from the model.
Tools give agents power. Security determines who gets to use that power.
In today's Spring AI recipe, you'll secure an MCP server with an API key.
Claude Code isn't the only place you can use Markdown-defined subagents. In this week's Spring AI Recipe, learn how to create Claude-style subagents and wire them into Spring AI with TaskTool.
https://thetalkingapp.medium.com/spring-ai-recipe-defining-claude-style-subagents-9563644b9121
Completely autonomous agents are like unplanned road trips--flexible, but unpredictable. Graph-based workflows provide a roadmap, while still allowing decisions along the way.
In today’s Spring AI recipe you'll build a graph-based agentic workflow with Spring AI Alibaba Graph.
Fact-checking an entire AI response can hide unsupported claims. What if you decompose the response and fact-check each claim individually?
Even when an LLM has all the facts it needs, it can still get them wrong. Let's explore FactCheckingEvaluator and discover why fact-checking AI responses isn't always as straightforward as it seems.
An agent without tools is just…thinking really hard.
Give it something to do.
In today’s Spring AI recipe you'll create an STDIO MCP server to provide capabilities to an agent.
Vector similarity finds what’s relevant. Metadata filtering makes sure your RAG pipeline finds what’s relevant and applicable.
This Spring AI Recipe shows how to filter vector searches using document metadata.
I've upgraded the code for my Spring AI recipes that cover Embabel to build against Embabel 1.5.0 (and therefore, Spring Boot 4.1.0). Enjoy!
- Embabel recipes: https://www.habuma.com/springairecipes/#embabel
- Recipes code: https://github.com/habuma/spring-ai-recipes
Your agent's workflow doesn’t have to settle for its first answer. Add a simple loop and let it evaluate, revise, and improve until it gets it right.
Today's Spring AI Recipe builds upon previous recipes to add a loop to a graph-based workflow.
So you’ve built an MCP server with STDIO? That’s great!
Now take it from local integration to network-accessible service.
In today’s Spring AI recipe, learn to create a Streamable HTTP MCP server.
Most users shouldn’t have to become prompt engineers to get great AI results. In this Spring AI Recipe, learn how to define reusable MCP prompts that deliver consistent, high-quality LLM interactions across clients with Spring AI.
Tools give capabilities. Skills give direction. SkillsJars make skills reusable.
In today's recipe, see how to add plug-and-play agent behavior with Spring AI and SkillsJars.
Exposing agents with A2A is only half of the story. Writing agents that use A2A-enabled sub-agents is the other half. In this Spring AI recipe, you'll see how to use TaskTool to invoke the A2A sub-agent from the previous recipe. #SpringAI #AgenticAI #A2A
You built an agent. But if no other agent can find or use it… what’s the point? Today’s Spring AI recipe: A2A for discovery and communication.
#SpringAI #AgenticAI #A2A