On behalf of the Spring AI engineering team and everyone who has contributed, I'm happy to announce that Spring AI 2.0.0-M3, 1.1.3, 1.0.4, have been released and are now available from Maven Central. These releases deliver important improvements, stability enhancements, and bug fixes across multiple release streams. ⚠️ Breaking Changes: 2.0.0-M3 includes several breaking changes, including MCP annotation package renames, MCP transport artifact relocations, Jackson 2 → Jackson 3 migration, and removal of conversation history from ToolContext. Review the Upgrade Notes before upgrading. 2.0.0-M…
Instead of one generalist agent doing everything, delegate to specialized agents. This keeps context windows focused—preventing the clutter that degrades performance. Task tool, part of the spring-ai-agent-utils toolkit, is a portable, model-agnostic Spring AI implementation inspired by Claude Code's subagents. It enables hierarchical agent architectures where specialized subagents handle focused tasks in dedicated context windows, returning only essential results to the parent. Beyond Claude's markdown-based format, the architecture is extensible—supporting A2A and other agentic protocols for…
Have you ever asked an AI agent to perform a complex multi-step task, only to find it skipped a critical step halfway through? You're not alone. Research shows that LLMs struggle with "lost in the middle" failures—forgetting tasks buried in long contexts.
When your agent juggles file edits, test execution, and documentation updates, important steps can silently disappear.
One solution, inspired by Claude Code, is to make planning explicit and observable with the help of a dedicated TodoWrite tool.
The result: agents that never skip steps and workflows you can observe in real-time. This is Part…
Traditional AI interactions follow a common pattern: you provide a prompt, the AI makes assumptions, and produces a response. When those assumptions don't match your needs, you're left iterating through corrections. Each assumption creates rework—wasting time and context. What if your AI agent could ask you clarifying questions before providing answers? The AskUserQuestionTool addresses this. It allows the AI agent to ask clarifying questions before answering, gathers requirements interactively, and creates a specification aligned with your actual needs from the start. Spring AI's…
subtitle: "LLM-Agnostic Skills That Run in Your Environment" Agent Skills are modular folders of instructions, scripts, and resources that AI agents can discover and load on demand. Instead of hardcoding knowledge into prompts or creating specialized tools for every task, skills provide a flexible way to extend agent capabilities. Spring AI's implementation brings Agent Skills to the Java ecosystem, ensuring LLM portability—define your skills once and use them with OpenAI, Anthropic, Google Gemini, or any other supported model. This is the first post in our Spring AI Agentic Patterns series…
When building AI agents with tool calling capabilities, developers often need insights into why an LLM chose a particular tool—not just which tool it selected. Understanding the model's reasoning process is important for debugging, observability, and building trustworthy AI systems. Spring AI now (2.0.0-SNAPSHOT/1.1.3-SNAPSHOT) includes the Tool Argument Augmenter feature that enables dynamic augmentation of tool input schemas with additional arguments before sending tool definitions to the LLM. This allows AI applications to capture extra information from the model—such as reasoning, inner…
As AI agents connect to more services—Slack, GitHub, Jira, MCP servers—tool libraries grow rapidly. A typical multi-server setup can easily have 50+ tools consuming 55,000+ tokens before any conversation starts. Worse, tool selection accuracy degrades when models face 30+ similarly-named tools. The Tool Search Tool pattern, pioneered by Anthropic, addresses this: instead of loading all tool definitions upfront, the model discovers tools on-demand. It receives only a search tool initially, queries for capabilities when needed, and gets relevant tool definitions expanded into context. This…
JSON is the go-to format for LLM tool responses, but recent discussions around alternative formats like TOON (Token-Oriented Object Notation) claim potential benefits in token efficiency and performance.
While the debate continues—with critical analyses pointing to context-dependent results—the question is: how to experiment with these formats in your own Spring AI applications? This article demonstrates how to configure Spring AI to convert tool responses between JSON, TOON, XML, CSV, and YAML, enabling you to decide what works best for your specific use case. Spring AI Tool Calling: A Quick…
The challenge of evaluating Large Language Model (LLM) outputs is critical for notoriously non-deterministic AI applications, especially as they move into production. Traditional metrics like ROUGE and BLEU fall short when assessing the nuanced, contextual responses that modern LLMs produce.
Human evaluation, while accurate, is expensive, slow, and doesn't scale. Enter LLM-as-a-Judge - a powerful technique that uses LLMs themselves to evaluate the quality of AI-generated content. Research shows that sophisticated judge models can align with human judgment up to 85%, which is actually higher…
The Spring AI ChatClient offers a fluent API for communicating with an AI model.
The fluent API provides methods for building the constituent parts of a prompt that gets passed to the AI model as input. Advisors are a key part of the fluent API that intercept, modify, and enhance AI-driven interactions.
The key benefits include encapsulating common Generative AI patterns, transforming data sent to and from Large Language Models (LLMs), and providing portability across various models and use cases. Advisors process ChatClientRequest and ChatClientResponse objects.
The framework chains advisors…