v1.1: Consolidated into one document. Spring Boot 4.1.1, Spring AI 2.0.1, Session 0.6.0, Temporal 1.35.0.
v1.2: Chapters 2 to 4 match the course repository. Gradle build, application.yaml, TestController, Javadoc, and recorded replies.
v1.3: Chapters 5 and 6 rewritten around the repository code. askHaltToolCall shows a tool call as data. AgentLoop and RunResult implement five stop reasons, each tested on Gemma. requests/harness.http holds every test request.
v1.4: Lombok @RequiredArgsConstructor replaces hand-written constructors. AiConfig provides one shared ChatClient. AgentLoop uses plain loops in place of streams. Lombok pinned to 1.18.48 for Java 27.
v1.5: Readable DEBUG logs. Spring AI logs each prompt, reply, and tool run; [auto], [halt], [loop], and [tool] lines mark each path. Chapters 2 to 6 show real log excerpts. Actuator added for Spring AI observations.
v1.6: Chapters 1 to 6 explain each Spring AI idea with diagrams redrawn from the Spring AI reference. Ch. 1: tool calling in six steps. Ch. 2: the chat model family. Ch. 3: message roles, the ChatModel conversion, and .content() as the call that sends the request. Ch. 4: advisors, the tool calling loop, and its sequence. Ch. 5: the recursive advisor, the tool call message classes, and ToolCallingManager. Ch. 6: Spring AI’s own tool call limits. Glossary adds Advisor.
v1.7: The Spring Boot code moves to the java/ folder, to make room for a Python track. Existing clones: pull, then open java/ in your IDE and run ./gradlew bootRun from there. Chapters 2 to 6 add a Python track: every code sample has a Java tab and a Python tab, and python/ holds the same app in LangChain 1.4 and FastAPI. Both apps answer every request in requests/harness.http.
v1.8: Chapter 7 rewritten around the repository code. Guardrails blocks a question with a listed word, with the new stop reason BLOCKED, and checks each tool call’s name and arguments before the tool runs. The Chapter 4 path adds Spring AI’s SafeGuardAdvisor, and a matching SafeGuardMiddleware in Python. The Git history now has one commit for each chapter, tagged chapter-01 to chapter-07. Existing clones: clone the repository again, or run git fetch origin --tags --force and git reset --hard origin/main. The reset drops local changes.
v1.9 (this document): Chapter 8 rewritten around the repository code. AgentLoop runs as a graph of four nodes: checkQuestion, callModel, checkLimits, and runTools. Java uses a small Graph runner. Python uses LangGraph’s StateGraph. RunState holds the data of one run. STEP_LIMIT is now checked before the last step’s tools run, so no tool runs for a result the model never reads. Unit tests with a scripted model cover every edge: ./gradlew test and uv run pytest. GET /graph returns the graph as Mermaid text. New tag: chapter-08. Pull as usual.