A free book · no signup · nothing for sale

Building an agent is easy.

Building one that survives production is software engineering.

This is a book. The first chapter is one API call. By the last it is a system that survives crashes, waits three days for a human without holding a thread open, and treats every document it reads as written by an attacker. You do not need to have built an agent before. The prerequisite is the backend engineering you already have.

Read the whole book in the browser, free. Really. No email gate, no account, no course waiting for you at the end.

Who this is for

You write software. You may have called an LLM API, you may not have. Either way you have not built an agent yet, and the word itself still covers a chatbot with a good system prompt, a script that calls an API twice, and a fictional colleague that will allegedly run your company.

You do not need a machine-learning background, and not because this is ML made easy. It is a different job. ML engineering makes a model behave. This is the work of making a system behave, with a model you did not train, cannot inspect and do not control sitting in the middle of it.

  • a typed language
  • HTTP APIs
  • enough SQL to inspect real data
  • systems that can fail halfway through

What this book is not

Not a framework manual
LangChain, LangGraph, Temporal and the AI SDK all have documentation, and it is better than anything a book could reproduce. This covers what those docs assume you already know.
Not prompt engineering
What generalizes is here. How tokens and context work, how tool schemas shape behavior, why your agent is nondeterministic. What expires the week a new model ships is not.
Not machine learning
Nothing here trains a model. You will choose models, embeddings and rerankers, and decide when a fine-tune is the right answer. That is an engineering call, not a training run.
Not neutral
Multi-agent architectures are usually a mistake. Most RAG pipelines should have been a tool call. A lot of what gets called an agent should be three if-statements. You are free to disagree.

Everything in the book

23 parts, 214 chapters. The first half makes you do retrieval engineering properly. Knowing when a question is semantic, when it is lexical, when it is SQL, and when the index is a stale copy of a live system. The second half does the same for durability.

Read in order

Consulted as needed

Start at the preface.

It takes about ten minutes and tells you whether the rest is worth your time. Nothing is gated. Nothing is for sale.