DirectoryHarness
HarnessCoding-agent SDK
Claude Agent SDK
Anthropic
A library that embeds Claude Code’s tools, loop, and context handling in a Python or TypeScript process you run. Use it for a coding agent, not for a single chat completion.
When to use it
- The agent needs to read files, edit files, and run commands, with Claude Code’s permissions, sessions, hooks, and subagents.
- If you want to write the tool loop yourself, the comparison table says to use the Client SDK.
- If you want Anthropic to host the loop, that is Managed Agents, a different path. The docs call it a hosted agent harness.
Official excerpt
Notes taken from the source page on 2026-11-24. They are not measurements or rankings by HAROPS. Quotes stay in the source language.
- 官方对照
- Agent SDK:在你操作的进程里跑 Claude Code 二进制。CLI:交互式终端。Client SDK:直接调 Claude API。Managed Agents:Anthropic 托管循环。
- 条款
- 概述页写:SDK 的使用受 Anthropic Commercial Terms 约束,包括用它向你自己的客户提供产品;个别组件若另有 LICENSE,以该文件为准。Python 仓库的 LICENSE 文件是 MIT。
Deployment and terms
- Local
- Self-host
- Mixed terms
Mixed terms
- Coding agent
- Tool use
- MCP
- Human in the loop
Read this carefully
- A MIT file in the Python repository does not replace Anthropic’s commercial terms. This entry is filed under mixed terms.
Sources and review
Last reviewed 2026-11-24