Anthropic SDK
A strong pick. 3rd of 9 AI SDKs and agent frameworks.
@anthropic-ai/sdk is Anthropic's official TypeScript client for Claude. It is well typed, released often, and the first to support new Claude features such as prompt caching, extended thinking, and server and client tools. It is a strong pick when you build on Claude alone. If you want one API across providers or React UI hooks, a provider-neutral SDK such as the AI SDK fits better.
Best for: Server-side TypeScript projects that build on Claude and want every API feature as soon as it ships.
Scores
Overall7.8
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 7.5, likely 6.5 to 8.5
This is the best way to use the full Claude API from TypeScript. It is actively maintained by Anthropic, light on dependencies, and growing fast. It covers only one provider and has no UI layer, so for most new apps that want flexibility, the AI SDK is the better default, with this SDK used underneath or beside it. The 1.0 breaking changes are a cost to plan for.
- npm downloads ratio vs medianDownloadsRatio: About 25 against a median of 4.1
- pkgpulse.com/guides/vercel-ai-sdk-vs-openai-sdk-vs-anthropic-sdk-2026: Recommends the AI SDK for UIs and multiple providers, and this SDK for Claude-only work
- developersdigest.tech/blog/claude-api-version-2026-10-21-sdk-migration: Breaking changes in 1.0
- peers AI SDK: Provider-neutral peer with 28k stars and more dependent repos
GPT-6.2 Sol: 8.1, likely 7.1 to 9.1
This is a strong first choice for a new Claude-first project because its typed API coverage is deep and Anthropic updates it frequently. Vercel AI SDK is the stronger default for teams that expect to switch model providers, and LangGraph.js fits workflows that need durable execution. Beta agent interfaces and uncertainty about direct adoption leave room in the range.
- platform.claude.com/docs/en/cli-sdks-libraries/sdks/typescript: The official client offers direct Claude API coverage, types, streaming, and tool helpers.
- github.com/anthropics/anthropic-sdk-typescript/releases/tag/sdk-v1.12.0: The current release adds an API error code and fixes default-header handling.
- platform.claude.com/docs/en/api/typescript/beta/sessions/create: The client exposes Claude Managed Agents sessions through a beta API.
- ai-sdk.dev/providers/ai-sdk-providers/anthropic: Vercel AI SDK offers Claude access within a multi-provider SDK.
- docs.langchain.com/oss/javascript/langgraph/overview: LangGraph.js documents durable execution for stateful agents.
- npm versionsLastYear, dependents, peers: Frequent publishing and substantial tracked use support a strong recommendation for Claude-first projects.
Needed by many5.2
How many developers need a tool for this job?
Claude Opus 5.5: 5.0, likely 4.0 to 6.5
Many JS/TS developers now call language models. Claude is one of the two or three main providers, so a large group needs this client. It serves only one provider, which makes it narrower than the category as a whole.
- project.note: SDK of one model provider
- pkgpulse.com/guides/vercel-ai-sdk-vs-openai-sdk-vs-anthropic-sdk-2026: Recommended for Anthropic-only server-side work
GPT-6.2 Sol: 5.3, likely 4.1 to 6.6
The SDK serves JavaScript and TypeScript teams building Claude features on Node.js, Deno, Bun, and edge runtimes. The single-provider scope limits who needs it because teams can also reach Claude through a multi-provider SDK. The developer survey measures interest in Claude models, so the share of projects that need this client directly is uncertain.
- platform.claude.com/docs/en/cli-sdks-libraries/sdks/typescript: Documents supported runtimes and direct Claude API access.
- survey.stackoverflow.co/2026/technology: Shows strong interest in Claude models among respondents.
- ai-sdk.dev/providers/ai-sdk-providers/anthropic: Shows how projects can access Claude through Vercel AI SDK.
Helps a lot8.1
How well does it do the job for those who need it?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
It covers the full Claude API, with excellent types, typed errors, retries, streaming helpers and a tool runner. AI coding agents also know it well. It has no multi-provider abstraction and no UI hooks, and independent guides say streaming to a frontend is more verbose than with the AI SDK.
- pkgpulse.com/guides/vercel-ai-sdk-vs-openai-sdk-vs-anthropic-sdk-2026: Praises types and first access to features; lists no React hooks and verbose streaming
- dev.to/muhammad_moeed/claude-agent-sdk-vs-vercel-ai-sdk-6-which-to-pick-in-2026-2jj: Calls Claude tooling Claude-shaped, while the AI SDK is provider-neutral
- platform.claude.com/docs/en/cli-sdks-libraries/sdks/typescript: Official docs list runtimes and features
- npm hasTypes: Ships its own types
GPT-6.2 Sol: 8.2, likely 7.2 to 9.2
Version 1.12.0 provides typed requests and responses, two streaming interfaces, automatic retries, and tool helpers. Anthropic supplies TypeScript examples and an API skill for coding agents, with limited independent evidence on generated code quality. In-stream overload errors still lack an HTTP status, and the hosted agent interface is in beta. One independent benchmark found lower latency on small prompts via the direct client, but it compared end-to-end network paths.
- platform.claude.com/docs/en/cli-sdks-libraries/sdks/typescript: Documents types, streaming, retries, and tool helpers.
- platform.claude.com/docs/en/agents-and-tools/agent-skills/claude-api-skill: Provides TypeScript reference material for coding agents and documents the Managed Agents beta.
- github.com/anthropics/anthropic-sdk-typescript/issues/1262: A user reports that in-stream overloads bypass status-based retry and failover logic.
- raw.githubusercontent.com/anthropics/anthropic-sdk-typescript/sdk-v1.12.0/src/core/streaming.ts: The release preserves the stream error type and leaves the HTTP status undefined.
- dev.to/cliftonz/benchmarking-vercel-ai-gateway-against-the-native-anthropic-sdk-21g5: Independent end-to-end comparison found lower latency for small prompts via the direct client.
Holds up over time8.5
Will it still be a good choice in two years?
Claude Opus 5.5: 8.5, likely 7.5 to 9.5
A large, funded model provider backs it, with 846 commits and 247 GitHub releases in a year, and the issue backlog is small. The 1.0 release follows API version 2026-10-21 and removed sampling parameters and changed auth, so upgrades can break code. The SDK still exists only as long as Anthropic supports its API.
- github commitsLastYear / releasesLastYear: 846 commits and 247 releases
- github openIssues / closedIssues: 37 open versus 287 closed
- developersdigest.tech/blog/claude-api-version-2026-10-21-sdk-migration: Breaking changes in 1.0, some of which fail at runtime
- unpkg.com/@anthropic-ai/sdk@1.0.0/CHANGELOG.md: 1.0.0 released 2026-10-21
GPT-6.2 Sol: 8.4, likely 7.3 to 9.3
Anthropic maintains the official client, and the npm package published 98 versions in the past year. Repository activity also covers sibling cloud SDKs, and issue handling varies. One reported tool-runner bug took about seven weeks to close. The recent 1.0 upgrade required changes for some apps, and the number of people with publishing access is unclear.
- npm versionsLastYear, latestPublishedAt: 98 package versions in a year, with 1.12.0 published on November 20.
- github commitsLastYear, contributors: 846 commits and 55 contributors across the repository.
- github.com/anthropics/anthropic-sdk-typescript/releases: The release feed includes the core package and sibling cloud SDKs.
- github.com/anthropics/anthropic-sdk-typescript/issues/1114: A reported tool-runner bug went from filing to closure in about seven weeks.
- platform.claude.com/docs/en/api/migration-2026-10-21: Documents request and response changes for the API version adopted in 1.0.
Used widely7.1
How many use it, and is that growing?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
Downloads rose from 11M to 273M per 4 weeks, a ratio of about 25 against a median of 4.1, which is the fastest growth among the major peers. Much of that is transitive, because LangChain adapters and many agent tools install it. Its 1,986 dependent repos trail the AI SDK (2,455) and are far below the OpenAI SDK (19,804), so the number of direct choices is smaller than the downloads suggest.
- npm downloadsLast4Weeks / downloadsSame4WeeksYearAgo: 273M versus 11M, a ratio of about 25
- dependents.repos: 1,986 repos and 148 packages
- peers OpenAI SDK dependentRepos: 19,804, about ten times as many
- github stars: 2,182 stars, modest for its use
GPT-6.2 Sol: 6.1, likely 4.8 to 7.6
Four-week npm downloads rose 24.7× year over year, well above the 4.1× catalog baseline and the fastest growth among the listed peers. The collector found 1,986 dependent repositories and 148 npm packages, with fewer tracked repositories than Vercel AI SDK, LangChain.js, or the OpenAI SDK. Automated builds and indirect installs through packages such as LangChain's Anthropic integration make the number of projects choosing the client directly hard to estimate. GitHub stars and Bluesky links are modest beside the category leaders.
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo, medianDownloadsRatio: 273.1 million versus 11.0 million downloads, for 24.7× growth against the 4.1× baseline.
- dependents, peers: The collector found 1,986 repositories and 148 packages, with higher repository counts for several peers.
- github stars, bluesky posts, peers: 2,182 stars and two Bluesky posts put public attention below the category leaders.
- github.com/langchain-ai/langchainjs/blob/main/libs/providers/langchain-anthropic/package.json: LangChain's Anthropic integration installs the official SDK as a dependency.
Vouched for7.0
Who stands behind it being good?
Claude Opus 5.5: 6.5, likely 5.0 to 8.0
It is the vendor's own client, and agent frameworks build on it through their Anthropic adapters. Independent guides recommend it for Claude-only server work. Little community discussion of it shows up on HN or Bluesky, and it does not appear in developer surveys, so most of the endorsement comes from the vendor and from tutorials.
- hackerNews / bluesky: 2 HN stories and 2 Bluesky posts, almost no discussion
- pkgpulse.com/guides/vercel-ai-sdk-vs-openai-sdk-vs-anthropic-sdk-2026: Independent guide recommends it for server-side Claude work
- @langchain/anthropic depends on @anthropic-ai/sdk: Frameworks build on it
GPT-6.2 Sol: 7.5, likely 6.4 to 8.6
LangChain.js uses the SDK for its Anthropic integration, and Datadog and OpenPanel support tracing its calls. An independent team benchmarked the client against Vercel AI Gateway and reported a latency advantage for short prompts in its setup. The developer survey measures Claude model interest, and public evidence on SDK-specific satisfaction and retention is sparse.
- github.com/langchain-ai/langchainjs/blob/main/libs/providers/langchain-anthropic/package.json: A major framework depends on the SDK in its shipped Anthropic integration.
- docs.datadoghq.com/llm_observability/instrument/auto_instrumentation: Datadog instruments the SDK's standard and streaming message calls.
- openpanel.dev/docs/ai-observability/anthropic: OpenPanel documents and tests its integration against SDK version 1.
- dev.to/cliftonz/benchmarking-vercel-ai-gateway-against-the-native-anthropic-sdk-21g5: An independent development team published its direct-client benchmark and limitations.
- survey.stackoverflow.co/2026/technology: Model-level survey results give no SDK-specific satisfaction measure.
Safe8.0
How safe is it to depend on?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
It has 3 dependencies, an Apache-2.0 licence, and releases published by the vendor's automated pipeline. The two moderate 2026 advisories hit only the optional local memory tool and were fixed quickly (for example, 0.81.0 fixed the sibling-directory escape). There is no Scorecard data, which leaves some uncertainty.
- npm dependencies: 3 dependencies
- advisories: 2 moderate advisories, both in the memory tool
- github.com/anthropics/anthropic-sdk-typescript/security/advisories/GHSA-5474-4w2j-mq4c: Affected >=0.79.0 <0.81.0, fixed in 0.81.0, CVSS 6.3
- scorecard: No Scorecard data
GPT-6.2 Sol: 8.0, likely 6.8 to 9.0
The package has three declared dependencies and a permissive Apache-2.0 license. Both known moderate advisories affected the local filesystem memory helper, and patched versions shipped on the dates of the repository disclosures. The project documents automated npm publishing and a manual token-based path. OpenSSF Scorecard data was unavailable, and publishing access and provenance were unverified.
- npm dependencies, npm license, scorecard: Three dependencies, Apache-2.0, and no collected OpenSSF Scorecard.
- github.com/advisories/GHSA-p7fg-763f-g4gf: The local memory permissions issue was fixed in 0.91.1.
- github.com/anthropics/anthropic-sdk-typescript/releases/tag/sdk-v0.91.1: The 0.91.1 release shipped on April 24, the repository disclosure date.
- github.com/advisories/GHSA-5474-4w2j-mq4c: The local memory path validation issue was fixed in 0.81.0.
- github.com/anthropics/anthropic-sdk-typescript/releases/tag/sdk-v0.81.0: The 0.81.0 release shipped on March 31, the repository disclosure date.
- raw.githubusercontent.com/anthropics/anthropic-sdk-typescript/main/CONTRIBUTING.md: Documents automated npm releases and a manual token-based release path.
Good
- It is the official client, so new Claude features land here first, including prompt caching, thinking, citations, batches, files and beta tools.
- It is generated from the API spec, with precise discriminated-union types for content blocks and typed error classes such as OverloadedError.
- It needs only 3 dependencies and runs on Node, Deno, Bun, Cloudflare Workers and Vercel Edge.
- Anthropic maintains it full-time, with 846 commits and 98 npm versions in the last year.
Bad
- It only talks to Claude, so switching or mixing providers means rewriting tool and message code.
- It has no React or UI streaming hooks, and streaming to a frontend takes more boilerplate than with the AI SDK.
- Version 1.0 (October 2026) removed temperature, top_p and top_k, removed text completions, and changed the auth header. Some of these fail only at runtime.
- Its built-in local memory tool had two path and permission advisories in 2026.
The numbers
- npm downloads, 4 weeks
- 273M ×25 in a year
- GitHub stars
- 2.2k
- Commits, 12 months
- 846
- npm version
- 1.12.0 Nov 2026
- Versions, 12 months
- 98
- Advisories, 24 months
- 2 of 2 ever
- OpenSSF Scorecard
- None
- Licence
- Apache-2.0
The SDK of one model provider.
Read on 21 November 2026 from GitHub (anthropics/anthropic-sdk-typescript), npm (@anthropic-ai/sdk), OSV and the OpenSSF Scorecard.
AI SDKs and agent frameworks
- 9.0AI SDK
- 7.9OpenAI SDK
- 7.8Anthropic SDK
- 7.7Mastra
- 7.5LangGraph.js
- 7.4OpenAI Agents SDK
- 6.8LangChain.js
- 6.7Genkit
- 1.5LlamaIndex.TS