Skip to content

Building agents

From a bare model API to a working agent, one mechanism at a time.

0%
  1. getting started
  2. halfway
  3. almost there
  4. complete
Lesson plan (28 lessons, 28 live)
#LessonStatusModeMinutesCoversServesExerciseAfterIssue
Tool use
1What a tool call looks like on the wirebuilding-agents/how-a-model-calls-a-toolliveexplanation20 estimatetool-usedefines-a-tooljudge#182
2Building your first agentbuilding-agents/agent-looplivetutorial20 estimateagent-loopdefines-a-toolimplements-the-loopdo
3Writing a tool schema the model uses correctlybuilding-agents/tool-schemaslivetutorial25 estimatetool-usedefines-a-tooldoBuilding your first agent
4When a tool failsbuilding-agents/tool-errorslivetutorial25 estimatetool-usedefines-a-toolimplements-the-loopdoBuilding your first agent
5Approving a risky tool callbuilding-agents/approving-a-tool-calllivetutorial30 estimatetool-usegates-risky-toolsdoWhen a tool fails#674
6Several tool calls in one turnbuilding-agents/parallel-tool-callslivetutorial25 estimatetool-useimplements-the-loopdoWhen a tool fails
The agent loop and harness
7Stopping the loop on purposebuilding-agents/stopping-the-looplivetutorial25 estimateagent-loopimplements-the-loopdoBuilding your first agent, When a tool fails
8Rebuilding the loop on an agent SDKbuilding-agents/loop-on-an-sdkliveexplanation25 estimateagent-loopuses-an-sdkjudgeStopping the loop on purpose, Several tool calls in one turn#196
Agentic retrieval and memory
9Retrieval as a tool the agent callsbuilding-agents/retrieval-as-a-toollivetutorial30 estimateretrieval-memoryadds-retrievaldoStopping the loop on purpose#198
10Where an agent's memory livesbuilding-agents/agent-memoryliveexplanation25 estimateretrieval-memoryadds-retrievaljudgeRetrieval as a tool the agent calls#199
Evaluation and testing
11Turning good into a rubricbuilding-agents/rubricsliveexplanation25 estimateevaluationwrites-a-rubricjudgeRetrieval as a tool the agent calls#200
12A golden set is the agent's regression suitebuilding-agents/golden-setslivetutorial25 estimateevaluationbuilds-a-golden-setdoTurning good into a rubric#201
13Recording and grading the path the agent tookbuilding-agents/traces-and-trajectorieslivetutorial30 estimateevaluationgrades-trajectoriesdoA golden set is the agent's regression suite#202
14Reading failures one by onebuilding-agents/error-analysisliveexplanation30 estimateevaluationgrades-trajectoriesprioritizes-fixesbuilds-a-golden-setjudgeRecording and grading the path the agent took#203
15A model as the graderbuilding-agents/llm-as-judgelivetutorial30 estimateevaluationwrites-a-rubricavoids-gamed-metricsjudgeTurning good into a rubric, A golden set is the agent's regression suite#204
Design patterns
16Workflows before agentsbuilding-agents/workflows-before-agentsliveexplanation25 estimatepatternspicks-a-patternjudgeStopping the loop on purpose, Turning good into a rubric#676
17Reasoning before each actionbuilding-agents/reactlivetutorial20 estimatepatternspicks-a-patterndoStopping the loop on purpose, Turning good into a rubric
18A second pass that critiques the firstbuilding-agents/reflectionlivetutorial25 estimatepatternspicks-a-patterndoReasoning before each action, Turning good into a rubric
19Writing the plan before taking the stepsbuilding-agents/planninglivetutorial30 estimatepatternspicks-a-patterndoReasoning before each action
20Plan everything first or react step by stepbuilding-agents/plan-or-reactliveexplanation25 estimatepatternspicks-a-patterncomposes-patternsjudgeWriting the plan before taking the steps, A second pass that critiques the first#208
Orchestration and multi-agent
21Orchestration in code or by a modelbuilding-agents/orchestrating-agentslivetutorial30 estimateorchestrationjustifies-orchestration-costcomposes-patternsdoPlan everything first or react step by step#209
22What every extra agent costsbuilding-agents/orchestration-taxliveexplanation25 estimateorchestrationjustifies-orchestration-costjudgeOrchestration in code or by a model, A golden set is the agent's regression suite#210
Guardrails and production
23How a running agent gets attackedbuilding-agents/agent-attack-surfaceliveexplanation25 estimateproductionmitigates-agent-risksjudgeWhen a tool fails, Recording and grading the path the agent took#211
24Guardrails in layersbuilding-agents/guardrails-in-layerslivetutorial35 estimateproductionlayers-defensesmitigates-agent-risksdoHow a running agent gets attacked, Stopping the loop on purpose, Recording and grading the path the agent took#212
25Gating a deploy on the evaluationbuilding-agents/eval-gated-deployslivetutorial30 estimateproductiongates-on-evalsmanages-cost-and-rolloutdoA golden set is the agent's regression suite, A model as the grader, Guardrails in layers#213
26Growing the evaluation set from tracesbuilding-agents/evals-from-traceslivetutorial45 estimateproductiongrows-the-set-from-usedoGating a deploy on the evaluation#675
27Cost, caching and pinning the modelbuilding-agents/cost-and-provider-operationslivetutorial30 estimateproductionmanages-cost-and-rolloutdoGating a deploy on the evaluation#214
28Protocols for tools and for other agentsbuilding-agents/agent-protocolsliveexplanation25 estimateproductionmitigates-agent-risksjudgeWhat a tool call looks like on the wire, Guardrails in layers, What every extra agent costs#215