Chapters 1–4
Agent fundamentals
What is an AI agent? A guide to the loop, the harness, the engine underneath and when not to build one. Chapters 1 and 2 are free to read.
Home / Learn
Everything here is free and runs in your browser. The guides follow the book’s parts; the tools compute what the chapters teach; the explainers show it in three minutes. Teaching a course? See the teaching kit.
Chapters 1–4
What is an AI agent? A guide to the loop, the harness, the engine underneath and when not to build one. Chapters 1 and 2 are free to read.
Chapters 5–6
Tools for AI agents, explained: task-shaped tools, schemas, sandboxes, skills and protocols such as MCP. Start with Chapter 2, free to read.
Chapters 7–9
Context engineering for AI agents: the desk, the four operations, RAG vs long context vs fine-tuning, and memory. Start with the free chapter on the desk.
Chapters 10–14
AI agent design patterns that survive production: chains with gates, routing, evaluator loops, orchestrator–worker, approval gates. Start with the guide.
Chapters 15–16
How to evaluate AI agents: trace every run, grow an eval set from real failures, read pass@k and pass^k, calibrate the judge, gate releases. Start here.
Chapters 17–20
AI agent security risks, reliability and cost in one guide: prompt injection, the lethal trifecta, guardrails, retries, token bills, rollouts. Start here.
Chapters 21–27
AI agents in practice: why coding led, the spec-plan-execute workflow, the verification gap in research, trust, recipes and classifiers. Start the guide.
Chapter 15
A field guide to AI agent bugs: start from the symptom, answer the trace questions, get ranked suspects, the book's fix, and an eval case for each failure.
Chapter 19
Estimate what one agent run costs in tokens: the fixed prompt, the history it re-reads every step, retries and subagents. Free AI agent cost estimator.
Chapter 25
Match your work to one of eight recurring agent recipes, see where it sits on the autonomy slider, how it fails, and which safeguards must be in place.
Chapter 1
Score an AI agent on twelve questions, one per Part of the book: how would you know it worked? Get a total out of 24, a radar by Part, and the chapters to open.
Chapter 26
Estimate what a cheap screen in front of an LLM classifier saves: cost per day, the break-even escalation rate, and the wrong labels it lets through unchecked.
Chapter 18
A retry storm simulator for agent tools: compare immediate retries, backoff and jitter, count nested retries, and see what a circuit breaker saves.
Chapter 2
A free compounding error calculator for AI agents: whole-run success from per-step reliability, and the reliability a long task needs.
Chapter 12
Build a human in the loop approval policy for your AI agent: sort each action into four consequence tiers and get the gate each one needs. Try it free.
Chapter 7
A free context window budget planner: see how full your agent's window is, when it crosses the 40% rule of thumb, and which of four fixes to apply.
Chapter 16
A free eval sample size calculator for AI agents: confidence intervals for a pass rate and the number of tasks you need, computed in your browser.
Chapter 18
Agent harness engineering as a worksheet: sort your controls into guides and sensors, see which cells are empty, and gauge how much harness you need.
Chapter 16
A free LLM judge agreement calculator: Cohen's kappa with an interval, precision and recall, the level check and bias tests. Paste your labels to start.
Chapter 17
A lethal trifecta checklist for AI agents: see which legs your design holds, whether a sharp tool adds risk, and the cheapest leg to cut. Print the audit.
Chapter 11
Pick the symptom your multi-agent run showed, read the seam behind it and the fix, check a worker brief for four fields, and decide whether to split.
Chapter 6
Count the M×N integration problem for your agents: adapters wired by hand versus one shared protocol, what an addition costs, and when a direct call wins.
Chapter 16
Compute pass@k and pass^k for an AI agent from its per-attempt success rate or your own runs, and see the reliability envelope. Free pass@k calculator.
Chapter 19
A prompt caching calculator for agent runs: see which input tokens hit the cache, what a misplaced timestamp costs, and what moving it to the tail saves.
Chapter 20
Model AI agent rate limiting: your ceiling in runs per minute, what a queue does in a rush, and why refusing at the door beats accepting and abandoning.
Chapter 23
Work out the return on an AI agent use case after the cost of checking its output, place it on a value-versus-risk map, and see when to refuse.
Chapter 20
Build an AI agent rollout plan: which rungs your change must climb (eval gate, shadow deploy, canary, ramp), what to watch at each, and how to roll back.
Chapter 3
An agent loop simulator: play the harness for a scripted run, choose append, retry, stop or escalate on each pass, and see which failures you cause.
Chapter 14
When to use AI agents, and when plain code, one model call or a workflow does the job better. Answer ten questions and see where your task sits on the ladder.
Chapter 6
Budget the context cost of agent skills: the standing menu, what one task loads under progressive disclosure, and a check of whether a description fires.
Chapter 17
A prompt injection game: read a poisoned inbox, grant an agent its tools and settings, run it, and see what leaks. Keep the most capability with no leak.
Chapter 26
Split labeled examples for an LLM classifier into prompt demonstrations, a development set and a sealed test set, with a duplicate check. Runs in your browser.
Chapter 5
A free tool schema linter for LLM agents: paste a tool definition and get findings on its name, description, schema, side effects and hidden injections.
Chapter 15
Load one agent run as JSON and read it as a span waterfall: missing attributes per span, flags for loops, cut results and errors, and a diff of two runs.
4 min · Chapter 7
An animated explainer of context rot: why a fuller window makes an agent dumber, the five ways context fails, and the four operations that fix it.
3 min · Chapter 3
A three-minute animated explainer of the agent loop: the four beats of every pass, the history that is the agent's only memory, and three exits ranked by trust.
4 min · Chapter 17
A short animated explainer of the lethal trifecta: three agent capabilities that are fine alone, the theft when they meet, and the one leg to cut.
3 min · Chapter 1
A three-minute animated explainer: chatbot, workflow and agent differ in one thing, who decides the next step. Then the litmus test and the autonomy dial.
4 min · Chapter 19
A four-minute animated explainer: every agent step re-sends the whole transcript, so a ten-step run reads 77,000 tokens, not 32,000. See the staircase.
3 min · Chapter 2
A three-minute animated explainer: a hundred runs fall away down a chain of 95% steps, why pⁿ is the optimistic case, and the three levers that fight back.
23 min
An AI agent evaluation checklist in six stages, from the first eval to production, each check with the evidence that proves it. Tick it against your agent.
19 min
AI agent examples sorted by what makes each one an agent: its loop, tools, stop rule, outside check and blast radius. Classify your own. Read Chapter 1.
19 min
How to choose an AI agent framework without a ranking: eight jobs it can own, a scoring rubric, a three-day spike and the red flags. Copy the rubric.
23 min
Agent memory architecture in one page: four kinds of memory ranked by write risk, three designs compared, and a write policy to copy. Pick your design.
19 min
Agent observability records what an agent did. See which questions a trace answers, which need a judgment, and how traces become evals. Copy the note.
23 min
Design agent tools and schemas for software built for humans: choose a surface per operation, wrap it in a five-part contract. Copy the checklist.
Get the free PDF sample, the preface and all of Part I, plus a two-page checklist: does this need an agent at all, and would you know if it failed? Then a few short emails on verifying agents. One-click unsubscribe.