PATCHBOOK SERIES
Patchbook: LLMs are just APIs
Short, simple chapters that serve as a conceptual upgrade for software engineers.
The central thesis is simple: working with LLMs is ordinary software engineering. The model is a stateless engine: text in, text out, nothing kept. Your code holds the memory, writes the rules, and pays for every token. This book takes one call apart and builds the picture back up: the request, the roles, the rules, the budget, what a single call can do on its own, and the four ways it breaks. 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 ordinary parts add up to something familiar: the engine inside every coding agent you use.
Let us begin with Chapter 0: Introduction.
- Chapter 0: IntroductionWhat this book is, what you will learn, and who it is for.
- Chapter 1: It sounds more complicated than it actually isAI agents are a handful of primitives, not magic.
- Chapter 2: An agent is a for loopChatGPT, Claude Code, and other agents are just while loops.
- Chapter 3: How to send a chat request to an LLMTalking to an LLM is just a POST request with a sender and a message.
- Chapter 4: LLMs are statelessLLMs only remember the information you send in the current request.
- Chapter 5: System PromptsHow to shape LLM behavior with system prompts.
- Chapter 6: Context WindowsHow context windows bound LLM working memory, attention, and cost.
- Chapter 7: What can a single call do?How a single stateless LLM call performs classification, extraction, transformation, and evaluation.
- Chapter 8: GotchasCommon pitfalls when working with single LLM API calls, from hallucinations to format drift.