Spring AI Agent Utils: A Java Agent Toolkit Reverse-Engineered from Claude Code's Core Features
Spring AI Agent Utils: A Java Agent To…
Spring AI Agent Utils reverse-engineers Claude Code's core features into a complete Java Agent toolkit.
The Spring AI community has released Agent Utils, a toolkit that reverse-engineers Claude Code's core capabilities. It includes five major modules: Skill (model-agnostic Function Call-based skills), Ask a User Question (intelligent interactive clarification), To Do Write (task planning and execution), Auto Memory (Markdown-based long-term memory), and A2A protocol-based multi-Agent orchestration. More suited for lightweight scenarios compared to Alibaba Agent Framework, it enables Java developers to build AI Agent applications without switching tech stacks.
Overview
The Spring AI community has quietly released a heavyweight toolkit — Spring AI Agent Utils — which directly reverse-engineers Claude Code's core features, bringing its powerful Agent capabilities into the Spring AI ecosystem. From tool encapsulation to skill modules and task orchestration, it covers everything, enabling Java developers to build powerful AI Agent applications without switching tech stacks.
Reportedly, this toolkit is tucked away in the Spring AI community, and 90% of Java developers haven't yet discovered its existence. This article provides an in-depth analysis of its core functional modules and practical application value.
Core Functional Modules
Skill: Function Call-Based Skill Implementation
The Skill module in Spring AI Agent Utils is implemented based on Function Call, with the biggest advantage being that it doesn't depend on any specific LLM. This means you can seamlessly switch between different LLMs without modifying any business code.
Function Call Technical Background: Function Call is the core mechanism for LLMs to interact with external tools. The principle is: developers pre-define a set of functions with their names, parameter structures, and descriptions. During inference, the model determines whether to call a function and generates structured call parameters, which the host program executes and returns results to the model for continued reasoning. OpenAI standardized this in 2023, followed by Anthropic, Google, and other major model providers, though implementation details and API formats vary across vendors. Spring AI abstracts away these differences through a unified abstraction layer, allowing the same Skill definitions to run on GPT-4, Claude, Qwen, and other models — this is the technical foundation for the Skill module being "model-agnostic."

For enterprise applications, this decoupled design is crucial. When you need to migrate from one model provider to another, you only need to change the configuration — the business logic layer remains completely unaffected. This aligns with Spring's longstanding design philosophy: program to interfaces, reduce coupling.
Ask a User Question: Intelligent Interactive Clarification
This module enables the Agent to proactively ask users multiple-choice questions during execution to clarify vague requirements. It specifically addresses the problem of unclear user prompts.
In real development scenarios, user requirement descriptions are often ambiguous. For example, when a user says "help me write an API," the Agent can use the Ask a User Question module to follow up: REST or GraphQL? What authentication method? What response format? Through multi-turn interaction, it precisely understands user intent.
To Do Write: Automatic Planning and Execution
The To Do Write module functions like an Agent's automatic planning feature, executing tasks step by step according to a planned checklist. It's essentially the classic Planning and Execute pattern in Agent architecture.
Planning and Execute Pattern Background: Planning and Execute is the most classic task decomposition paradigm in AI Agent architecture, systematically proposed in research such as Stanford's 2023 paper "Plan-and-Solve Prompting." Its core idea is separating "thinking" from "acting" for complex tasks: the Planner decomposes high-level goals into an ordered list of subtasks, while the Executor handles each subtask sequentially and manages exceptions. This differs from the traditional ReAct (Reasoning + Acting) pattern — ReAct interleaves reasoning and action, while Planning and Execute plans globally first then executes locally, making it more suitable for engineering tasks with clear steps and dependencies. Claude Code adopts this pattern for handling complex code generation requirements, and the To Do Write module brings it into the Spring ecosystem.
The Agent first breaks down complex tasks into multiple subtasks, forming a to-do list, then executes them one by one based on priority and dependencies. This approach is particularly suitable for multi-step development tasks, such as compound requirements like "create a complete CRUD module."
Auto Memory: Cross-Session Long-Term Memory
Auto Memory is Claude Code's classic long-term memory implementation, using Markdown files to store memory content. Even across sessions, the Agent can remember your preferences and project context.
Agent Long-Term Memory Technical Background: Agent memory systems are typically categorized into four types: short-term memory (current session context window), long-term memory (cross-session persistent storage), episodic memory (records of specific events), and semantic memory (abstracted knowledge). Mainstream long-term memory implementations include vector databases (e.g., Pinecone, Chroma), relational databases, and structured files. Claude Code's choice of Markdown files as the memory medium is a pragmatic engineering decision: Markdown format is LLM-friendly (training data contains abundant Markdown), human-readable and editable, and can be incorporated into Git version control. The Auto Memory module replicates this design. Compared to vector database approaches, it eliminates additional infrastructure dependencies, reduces deployment complexity, and is particularly suitable for development tool Agent scenarios.

This design is quite elegant — using Markdown files as the memory medium makes it both easy for humans to read and edit, and simple to version control. Developers can directly view and modify the Agent's "memory," achieving transparent and controllable AI collaboration.
Multi-Agent Orchestration: A2A Protocol-Based Collaboration
In complex task scenarios, a single Agent often falls short. Spring AI Agent Utils provides multi-Agent orchestration capabilities, implementing collaboration among multiple Agents based on the A2A (Agent-to-Agent) protocol.
A2A Protocol Background: The A2A (Agent-to-Agent) protocol is an open standard released by Google in April 2025 in collaboration with over 50 tech companies, aimed at solving interoperability issues between AI Agents built with different frameworks and by different vendors. Previously, multi-Agent system communication relied entirely on each framework's custom internal mechanisms, preventing cross-framework Agent collaboration. The A2A protocol defines standard interfaces for Agent capability discovery (Agent Card), task delegation, state synchronization, and result return, implemented via HTTP/SSE and naturally compatible with existing web infrastructure. Unlike Anthropic's MCP (Model Context Protocol), which focuses on connecting Agents with tools/data sources, A2A focuses on peer-to-peer collaboration between Agents. Spring AI Agent Utils' support for A2A means Agents built with this framework can interoperate with other Agent ecosystems that follow the A2A standard.
For example, an Agent responsible for code generation, one for code review, and one for test case writing can collaboratively complete an entire development workflow. The entire codebase is built on Spring Boot, providing Java developers with a familiar development experience.
Comparison with Alibaba Agent Framework

It should be objectively noted that Alibaba Agent Framework currently offers more comprehensive support for Agent development. Its advantages include:
- Full Spring AI Compatibility: All Spring AI capabilities can be used directly within Alibaba Agent Framework
- Workflow Orchestration: Provides Graph-based Workflow orchestration capabilities
- Out-of-the-Box Agents: Includes multiple pre-built Agents, lowering the development barrier
Graph-based Workflow Background: Graph-based Workflow orchestration is the mainstream architectural choice for current Agent frameworks, with representative implementations including LangGraph and LlamaIndex Workflows. Its core concept models the Agent's execution flow as a directed graph: nodes represent specific processing steps or Agents, edges represent control flow, supporting conditional branching, loops, parallel execution, and other complex topologies. Compared to linear Pipeline patterns, Graph patterns can express more complex business logic, such as "if code review fails, loop back to the generation node to regenerate." Alibaba Agent Framework's introduction of Graph-based Workflow fills the gap in Spring AI's complex flow orchestration, making it more suitable for enterprise Agent application scenarios requiring multi-round feedback and conditional routing.
Alibaba's strategy is "absorb + extend" — features updated in Spring AI become part of its foundational capabilities, upon which it provides richer higher-level abstractions.
Use Cases and Selection Recommendations

Choose Spring AI Agent Utils when:
- Developing lightweight Agent applications
- You don't want to introduce too many framework dependencies
- You need highly customizable Agent behavior
- Your project already deeply uses the Spring AI ecosystem
Choose Alibaba Agent Framework when:
- Building enterprise-grade complex Agent applications
- You need complete Workflow orchestration
- You want out-of-the-box solutions for rapid deployment
- You need richer Agent templates
Conclusion
The emergence of Spring AI Agent Utils marks another important step for the Java ecosystem in AI Agent development. It brings battle-tested patterns from Claude Code into the Spring ecosystem, enabling Java developers to build fully-featured AI Agents without learning Python or TypeScript.
For Java developers, there are now more choices: Spring AI + Agent Utils for lightweight scenarios, and Alibaba Agent Framework for complex scenarios. Regardless of the choice, Java's capabilities in AI application development are rapidly catching up.
Key Takeaways
- Spring AI Agent Utils reverse-engineers Claude Code's core features, including five major modules: Skill, Ask a User Question, To Do Write, Auto Memory, and multi-Agent orchestration
- The Skill module is implemented based on Function Call, is model-agnostic, and supports seamless cross-model switching
- Auto Memory uses Markdown files for long-term memory storage, supporting cross-session context retention
- Compared to Alibaba Agent Framework, Spring AI Agent Utils is better suited for lightweight Agent application development
- The entire toolkit is built on Spring Boot, allowing Java developers to build AI Agent applications with their familiar tech stack
Related articles
TutorialsCursor + Codex Dual-IDE Collaboration: A Practical Methodology for Open-Source Project Customization
A complete methodology for open-source project customization based on real-world experience, detailing the Cursor+Codex dual-IDE workflow, seven-stage process, MVP validation, and AI source code reading techniques.
TutorialsCursor Multi-Agent in Practice: Building a Full-Stack Next.js Blog in 50 Minutes
Build a full-stack blog in 50 minutes using Cursor IDE's multi-Agent mode with Next.js, Clerk auth, and Supabase. Learn the 4-phase AI Agent workflow and key integration pitfalls.
TutorialsBuilding an AI Software Factory from Scratch: A Cursor Engineer's Hands-On Experience with Multi-Agent Collaboration
Cursor engineer Eric shares practical insights on building an AI software factory: automation levels, guardrail design, parallel Agent management, and scaling to 1000+ Agents for 24/7 development.