---
title: "Claude Agent SDK: tính năng, phiên bản và hướng dẫn bắt đầu nhanh · DotsAgent"
description: "Claude Agent SDK của Anthropic: giấy phép, phiên bản mới nhất, hỗ trợ MCP, lượt chạy bền vững, phê duyệt của con người, tracing và evals, kèm hướng dẫn bắt đầu nhanh để sao chép."
url: https://dotsagent.io/vi/frameworks/claude-agent-sdk
---

Framework · Anthropic

# Tổng quan về Claude Agent SDK

SDK của Anthropic cung cấp harness của Claude Code, gồm các công cụ thao tác tệp và shell, quyền, hook, subagent và skill, bên trong chương trình Python hoặc TypeScript của riêng bạn. Khác với các lựa chọn còn lại trong danh sách này, SDK chỉ chạy các model Claude và việc sử dụng chịu sự điều chỉnh của Điều khoản thương mại của Anthropic.

**Phù hợp nhất với:**  Ứng dụng cần Claude thực hiện công việc thực tế trên hệ thống tệp, với quyền sử dụng công cụ do bạn kiểm soát.

## Thông tin chính

- **Đơn vị duy trì**: Anthropic
- **Ngôn ngữ**: Python, TypeScript
- **Giấy phép**: Anthropic Commercial Terms
- **Phiên bản mới nhất**: `Python 0.2.163 / TypeScript 0.3.286` · 30 tháng 9, 2026
- **Repository**: [anthropics/claude-agent-sdk-python](https://github.com/anthropics/claude-agent-sdk-python) · 8.200 sao
- **Tùy chọn chạy trên nền tảng lưu trữ**: [Claude Managed Agents](https://code.claude.com/docs/en/agent-sdk/overview)Anthropic lưu trữ harness; session chạy trong sandbox do Anthropic quản lý hoặc do bạn tự lưu trữ.

## Bắt đầu nhanh

Cài package, thiết lập thông tin xác thực, rồi chạy agent đơn giản nhất theo tài liệu chính thức. ID model sử dụng trong tài liệu có thể chưa được bật cho tài khoản của bạn.

### Python

`Cài đặt`

```
pip install claude-agent-sdk
```

Cần 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())
```

[Nguồn hướng dẫn bắt đầu nhanh](https://code.claude.com/docs/en/agent-sdk/overview)

### TypeScript

`Cài đặt`

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

Cần 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
}
```

[Nguồn hướng dẫn bắt đầu nhanh](https://code.claude.com/docs/en/agent-sdk/overview)

## Tính năng

| Mọi model | — | Chỉ Claude, qua Anthropic, Bedrock, Google Cloud hoặc Foundry |
| --- | --- | --- |
| MCP client | — | Tùy chọn mcpServers; plugin có thể đóng gói MCP server |
| MCP server | — | — |
| Đa agent | — | Subagent xử lý các tác vụ phụ có phạm vi cụ thể |
| Lượt chạy bền vững | — | Có thể tiếp tục hoặc phân nhánh session; không có engine thực thi bền vững |
| Phê duyệt của con người | — | Chế độ quyền xác định công cụ nào cần được phê duyệt |
| Tracing | — | Hỗ trợ xuất OpenTelemetry; trace đang ở giai đoạn beta |
| Evals | — | — |

## Các thay đổi gần đây

- Đổi tên từ Claude Code SDK; đã có hướng dẫn chuyển đổi.
- Cả hai SDK hiện đều đi kèm binary Claude Code gốc.
- Từ ngày 15 tháng 6 năm 2026, việc dùng SDK trên các gói thuê bao sẽ tính vào hạn mức tín dụng Agent SDK hằng tháng riêng.
- Ứng dụng bên thứ ba không được cung cấp tùy chọn đăng nhập claude.ai nếu chưa được Anthropic phê duyệt.

## Các lựa chọn thay thế cùng ngôn ngữ

- [OpenAI Agents SDK](https://dotsagent.io/vi/frameworks/openai-agents-python)

- [OpenAI Agents SDK (JS)](https://dotsagent.io/vi/frameworks/openai-agents-js)

- [Google ADK](https://dotsagent.io/vi/frameworks/google-adk)

- [Microsoft Agent Framework](https://dotsagent.io/vi/frameworks/microsoft-agent-framework)

- [LangGraph](https://dotsagent.io/vi/frameworks/langgraph)

- [CrewAI](https://dotsagent.io/vi/frameworks/crewai)

## Nguồn

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

Tài liệu tham khảo độc lập dành cho những người xây dựng AI agent. Không liên kết với bất kỳ nhà cung cấp nào được nêu ở đây.

© 2026 DotsAgent · Dữ liệu được kiểm tra ngày 1 tháng 10, 2026
