The Claude Agent SDK is a library from Anthropic for building AI agents. An agent is a program that completes a task by planning its own steps and calling tools that read files, run commands or edit code. The SDK gives a Python or TypeScript program the same tools, agent loop and context management that run Claude Code, Anthropic's coding agent; in fact the package bundles the Claude Code command-line program and drives it.
A developer sends a prompt and options, and the SDK returns a stream of messages while Claude works. Built-in tools read, write and edit files, run shell commands and search the web. Developers add their own tools as functions or through MCP (Model Context Protocol, a standard way to connect an AI model to outside tools and data). Permissions decide which tools run without approval, hooks run custom code at fixed points of the loop, subagents take focused subtasks, and sessions keep context so that work can resume later.
The SDK is free to install; the Python repository carries the MIT license. Model use is paid through a Claude API key, billed per token.