PATCHBOOK SERIES
Patchbook: Agents are just loops
Short, simple chapters that serve as a conceptual upgrade for software engineers.
The central thesis is simple: you do not need an agent framework to have an agent. An agent is four plain parts: an HTTP call, an array, some JSON, and a loop. This book follows that loop as it learns to read, to act, and to remember. Every chapter ends with a prompt you can paste into your own chat, so you can watch each idea happen. By the last page, the parts add up to something familiar: the coding agent you use every day.
In development. Chapters will appear below as they are written.
Let us begin with Chapter 0: Introduction.
- Chapter 0: IntroductionWhat this book is, what you will learn, and who it is for.
- Chapter 1: Why agents matterThe case for knowing the machine: what that buys you, and the shift that turns human language into a programming language.
- Chapter 2: The simplest agentThe loop every agent is built from: input, memory, API call, response, display.
- Chapter 3: Knowledge in the loopRAG and attachments: two ways external knowledge enters the loop.
- Chapter 4: The first way to actFrom JSON output to the tool contract: how a model learns to act.
- Chapter 5: The toolboxRead tools, the surgical write idiom, and bash: the filesystem toolbox.
- Chapter 6: MemoryCompaction and sessions: how the loop manages its own memory, and the machine, assembled.