Important
This repository is no longer maintained.
Active development has moved to markpollack/agent-client-tutorial. Current documentation is available at lab.pollack.ai.
This repository remains available for historical Spring AI Community releases. Its Apache 2.0 license and historical contents are unchanged. Please submit new issues and pull requests to the active repository.
Progressive examples for the Spring AI Agent Client — a portable abstraction for agentic CLI tools (Claude Code, OpenAI Codex, Gemini CLI).
| # | Example | What It Demonstrates |
|---|---|---|
| 01 | create-file | Simplest task — create a file — with all three providers |
git clone https://github.com/spring-ai-community/agent-client-tutorial.git
cd agent-client-tutorial
# Run with Claude (default)
./mvnw spring-boot:run -pl 01-create-file
# Run with Codex
./mvnw spring-boot:run -pl 01-create-file -Dspring.profiles.active=codex
# Run with Gemini
./mvnw spring-boot:run -pl 01-create-file -Dspring.profiles.active=gemini- Java 17+
- At least one agentic CLI installed and authenticated:
| Provider | Install | Auth |
|---|---|---|
| Claude Code | npm install -g @anthropic-ai/claude-code |
claude auth login |
| OpenAI Codex | npm install -g @openai/codex |
Set OPENAI_API_KEY |
| Gemini CLI | npm install -g @anthropic-ai/gemini-cli |
Set GOOGLE_API_KEY |