Claude Agent SDK
 [![npm]](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk)
[npm]: https://img.shields.io/npm/v/@anthropic-ai/claude-agent-sdk.svg?style=flat-square
The Claude Agent SDK enables you to programmatically build AI agents with Claude Code's capabilities. Create autonomous agents that can understand codebases, edit files, run commands, and execute complex workflows.
Learn more in the official documentation.
Get started
Install the Claude Agent SDK:
npm install @anthropic-ai/claude-agent-sdk
Migrating from the Claude Code SDK
The Claude Code SDK is now the Claude Agent SDK. Please check out the migration guide for details on breaking changes.
Reporting Bugs
We welcome your feedback. File a GitHub issue to report bugs or request features.
Connect on Discord
Join the Claude Developers Discord to connect with other developers building with the Claude Agent SDK. Get help, share feedback, and discuss your projects with the community.
Data collection, usage, and retention
When you use the Claude Agent SDK, we collect feedback, which includes usage data (such as code acceptance or rejections), associated conversation data, and user feedback submitted via the /bug command.
How we use your data
See our data usage policies.
Privacy safeguards
We have implemented several safeguards to protect your data, including limited retention periods for sensitive information, restricted access to user session data, and clear policies against using feedback for model training.
For full details, please review our Commercial Terms of Service and Privacy Policy.
License and terms
Use of this SDK is governed by Anthropic's Commercial Terms of Service, including when you use it to power products and services that you make available to your own customers and end users, except to the extent a specific component or dependency is covered by a different license as indicated in that component's LICENSE file.
A TypeScript SDK from Anthropic for building autonomous AI agents powered by Claude Code, enabling developers to programmatically create intelligent workflows that understand codebases, edit files, execute commands, integrate tools, and run complex multi-step processes in Node.js and web environments. Includes support for context management, agent control, and advanced actions with Claude’s agent runtime.