Claude Agent SDK (TypeScript)
Build autonomous Claude agents programmatically that understand codebases, edit files, and execute complex workflows.
- Source repo
- anthropics/claude-agent-sdk-typescript
- Stars
- ★ 1.9k
- Last updated
- 1d ago
- Primary language
- Shell
- FA score
- 63/100 · Some gaps
At a glance
- How it runs
- Works with
- Platform-specificClaude API
- Setup effort
- Low · running in minutes
- You'll need
- Typical use
- Developers embedding agents that autonomously understand and modify codebases into their own TypeScript applications
- Not a fit if
- Teams needing provider-agnostic agents not tied to the Anthropic ecosystem
- Users who cannot accept Anthropic's Commercial Terms and its data collection practices
- Maintenance
- Commits in the last 30 dayslast commit 2026-11-20
- Source review
- 63/100 · Some gaps
What does this agent do, and when should you use it?
The Claude Agent SDK is Anthropic's official TypeScript package (published on npm as @anthropic-ai/claude-agent-sdk) for building AI agents with Claude Code's capabilities in code. It creates autonomous agents that can understand codebases, edit files, run commands, and execute complex workflows. It succeeds the Claude Code SDK, with an official migration guide covering the breaking changes. The SDK is distributed via npm, requires Node.js 18 or later, and is fully documented at docs.claude.com. Use is governed by Anthropic's Commercial Terms of Service, accompanied by explicit data collection, usage, and retention policies.
After installing, developers import @anthropic-ai/claude-agent-sdk in a Node.js 18+ project and create agents programmatically. These agents can understand codebases, edit files, run commands, and execute complex multi-step workflows — reusing Claude Code's capabilities inside your own application. The SDK is a library/framework driven by your code, not a standalone CLI or chat UI. Projects migrating from the Claude Code SDK must handle breaking changes per the official migration guide.
- Developers embedding agents that autonomously understand and modify codebases into their own TypeScript applications
- Engineering teams needing programmatic automation workflows that edit files and run commands
- Existing projects on the Claude Code SDK that need to migrate to the renamed SDK
- Teams building their own products or services on top of Claude Code capabilities for end users
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
npm install @anthropic-ai/claude-agent-sdk
- Runtime
- Node.js 18
How do you install or deploy this agent?
Ensure Node.js 18 or later is installed, then install the SDK via npm:
npm install @anthropic-ai/claude-agent-sdkThe README does not document how to configure credentials such as an Anthropic API key; consult the official documentation (https://docs.claude.com/en/api/agent-sdk/overview) for that information.
How do you use this agent?
The README provides no first runnable invocation snippet. The documented usage is: after installing, import and call the SDK from your own Node.js code to create agents that understand codebases, edit files, run commands, and execute workflows. Full API usage is in the official documentation; projects migrating from the Claude Code SDK should follow the migration guide (https://docs.claude.com/en/docs/claude-code/sdk/migration-guide) for breaking changes.
What are this agent's strengths and limitations?
- Official SDK that directly reuses Claude Code's codebase understanding, file editing, and command execution capabilities
- One npm install command with only Node.js 18+ required, keeping onboarding cost low
- An official migration guide from the Claude Code SDK eases upgrades for existing projects
- Backed by an official documentation site and the Claude Developers Discord community
- Tied to the Anthropic ecosystem and governed by Anthropic's Commercial Terms; not a model-agnostic solution
- Collects usage data, conversation data, and /bug feedback, which data-sensitive teams must evaluate
- No license declared in the README, and no runnable example code or credential setup steps provided
- Requires a Node.js 18+ runtime and network access to Anthropic services
How does this agent compare with similar options?
The README explicitly positions this SDK as the successor to the Claude Code SDK: the Claude Code SDK is now the Claude Agent SDK, with breaking changes requiring the official migration guide.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| Claude Agent SDK (TypeScript) This agent | 63 · Some gaps | Library / SDK | ★ 1.9k | 1d ago | Shell | Claude API |
| Superset | 66 · Some gaps | Desktop appFreemium | ★ 16k | today | TypeScript | Codex · Claude Code |
| Context7 Docs | 59 · Major gaps | CLIFreemium | ★ 65k | 2d ago | TypeScript | — |
| OpenCode Goal Plugin | 86 · Good | Agent plugin / skillFree + model costs | ★ 533 | 5d ago | TypeScript | — |
How does FollowAgents rate this agent?
Why each dimension lost points
Workflows show excellent least-privilege practice: egress-firewall runner, enforce-mode network allow list, OIDC workload identity federation instead of static API keys, explicit disallowedTools, minimal permissions blocks, an allowed_non_write_users risk-check workflow, plus hardening self-checks documented in CLAUDE.md. Deductions: the SDK core source is not in the sample, so its runtime permission model (user confirmation, data flow) is only inferable via doc links; no evidence of any rollback mechanism.
Example tests are rigorous (conformance suite, mock vs live split, skipIf env guards) and workflows have timeouts. Deductions: SDK error handling and failure messages cannot be verified from the sample; conformance coverage is visible only at the examples layer.
README states the target clearly (Node 18+, npm install, programmatic agent building), with a migration guide from the Claude Code SDK and clear environment requirements. Deductions: capability boundaries stay at marketing level ('autonomous agents'); no API surface or limitation details in the sample.
Clear information architecture (README/CLAUDE.md/LICENSE/examples layers), CLAUDE.md correctly serves as contributor guidance rather than product instructions, stable naming (@anthropic-ai/claude-agent-sdk), install notes, issue channel, community channel, license terms statement, and a clear maintenance owner. Deductions: no CHANGELOG/version-history evidence, no known-limitations section, and LICENSE.md is all-rights-reserved commercial terms rather than an open-source license.
The SDK provides programmatic reuse of Claude Code capabilities; marginal value is clear and the examples (session stores with Postgres/Redis adapters and conformance tests) show engineering depth. Deductions: cost (token usage, pricing) vs benefit tradeoffs are not discussed in the sample.
README claims (install, data collection, licensing) trace to specific links and repo files; CLAUDE.md cross-corroborates with actual workflow files (workflow-hardening.yml, egress-firewall referenced in practice); data-collection statements are clearly separated from policy links. Deductions: 'privacy safeguards' is asserted without source-level evidence to check against.
- SDK core source and skill/plugin files were not in the sample; runtime permissions and data flow rely on external doc links — review the actual published package source.
- The license is Anthropic Commercial Terms (all rights reserved), not open source; confirm legal terms before commercial integration.
- The SDK collects usage data and conversation data (including /bug feedback) by default; evaluate for privacy-sensitive deployments.
- The issue-triage workflow accepts triggers from users without write access (allowed_non_write_users: "*"); despite the guard workflow, prompt-injection risk should be monitored.
FAQ
How does it relate to the Claude Code SDK?
How do I install and get started?
What data does it collect?
What is the license?
Where do I report bugs or request features?
Is Claude Agent SDK (TypeScript) safe to use?
Is Claude Agent SDK (TypeScript) still maintained?
Who makes Claude Agent SDK (TypeScript)?
Thanks — we use this to improve the page.