AI Crawler · Collection Records

Bot summary · Last 24 hours

Claude Agent SDK — MCP protocol

Anthropic's official SDK for building custom agents with the same agent runtime as Claude Code.
Markdown source·Anything to add or correct?

Official SDK for building custom agents based on Claude

Basic Information

Program nameClaude Agent SDK (Cloud Agent SDK)
One-line introductionOfficial SDK for building custom agents based on Claude
Developed and maintained byAnthropic
Official homepagehttps://www.anthropic.com/
Official documentationhttps://docs.anthropic.com/en/api/agent-sdk
Installation and distributionpip install claude-agent-sdk
Runtime environmentPython 3.10+ · Node.js 18+
LicenseMIT License
Stable versionPyPI 0.2.168 (confirmed 2026-10) — Confirmed on 2026-10-18
GitHub repositoryhttps://github.com/anthropics/claude-code
CategoryMCP protocol (Tags: MCP, Agent, Claude, Anthropic, SDK)

What is this program?

Claude Agent SDK is the official SDK for programmatically using the same runtime as the Claude Code terminal agent. It provides an agent loop that includes tool calling, file operations, and MCP connections.

It is available in both Python and TypeScript versions, and existing Claude Code skills and MCP settings can be reused as-is.

What problems does it solve?

  • ('In custom agents', 'When you need to build a special-purpose agent based on Claude', 'Use the official agent runtime')
  • ('In automation', 'When you need to control a terminal agent from code', 'Call the agent loop with the SDK')

Key Features

Agent loop

Provides the same agent loop as Claude Code

  • Use case: Proven agent behavior
  • Outcome: Tool calling and retries
  • Limitations: Token cost management

MCP and skill integration

Reuse existing MCP and skill settings

  • Use case: Extending agent capabilities
  • Outcome: Shared configuration
  • Limitations: Be careful with permission settings

Installation and Execution

pip

Install with pip.


pip install claude-agent-sdk

npm

Install with npm.


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

Practical Usage Example

Calling the agent

Run an agent with the SDK.


from claude_agent_sdk import query

Advantages and Limitations

Advantages

  • Official Anthropic SDK
  • Reuses the Claude Code runtime
  • MIT License

Things to consider before use

  • Incurs Claude API costs
  • Requires an Anthropic account

Comparison with Similar Programs

ProgramFeaturesSuitable for
Claude Code CLIDirect terminal useInteractive development
OpenAI AgentsOpenAI agent SDKGPT-based

Official Resources and Further Learning

Version and supported environment information was confirmed on the official site as of 2026-10-18. Installation commands may vary depending on your distribution and version, so please also check the official installation documentation.

Actual Execution Screen

Synthetic example — not an actual execution result. The screen is a synthetic example and not an actual execution result.

!Claude Agent SDK usage example

A server in actual operation


Source (HTML): https://games.aidebatehub.com/programs/mcp/protocol/claude-agent-sdk.html This file is an auto-generated Markdown twin of the DevHub document.

Visitor Comments

Loading…
💬 Comments: 0 · Author type: human | Built: 2026-10-30T20:30:58+09:00