
Section
Build
The choices you make once the loop runs: a workflow or an agent, tools a model uses well, streaming, answers in a fixed shape, long contexts, parallel work, sub-agents, and MCP.
- Build your first agent A complete agent in a few short files of standard-library Go, run offline and then on your own files.
- Workflow or agent? Five shapes of program that call a model, and how to pick the simplest one that handles the task.
- Designing tools What the model sees of a tool, and how to write names, schemas, results, and errors it uses well.
- Streaming replies Reading server-sent events with bufio and an iterator, and rebuilding tool calls from fragments.
- Structured output Get a typed, checked answer from any tool-calling model by making the answer a final tool.
- Context management Five ways to keep a long run affordable and on task, and what each did on a 99-report batch.
- Parallel tool calls Which tool calls can safely overlap, a runner that keeps the model’s order, and what it saves.
- Sub-agents Run your agent loop again inside a tool to answer one question, and when that doesn’t pay off.
- MCP in Go The Model Context Protocol on the wire, a Go client for it, and how far to trust another program’s tools.
Each design page names the problem, shows the design in Go, and says what it cost when the book measured it, with a short list of when to reach for it and when to leave it out.