Building agents with the Claude Agent SDK
A four-part course that takes you from your first agent to production operations and the 2026 catalog of agentic design patterns, with runnable code in Python and TypeScript and the real output of every run.
Every part reads two ways. Developers follow the code, the captured run and the walkthrough. Readers who do not code expand the Plain-English version at the top of each section. Nothing here is hypothetical: each script in the examples folder was executed, and the output you see is the output it produced.

Parts
4 parts · 2 hours 20 min · 21,525 wordsBuild an agent
What an agent is, how the loop works, and how to give it tools, boundaries and memory.
9 sections02Extending your agent: tools, permissions, hooks, subagents, sessions, prompts, skillsCustom and MCP tools, permissions, hooks, subagents, sessions, system prompts, CLAUDE.md, skills and plugins.24 min
8 sections
Operate and architect
Running agents safely at scale, then the design patterns that make them reliable.
10 sections04Agentic design patterns in 2026: loops, graphs and harnesses, implemented with the Claude Agent SDKA 58-pattern catalog: workflows, goal loops, eval gates, context and graph engineering, handoffs, swarms, agentic RAG. Ten run for real.1 hour 5 min
15 sections
About this tutorial
Read me firstThe Claude Agent SDK is Claude Code packaged as a library: Anthropic's own coding agent, driven from your Python or TypeScript program. This tutorial covers it end to end in four parts, from your first agent to production operations and the design patterns that make agents reliable.
The code. All 32 Python scripts, the TypeScript agent, the tiny sample project they run against and the captured output of every run are in the examples folder, browsable file by file or as one zip. Running a demo costs a few cents to about thirty cents; the graph, voting and debate demos spawn several agents.
How it was verified
Versions and methodEvery script was executed against claude-agent-sdk 0.2.159 for Python (which bundles Claude Code CLI 2.1.281) and @anthropic-ai/claude-agent-sdk 0.3.301 for TypeScript (CLI 2.1.301), and the output quoted in each part is the captured stdout of that run, kept in examples/outputs/. Model names, session IDs, costs and the tool list in that output depend on your Claude Code version and configuration, so yours will differ in those details. Behaviour that differs between the two SDKs is called out where it appears, and part 3 ends with a side-by-side cheat sheet.
When the SDKs change in a way that affects a part, that part is re-verified and the date at the top of the page moves. Corrections are welcome on LinkedIn.
