CreateWithAIHub

Framework Anthropic

Claude Agent SDK

Anthropic's Python and TypeScript library for building agents on the same tools and agent loop as Claude Code.

View repository ↗
Save

What it is

The Claude Agent SDK packages Claude Code's agent loop, built-in tools and context management as a library for Python and TypeScript. Your application can run agents that read and edit files, run commands, search the web, use MCP servers and spawn subagents, with permissions and hooks under your control. It is for developers embedding a capable agent in their own product or automation.

What it's useful for

Building an internal agent that triages bugs and proposes fixes, or a product feature that runs multi-step tasks over files and tools.

Key features

  • Built-in tools for reading/writing files, running commands and web search
  • Hooks, subagents and permission controls
  • MCP integration for external tools and data
  • Sessions that can be resumed or forked
  • Loads skills, commands, memory and plugins like Claude Code

How to use it

Before you start

  • Python 3.10+ (Python SDK)
Python
pip install claude-agent-sdk
TypeScript
npm install @anthropic-ai/claude-agent-sdk

Commands are copied from the official documentation. Check the docs for the latest version before running them.

Limitations to know

  • Uses Claude models; requires API key authentication (or a cloud provider such as Bedrock)
  • Third-party products may not offer claude.ai login or rate limits unless approved by Anthropic
  • Use is governed by Anthropic's Commercial Terms of Service

Alternatives

AWS's open-source, model-driven SDK and harness for building agents in Python and TypeScript.

FreeOpen source

OpenAI's lightweight, provider-agnostic framework for single and multi-agent workflows in Python and TypeScript.

FreeOpen source

Google's open-source, code-first framework for building, evaluating and deploying agents in Python, TypeScript, Go and Java.

FreeOpen source

TypeScript framework for AI agents and graph-based workflows with memory, RAG, evals and model routing.

FreeOpen source

See all 8 Claude Agent SDK alternatives →

MCP servers for this

Google Chrome team's MCP server and CLI that let coding agents control, debug and profile a live Chrome browser.

FreeOpen source

Docker Desktop's MCP Toolkit and Catalog that run MCP servers in containers and connect them to clients through one gateway.

Free plan + paidOpen source

GitHub's official MCP server that lets AI agents work with repositories, issues, pull requests and Actions.

Free plan + paidOpen source

Skills for this

Anthropic skill that guides Claude through designing, building and evaluating MCP servers in TypeScript or Python.

FreeOpen source

Vercel's collection of Agent Skills for React/Next.js performance, UI review, writing style and Vercel deploys.

FreeOpen source

Anthropic skill that has Claude test local web apps by writing Python Playwright scripts, with screenshots and browser logs.

FreeOpen source

Related resources

Observability platform for AI agents with session replays, execution graphs and LLM cost tracking.

Free plan + paid

Coding agent that runs each thread in a cloud sandbox, with a CLI, web, desktop and mobile apps.

Free plan + paid

Anthropic's agentic coding tool that works in your terminal, IDE, desktop app and on the web.

Paid

Anthropic's GitHub Action that runs Claude Code in your workflows to answer @claude mentions, review PRs and turn issues into PRs.

PaidOpen source

Type to search. Use ↑ ↓ and Enter.