Building with the Claude Agent SDK
If you have ever hand-written a while response.stop_reason == "tool_use" loop, you already built a rougher version of what the Claude Agent SDK hands you. This series is about the layer you wished existed: the agent loop, tool calling, streaming, context, and permissions, delivered as a library instead of a thing you maintain.
Building with the Claude Agent SDK walks from your first agent run to production. It takes the lid off the loop so you can name and reason about every part, then builds outward: custom tools, project context, streaming output, subagents, skills, plugins, and the deployment realities most demos skip.
Start at Part 1, or jump to any part below.
The parts
- You Already Wrote the Agent Loop. The Claude Agent SDK Deletes It.
- The Agent Loop Is Just a While Loop You Did Not Have to Write
- Your AI Agent Already Knows What It Is Doing. Streaming Is How You Let the User Watch.
- An AI Agent With Shell Access Is a Loaded Gun. Permissions Are the Safety.
- Your Agent Hit Its Turn Limit Halfway Through. Do Not Start Over. Resume It.
- Stop Pasting Your Coding Standards Into Every Prompt. Put Them on Disk.
- The Built-In Tools Got You Started. These Three Moves Are How the Agent Grows Up.
- Permissions Ask the Model for Permission. Hooks Do Not Ask Anyone.
- Your Agent Works. Now Prove It: Typed Output, Real Costs, and Traces You Can Search
- You Cannot Deploy an AI Agent Like a Lambda
- You Built a Test Tool, a Reviewer, and an Audit Hook. Stop Wiring Them by Hand.
- You Can Build Any Agent. The Harder Question Is Which One You Should.
- The Ten Errors You Will Actually Hit With the Claude Agent SDK
- How to Build an AI Agent That Researches, Cites, and Checks Its Own Work