Notes

Claude Agent SDK

Most teams building an agent end up writing the same scaffolding: a loop that calls the model, a place to register tools, a rule about which actions need a human, and something to stop the transcript overflowing. The Claude Agent SDK is Anthropic’s packaged version of that scaffolding — the harness behind Claude Code, opened up for building your own agents.

What it hands you
The SDK runs the plan–act–observe loop itself and offers the machinery around it as configuration rather than code you maintain:

  • A tool layer with built-in file, shell and search tools, plus any server connected over the Model Context Protocol.
  • Permission handling — which tools are allowed, which require approval — so an irreversible action is gated instead of simply executed.
  • Context management, including compaction of a long session, and subagents that do side work in their own window.
  • Hooks and session state for logging, resuming, and running unattended.

Where it fits
It is a vendor SDK, not a neutral framework: it targets Claude models specifically, and that is the trade being made. Compared with a graph-first library such as LangGraph, which asks you to declare the control flow yourself, the Claude Agent SDK assumes the loop and lets you adjust it — quicker to a working coding or research agent, less explicit when the topology is unusual. Teams reach for it when the goal is an agent that behaves like Claude Code aimed at a different job, rather than a bespoke architecture.

The Claude Agent SDK is Anthropic’s toolkit for building agents on Claude models, packaging the same harness that runs Claude Code: the model loop, built-in file and shell tools, MCP server connections, tool permissions, context compaction and subagents. It removes the need to hand-write the scaffolding around a model, so work starts at the agent’s behaviour rather than its plumbing. Libraries are published for TypeScript and Python.

Think about hiring a capable assistant. You still have to give them a desk, a phone, keys to the filing cabinet, and a rule about checking with you before they spend money. Setting all that up is work — and it is the same work every time.

The Claude Agent SDK is Anthropic’s ready-made version of that setup, for software built on Claude. It supplies the loop that keeps the assistant working step by step, the tools it can reach for, and the permission rules that decide what it may do alone. Developers plug in the job they actually want done.