The Claude Code SDK has been renamed to the Claude Agent SDK. If you're migrating from the old SDK, see the Migration Guide.
npm install @anthropic-ai/claude-agent-sdkThe Claude Agent SDK is available in multiple forms to suit different use cases:
Built on top of the agent harness that powers Claude Code, the Claude Agent SDK provides all the building blocks you need to build production-ready agents.
Taking advantage of the work we've done on Claude Code including:
Here are some example agent types you can create:
Coding agents:
Business agents:
For basic authentication, retrieve an Claude API key from the Claude Console and set the ANTHROPIC_API_KEY environment variable.
The SDK also supports authentication via third-party API providers:
CLAUDE_CODE_USE_BEDROCK=1 environment variable and configure AWS credentialsCLAUDE_CODE_USE_VERTEX=1 environment variable and configure Google Cloud credentialsCLAUDE_CODE_USE_FOUNDRY=1 environment variable and configure Azure credentialsFor detailed configuration instructions for third-party providers, see the Amazon Bedrock, Google Vertex AI, and Microsoft Foundry documentation.
Unless previously approved, we do not allow third party developers to apply Claude.ai rate limits for their products, including agents built on the Claude Agent SDK. Please use the API key authentication methods described in this document instead.
The SDK provides access to all the default features available in Claude Code, leveraging the same file system-based configuration:
./.claude/agents/SKILL.md files in ./.claude/skills/./.claude/settings.json that respond to tool events./.claude/commands/plugins option to extend Claude Code with custom commands, agents, skills, hooks, and MCP servers. See Plugins for details.CLAUDE.md or .claude/CLAUDE.md files in your project directory, or ~/.claude/CLAUDE.md for user-level instructions. To load these files, you must explicitly set settingSources: ['project'] (TypeScript) or setting_sources=["project"] (Python) in your options. See Modifying system prompts for details.These features work identically to their Claude Code counterparts by reading from the same file system locations.
System prompts define your agent's role, expertise, and behavior. This is where you specify what kind of agent you're building.
Control which tools your agent can use with fine-grained permissions:
allowedTools - Explicitly allow specific toolsdisallowedTools - Block specific toolspermissionMode - Set overall permission strategyExtend your agents with custom tools and integrations through MCP servers. This allows you to connect to databases, APIs, and other external services.
If you're building coding agents powered by the Claude Agent SDK, please note that Claude Code refers specifically to Anthropic's official product including the CLI, VS Code extension, web experience, and future integrations we build.
The use of Claude branding for products built on Claude is optional.
When referencing Claude in your agent selector or product:
Allowed naming options:
Not permitted:
Your product should maintain its own branding and not appear to be Claude Code or any Anthropic product.
For questions about branding compliance or to discuss your product's Claude integration, contact our sales team.
If you encounter bugs or issues with the Agent SDK:
View the full changelog for SDK updates, bug fixes, and new features: