Tutorial Source Code
Clone the repo and follow along:
git clone https://github.com/markpollack/agent-client-tutorial.gitLearning Path
This tutorial takes you from zero to running real agent tasks. Each lesson builds on the previous one, progressing from simple file creation to multi-step git operations.First Task
Create a file using an agent β the simplest possible task. Set up a project, configure a provider, and verify the result.Start Lesson 1 β
Multi-Provider
Run the same task with Claude, Codex, and Gemini. The client code stays the same β only the model construction changes.Start Lesson 2 β
Read and Transform
Read log files, count severity levels, and write a structured CSV summary. Agents working with existing files and producing structured output.Start Lesson 3 β
Git Operations
Find lost commits on a detached HEAD and merge them into master. Agents working with version control and multi-step reasoning.Start Lesson 4 β
Prerequisites
- Java 17+
- Maven 3.9+
- At least one CLI agent installed:
- Claude Code:
npm install -g @anthropic-ai/claude-code - Codex CLI:
npm install -g @openai/codex - Gemini CLI:
npm install -g @google/gemini-cli
- Claude Code:
Source Code
All tutorial code is available in the agent-client-tutorial repository:| Lesson | Directory | What it demonstrates |
|---|---|---|
| 01 | 01-create-file/ | Simplest task β create a file |
| 02 | (doc-only) | Multi-provider portability |
| 03 | 02-read-and-transform/ | File reading, data transformation, structured output |
| 04 | 03-git-operations/ | Git history inspection, merge recovery |