dotsagent.io
Language:English
Framework · Anthropic

Claude Agent SDK at a glance

Anthropic's SDK puts the harness behind Claude Code, with file and shell tools, permissions, hooks, subagents and skills, inside your own Python or TypeScript program. Unlike the rest of this list it runs Claude models only, and Anthropic's Commercial Terms govern its use.

Best for: Apps where Claude should do real work on a filesystem, under tool permissions you control.

Key facts

Maintainer
Anthropic
Languages
Python, TypeScript
Licence
Anthropic Commercial Terms
Latest version
Python 0.2.163 / TypeScript 0.3.286 · September 30, 2026
Repository
anthropics/claude-agent-sdk-python · 8,200 stars
Hosted option
Claude Managed Agents
Anthropic hosts the harness; sessions run in an Anthropic-managed or self-hosted sandbox.

Quickstart

Install the package, set the credentials, then run the smallest agent from the official docs. Model IDs are the ones the docs use and may not be enabled on your account.

Python

Install
pip install claude-agent-sdk

Needs ANTHROPIC_API_KEY

Python
import asyncio
from claude_agent_sdk import query, ClaudeAgentOptions

async def main():
    async for message in query(
        prompt="Find and fix the bug in auth.py",
        options=ClaudeAgentOptions(allowed_tools=["Read", "Edit", "Bash"]),
    ):
        print(message)  # Claude reads the file, finds the bug, edits it

asyncio.run(main())

Quickstart source

TypeScript

Install
npm install @anthropic-ai/claude-agent-sdk

Needs ANTHROPIC_API_KEY

TypeScript
import { query } from "@anthropic-ai/claude-agent-sdk";

for await (const message of query({
  prompt: "Find and fix the bug in auth.ts",
  options: { allowedTools: ["Read", "Edit", "Bash"] }
})) {
  console.log(message); // Claude reads the file, finds the bug, edits it
}

Quickstart source

Features

Any modelNoClaude only, via Anthropic, Bedrock, Google Cloud or Foundry
MCP clientYesmcpServers option; plugins can bundle MCP servers
MCP serverNot confirmed
Multi-agentYesSubagents handle focused subtasks
Durable runsNot confirmedSessions can be resumed or forked; no durable engine
Human approvalYesPermission modes decide which tools need approval
TracingYesOpenTelemetry export; traces are in beta
EvalsNo

Recent changes

  • Renamed from Claude Code SDK; a migration guide is available.
  • Both SDKs now bundle a native Claude Code binary.
  • Since 15 June 2026, SDK use on subscription plans draws from a separate monthly Agent SDK credit.
  • Third-party apps may not offer claude.ai login without Anthropic's approval.

Alternatives in the same language

Sources

  1. code.claude.com/docs/en/agent-sdk/overview
  2. code.claude.com/docs/en/agent-sdk/quickstart
  3. code.claude.com/docs/en/agent-sdk/observability
  4. code.claude.com/docs/en/bedrock-vertex
  5. pypi.org/pypi/claude-agent-sdk/json
  6. registry.npmjs.org/@anthropic-ai%2fclaude-agent-sdk
  7. api.github.com/repos/anthropics/claude-agent-sdk-python
  8. api.github.com/repos/anthropics/claude-agent-sdk-typescript

Independent reference for people who build AI agents. Not affiliated with any vendor named here.

© 2026 DotsAgent · Facts checked October 1, 2026