01Chapter 1: What a model call actually doesThis chapter assumes you can read basic Python and JSON, and that you know what an HTTP API request and response look like. You should have a general idea of what a large language model (LLM) is. You do not need to have built an agent before. Everything else, including tokens, statelessness, and the6 min read
02Chapter 2: Messages and roles: how a conversation is sentThis chapter assumes you can read JSON and Python, and that you know a language model takes text in and returns text. Here you learn what the harness actually sends on each model call, and why that format matters for agents.6 min read
03Chapter 3: The context window: the model's entire working memoryThis chapter assumes you can read Python and JSON. It also assumes you know that a model call takes text in and returns text out, and that a conversation is sent as a list of messages with roles. The chapter covers what the context window holds and what happens as it fills. It then covers how a harn7 min read
04Chapter 4: System prompt and project instructionsThis chapter assumes you know how messages and roles are sent to a model, and that the context window is the model's entire working memory. It also assumes you can read JSON and short Python. Here you will see what a system prompt is, what goes into it, how project instruction files reach it, and wh6 min read
05Chapter 5: Defining tools: names, descriptions, and schemasThis chapter assumes you can read JSON and basic Python, and that you know a model call is stateless and that a conversation is sent as a list of messages. Here you will learn what a tool definition contains, how the model uses it, and which mistakes make tools hard for a model to use.7 min read
06Chapter 6: Tool calls: the model asks, the harness actsThis chapter covers what happens between "the model wants to read a file" and "the model sees the file's contents." It assumes you know basic Python, JSON, and HTTP APIs, and that you have read the earlier chapters on messages, roles, and tool definitions.5 min read
07Chapter 7: The usual toolbox: read, search, edit, runThis chapter assumes you have read the earlier chapters on tool definitions and tool calls. You should know that a tool is a name, a description, and an input schema, and that the harness runs the function the model asks for. Here we look at which tools nearly every coding agent ships with, why thos6 min read
08Chapter 8: The agent loop, step by stepThis chapter assumes you can read basic Python and JSON. It also assumes you know that a model call is stateless, that a request is a list of role-tagged messages, and that a tool is a name, a description, and an input schema. Here those pieces are combined into the loop that makes a model behave li5 min read
09Chapter 9: Knowing when to stopThis chapter assumes you have read the earlier chapters on tool calls and the agent loop. You should be comfortable with the loop that calls the model, runs the requested tools, appends the results, and calls the model again. Here you will look at how that loop ends, which ways it can end badly, and7 min read
10Chapter 10: Errors and test output as feedbackThis chapter assumes you have read the earlier chapters on tool calls and the agent loop. You should know that the harness runs a tool and appends the result to the messages as text. Here you will see why errors are the main signal an agent uses to correct itself, and how to build a harness that ret6 min read
11Chapter 11: Keeping the context window usefulThis chapter assumes you have read the earlier chapters on the context window, tool results, and the agent loop. You should be comfortable with Python and with the idea that every model call receives the whole conversation again.6 min read
12Chapter 12: Permissions, approvals, and sandboxesA coding agent can read files, edit code, and run shell commands. Each of those actions can do damage if the model picks the wrong one. This chapter covers the controls the harness puts between a model's request and its execution.6 min read
13Chapter 13: Treating tool output as data, not instructionsA coding agent reads a lot of text it did not write: files, web pages, command output, issue comments, package READMEs. Every piece of that text enters the context window next to your instructions. This chapter covers why that is a security problem, how attacks work, and which controls reduce the ri7 min read
14Chapter 14: Planning and sub-agentsThis chapter assumes you have read the earlier chapters on the agent loop, stop conditions, and context management. You should be comfortable with the loop in which the model asks for tools, the harness runs them, and the results go back into the messages. Here you will see how a harness handles tas6 min read
15Chapter 15: Reading a trace to find out why an agent went wrongThis chapter assumes you know the pieces covered earlier in the tutorial. You should know that model calls are stateless, that messages carry roles, that the harness runs tools and appends their results, and that the context window is finite. You should also be comfortable reading JSON and short Pyt6 min read