06-reference

claude agent sdk guide

Sun Apr 05 2026 20:00:00 GMT-0400 (Eastern Daylight Time) ·article ·source: https://x.com/dabit3/status/2009131298250428923 ·by Nader Dabit

Complete Guide to Building Agents with the Claude Agent SDK

Summary

Nader Dabit walks through building a code review agent from scratch using the Claude Agent SDK (@anthropic-ai/claude-agent-sdk). The SDK exposes the same engine that powers Claude Code as a library — the agent loop, built-in tools (Read, Write, Edit, Bash, Glob, Grep, WebSearch, WebFetch), and context management. The tutorial covers setup in TypeScript, configuring the agent loop, wiring tools, and managing context windows. Stack: Claude Code CLI, @anthropic-ai/claude-agent-sdk, TypeScript, Claude Opus 4.5.

Why This Was Bookmarked

“complete guide to building agents with the Claude Agent SDK”

The SDK is the next evolution of how we run agents. Our current architecture in SOUL.md runs everything through Claude Code sessions — the SDK lets us build standalone, specialized agents that use the same engine without the CLI wrapper. This is the path from “one COO agent doing everything” to “a team of purpose-built agents.”

Key Ideas

Connections

This is the bridge between our current setup and a multi-agent architecture. Right now we run everything through Claude Code channels (see 04-tooling/2026-03-29-infrastructure-decisions). The SDK would let us spin up dedicated agents for specific functions — each one a standalone skill in the 06-reference/concepts/skills-as-building-blocks sense.

The built-in tool set maps directly to the nine skill categories from 06-reference/2026-04-04-anthropic-skills-internally — the SDK agents would use the same primitives our skills already use.

Compared to 06-reference/2026-04-04-snap-agent-format, the SDK takes an imperative approach (build the agent in code) rather than a declarative one (define it in YAML). Both are valid; the SDK is closer to how we already work.

The production agent patterns in 06-reference/2026-04-04-100x-business-with-ai would be implemented using this SDK once we need agents that run independently of Claude Code sessions.

Open Questions