Prerequisites
- Java 17 or later
- Maven 3.8+ (or use the included
./mvnwwrapper) - For client modules (01-11, 21): Gemini CLI with
--experimental-acpflag, and aGEMINI_API_KEY. The tutorial uses Gemini as a real ACP agent to talk to — the SDK launches it as a subprocess and communicates over stdin/stdout. - For agent modules (12-20, 22, 31): no external dependencies. You build the agent and the tutorial provides a test client that launches it.
- For the AI chatbot modules (25-27): an
ANTHROPIC_API_KEY, which the agent actually uses to call the model. - For the agent-client module (32): the Claude CLI installed and logged in, run without
ANTHROPIC_API_KEY.
Tutorial Structure
Getting the Code
Running a Module
Agent modules run locally with no API key:GEMINI_API_KEY:
Three Agent API Styles
The SDK provides three ways to build agents:
The tutorial uses Sync for agent examples (most accessible to most developers) and introduces annotations and async where relevant.