Explainer

Claude Code SDK: Now the Claude Agent SDK

If you are looking for the "Claude Code SDK," you want the Claude Agent SDK — Anthropic renamed it in 2025. It is the same toolkit for building agents on the Claude Code harness; only the name and the package names changed. This page covers what happened, the new packages, and how to migrate your imports.

By DK, Editor  ·  Last verified: 2026-06-21  ·  How we test  ·  Facts only — no hands-on score

01 / Definition

The Claude Code SDK is the former name of what Anthropic now ships as the Claude Agent SDK. The rename, in 2025, signalled that the library is for building general-purpose AI agents — not only coding assistants — even though it still runs on the same agent harness that powers the Claude Code CLI. Nothing was discontinued: the SDK was renamed and moved to new package names, and development continues there.

The package history makes the move concrete. On PyPI the original claude-code-sdk is frozen at version 0.0.25, while the renamed claude-agent-sdk is actively published (0.2.106, verified 2026-06-21). On npm the SDK is now @anthropic-ai/claude-agent-sdk (0.3.185). Note that the Claude Code command-line tool keeps its own separate package, @anthropic-ai/claude-code (2.1.185) — the CLI and the SDK are different things.

02 / What it does

  • Why it was renamed

    The library outgrew "Claude Code." It builds agents for any task — automation, data work, internal tools — not just coding, so Anthropic renamed it the Claude Agent SDK in 2025 to match what people actually build with it.

  • The new package names

    Python: claude-code-sdk → claude-agent-sdk (pip install claude-agent-sdk). TypeScript/Node: the SDK is @anthropic-ai/claude-agent-sdk. The Claude Code CLI is unchanged at @anthropic-ai/claude-code — that is the terminal tool, not the SDK.

  • What still works

    The old claude-code-sdk Python package still installs, but it is frozen at 0.0.25 and no longer receives updates — so you miss new features and fixes. Treat it as deprecated and move to claude-agent-sdk.

  • Migration is mostly a rename

    Swap the dependency name and update imports (the Python import path moves from claude_code_sdk to claude_agent_sdk; the options class is ClaudeAgentOptions). The query() entry point and core concepts carry over, so most code changes are mechanical.

03 / How it works

Functionally the Claude Agent SDK is the Claude Code SDK with a new name: the same query() entry point, the same built-in tools, the same MCP and subagent support, and the same permission model. The practical differences are packaging (new npm/pip names) and naming (for example, Python options moved to ClaudeAgentOptions). Pin the new package, update imports, and the rest of your agent code keeps working.

Searching for the Claude Code SDK?

It is the Claude Agent SDK now — same product, renamed in 2025. Install @anthropic-ai/claude-agent-sdk (TypeScript) or claude-agent-sdk (Python) and read the full explainer.

04 / Who it's for

  • Developers on the old claude-code-sdk package who need to know whether to migrate (yes — it is frozen at 0.0.25).
  • Anyone following an older tutorial that says "Claude Code SDK" and wants the current, supported equivalent.
  • New builders confused by the two names — "Claude Code SDK" (old) and "Claude Agent SDK" (current) are the same library.

05 / Getting started

Move to the renamed package: install @anthropic-ai/claude-agent-sdk (TypeScript) or claude-agent-sdk (Python), update your imports, and continue using query(). Our Claude Agent SDK explainer covers what it does, and the tutorial walks through a working first agent.

FAQ

Is the Claude Code SDK discontinued?
No — it was renamed, not removed. The Claude Code SDK became the Claude Agent SDK in 2025. The old packages still exist but are frozen (PyPI claude-code-sdk stops at 0.0.25); active development is on claude-agent-sdk / @anthropic-ai/claude-agent-sdk.
Do I need to migrate from claude-code-sdk?
Yes, eventually. The old package still installs but is frozen at 0.0.25 and gets no new features or fixes. Migrating is mostly mechanical: change the dependency name and update imports (Python: claude_code_sdk → claude_agent_sdk, options class ClaudeAgentOptions).
What are the new package names?
TypeScript/Node: @anthropic-ai/claude-agent-sdk. Python: claude-agent-sdk (pip install claude-agent-sdk). The separate Claude Code command-line tool remains @anthropic-ai/claude-code.
Is the Claude Code SDK the same as the Claude Code CLI?
No. The CLI (@anthropic-ai/claude-code) is the terminal tool you run as claude. The SDK (now @anthropic-ai/claude-agent-sdk / claude-agent-sdk) is a library you import to build your own agents. They share a harness but are installed and used differently.
When was it renamed?
In 2025, as part of Anthropic's move to position the library as a general agent SDK rather than a coding-only tool. The renamed packages have been the supported path since.