01Chapter 1: What a model call actually doesA coding agent looks like a collaborator that remembers your project. Underneath, it is a program that makes repeated calls to a language model. This chapter explains what one call does, because every later idea in this tutorial builds on it.3 min read
02Chapter 2: Messages and roles: how a conversation is sentThis chapter assumes you can read Python and JSON, have called an HTTP API, and know that a language model turns text into more text. The previous chapter showed that a model call is stateless. This chapter shows what the harness sends on each call to make up for that.2 min read
03Chapter 3: The context window: the model's entire working memoryThis chapter assumes you know basic Python, JSON, and how a model call is made as a stateless request. It also assumes you know that a conversation is sent as a list of role-tagged messages. If those are unfamiliar, review the two previous chapters first.3 min read
04Chapter 4: System prompt and project instructionsThis chapter assumes you know how messages and roles are sent to a model, and that you understand the context window as a fixed budget. It covers what the system prompt is, where project instructions fit in, and the errors that come from misusing both.3 min read
05Chapter 5: Defining tools: names, descriptions, and schemasThis chapter assumes you can read JSON and JSON Schema basics, and that you know a model call is stateless: the harness sends the full conversation each time. Here you will see how a tool is described to the model, and what makes a definition work well or badly.3 min read
06Chapter 6: Tool calls: the model asks, the harness actsThis chapter assumes you know basic Python, JSON, and how a chat-style model API sends a list of messages. It also assumes you have seen a tool definition (a name, a description, and an input schema). Here you will see what happens after the model decides to use one.3 min read
07Chapter 7: The usual toolbox: read, search, edit, runThis chapter assumes you know what a tool definition is and how a tool call moves between the model and the harness. It covers the four kinds of tools most coding agents ship with and the mistakes each one invites.3 min read
08Chapter 8: The agent loop, step by stepThis chapter assumes you know basic Python, JSON, and how tool definitions and tool calls work (the two chapters before this one). Here you will see how those pieces fit into one repeating cycle.2 min read
09Chapter 9: Knowing when to stopThis chapter assumes you have read the agent loop chapter and can follow a Python for loop over model replies and tool results.2 min read
10Chapter 10: Errors and test output as feedbackThis chapter assumes you have read the chapters on tool calls and the agent loop. You should know that the harness runs a tool and appends its result to the messages as text. Here we look at what happens when that result is an error or a failing test.2 min read
11Chapter 11: Keeping the context window usefulThis chapter assumes you know that a model call is stateless and that the harness resends the whole message list on every call. It also assumes you have seen the agent loop and the tool results it appends. Here you will learn how to keep that list from filling up with noise.2 min read
12Chapter 12: Permissions, approvals, and sandboxesThis chapter assumes you can read the agent loop from the earlier chapters and write basic Python. It covers how a harness limits what an agent can do, because the model's tool calls run with your privileges.2 min read
13Chapter 13: Treating tool output as data, not instructionsThis chapter assumes you know how the agent loop feeds tool results back to the model as text, and that the model sees system prompts, user messages, and tool results in one context window. If those ideas are new, read the earlier chapters on messages and tool calling first.3 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 a loop that calls a model, runs tools, and appends results to a message list.2 min read
15Chapter 15: Reading a trace to find out why an agent went wrongThis chapter assumes you know what a message trace is (the ordered list of system, user, assistant, and tool messages), how the agent loop in the earlier chapters works, and how tool results come back as text. You should be comfortable reading JSON and short Python.2 min read