Install
npm install @anthropic-ai/claude-agent-sdkTypeScript port of the Claude Agent SDK. Same Computer Use, MCP, tool-use, and streaming capabilities — built for Node and browser environments.
Install
npm install @anthropic-ai/claude-agent-sdkVersion
v0.2.128 · May 2026 · Node 18+
Best for
Full-stack Claude apps, Node streaming servers, MCP-rich workflows.
@anthropic-ai/claude-code-sdk → @anthropic-ai/claude-agent-sdk); Computer Use; MCP; session management; hooks.There is no Agent class in @anthropic-ai/claude-agent-sdk 0.2.117. The public entry points are query() (one-shot) and the lower-level exports listed on the package. Earlier drafts of this page documented a new Agent({...}) constructor — it does not exist.
// One-shot queryimport { query } from '@anthropic-ai/claude-agent-sdk';
for await (const message of query({ prompt: 'What is 15 + 27?', options: { model: 'claude-3-5-sonnet-latest', systemPrompt: 'You are a helpful assistant.', },})) { console.log(message);}For richer session flows use the session helpers (forkSession, listSessions, InMemorySessionStore) or the MCP server factory createSdkMcpServer.
Ready? Start Zero → Hero Step 1 →
| Date | Framework version (installed) | Summary of changes | Reviewer |
|---|---|---|---|
| 2026-05-05 | @anthropic-ai/claude-agent-sdk 0.2.128 | Version bumped 0.2.126 → 0.2.128 (two patch releases: 0.2.127, 0.2.128); “What’s new” updated; revision history entry added. query (runtime export), PermissionMode/McpServerConfig (TypeScript type exports in sdk.d.ts) verified against npm @anthropic-ai/claude-agent-sdk@latest (0.2.128, 2026-05-05, .routine-envs/check-0505-node). | Claude routine |
| 2026-05-01 | @anthropic-ai/claude-agent-sdk 0.2.126 | Version bumped 0.2.123 → 0.2.126 (two patch releases: 0.2.124, 0.2.126; 0.2.125 not published); “What’s new” section updated for 0.2.124–0.2.126 patch series. Version confirmed against npm @anthropic-ai/claude-agent-sdk@latest (0.2.126, 2026-05-01). | Claude routine |
| 2026-04-29 | @anthropic-ai/claude-agent-sdk 0.2.123 | Version bumped 0.2.121 → 0.2.123 (two patch releases: 0.2.122, 0.2.123); “What’s new” section updated for 0.2.122–0.2.123 patch series. Version confirmed against npm. | Claude routine |
| 2026-04-28 | @anthropic-ai/claude-agent-sdk 0.2.121 | Version bumped 0.2.119 → 0.2.121 (two patch releases); “What’s new” section updated for 0.2.120–0.2.121 patch series. Version confirmed against npm. | Claude routine |
| 2026-04-24 | @anthropic-ai/claude-agent-sdk 0.2.119 | Version bumped 0.2.117 → 0.2.119; “What’s new” section updated for 0.2.118–0.2.119 patch series. | Claude routine |
| 2026-04-22 | @anthropic-ai/claude-agent-sdk 0.2.117 | Version bumped 0.2.116 → 0.2.117; “What’s new” section updated; revision history entries added for 0.2.111–0.2.117 patch series. | Claude routine |
| 2026-04-21 | @anthropic-ai/claude-agent-sdk 0.2.116 | Minimal example rewritten after pkg introspection: new Agent(...) does not exist; use query() / session helpers. Banner bumped to 0.2.116. | — |
| 2026-04-18 | @anthropic-ai/claude-agent-sdk 0.2.113 | Stability fixes; SDK rename stabilised. | — |
| 2025 | — | Renamed from @anthropic-ai/claude-code-sdk to @anthropic-ai/claude-agent-sdk. | — |
Note: Python implementation lives at Claude Agent SDK (Python).