Agent Harness with Spring AI

Building an Agent Harness with Spring AI

About “Building an Agent Harness with Spring AI”

This book teaches Java engineers to build an agent harness with Spring AI. The running example is the Log Incident Watcher. Read the chapters in order. Each chapter adds one idea. Run the code in each chapter before you read the next one. All examples use fake data and run offline.

What you will build

Figure 25.1. Every part of the course in one picture. The workflow only schedules; the three activities do all the I/O. The figure leaves out the step log from Chapter 19 and the triage cache from Chapter 22.

Course Content

  1. Start here
    1. Front matter
    2. Glossary
  2. Part 1: Foundations
    1. Chapter 1: Why a harness?
    2. Chapter 2: Project setup
    3. Chapter 3: The model call
    4. Chapter 4: Tools
  3. Part 2: The Loop
    1. Chapter 5: Writing the agent loop by hand
    2. Chapter 6: Termination
    3. Chapter 7: Guardrails
    4. Chapter 8: Graphs
    5. Chapter 9: Human-in-the-loop
  4. Part 3: Memory and Retrieval
    1. Chapter 10: Short-term memory with Spring AI Session
    2. Chapter 11: Embeddings and hybrid storage in PostgreSQL
    3. Chapter 12: Hybrid retrieval inside the loop
    4. Chapter 13: Retrieval quality
  5. Part 4: Skills and Agents
    1. Chapter 14: Skills as files
    2. Chapter 15: Skill selection
    3. Chapter 16: Sub-agents
    4. Chapter 17: Agent selection
    5. Chapter 18: Context isolation
  6. Part 5: Observability, Evaluation, and Cost
    1. Chapter 19: Step logging
    2. Chapter 20: A small eval set
    3. Chapter 21: Failure drills
    4. Chapter 22: Cost optimization
  7. Part 6: Durable Execution with Temporal
    1. Part 6: Durable Execution with Temporal
    2. Chapter 23: Run state and messages
    3. Chapter 24: Temporal basics for the watcher
  8. Part 7: Capstone
    1. Chapter 25: Assemble the Log Incident Watcher
  9. About this course
    1. Progress, open items, and changelog
docs