Overview
Spring AI Agent Utils brings Claude Code-inspired tools and agent skills to Spring AI applications. This library reimplements core Claude Code capabilities as Spring AI tools, enabling sophisticated agentic workflows with file operations, shell execution, web access, task management, and extensible agent skills.Version: 0.4.0 • Requires Spring AI 2.0.0-SNAPSHOT or 2.0.0-M2
Tool Categories
File System Tools
Read, write, and edit files with precise control
Shell Tools
Execute commands with timeout, background processes, and output filtering
Search Tools
Grep and Glob for fast code search and file pattern matching
Web Tools
AI-powered web fetch with caching and Brave search integration
Task Management
Todo tracking and multi-agent task orchestration
Sub-Agent System
Extensible sub-agents with A2A protocol support
Agent Skills
Reusable knowledge modules in Markdown with YAML front-matter
Quick Start
Add Dependency
Configure Your Agent
Core Tools
FileSystemTools
Read, write, and edit files with precise control:readFile, writeFile, editFile, listDirectory
ShellTools
Execute shell commands with timeout control and background process management:GrepTool
Pure Java grep implementation for code search:GlobTool
Fast file pattern matching:**/*.java, src/**/*.ts
SmartWebFetchTool
AI-powered web content summarization with caching:BraveWebSearchTool
Web search with domain filtering:User Interaction
AskUserQuestionTool
Ask users clarifying questions during agent execution:Task Management
TodoWriteTool
Structured task management with state tracking:pending, in_progress, completed
TaskTools (Sub-Agents)
Extensible sub-agent system for delegating complex tasks to specialized agents:- Multi-model routing - Use different models for different sub-agents
- Pluggable backends - Claude-style, A2A protocol, or custom implementations
- Background task execution - Run sub-agents asynchronously
- Task output retrieval - Get results from background tasks
A2A Protocol Support
The sub-agent architecture supports the A2A (Agent-to-Agent) protocol for interoperability with external agents:SubagentResolver- Discovers and loads sub-agent definitionsSubagentExecutor- Executes tasks on sub-agentsSubagentDefinition- Describes a sub-agent’s capabilities
Agent Skills
Extend AI capabilities with reusable knowledge modules:AgentEnvironment
Dynamic context utility for system prompts:Examples
Requirements
- Java 17+
- Spring Boot 3.x / 4.x
- Spring AI 2.0.0-SNAPSHOT or 2.0.0-M2
Resources
GitHub Repository
Source code, examples, and detailed documentation
Claude Code Docs
Original Claude Code documentation (inspiration)