本页说明 LangChain Deep AgentsClaude Agent SDK 的差异。两者都是用于构建 custom agents 的 harness,但在 execution environments、deployment 和 vendor coupling 方面取舍不同。
OpenSWELangSmith Fleet 已在 production 中使用 Deep Agents。

快速对比

Deep AgentsClaude Agent SDK
Agent 运行位置在 sandbox 内,或在 sandbox 外远程执行 commands在 sandbox 内
Execution backend可插拔:local, virtual filesystem, remote sandbox, or custom其运行所在 sandbox 的 local filesystem
Model provider任意 provider(Anthropic、OpenAI、Google,以及其他 100+ providers)Claude(Anthropic、Bedrock、Vertex、Azure)
按 provider/model 调优Harness profiles(beta):按 provider 或特定 model 注册的声明式 bundles,包含 system prompt、tool、middleware 和 subagent 调整在每个 model call site 的代码中配置
DeploymentLangSmith 中的 Managed Deep Agents,或通过 langgraph build self-host standalone imageSelf-host。你需要构建 server、auth 和 streaming layer。Claude managed agents 是单独产品
Multi-tenancy内置:scoped threads、per-user sandboxes、RBAC自行构建
LicenseMITMIT(Claude Code 本身是 proprietary)

主要差异

Agent 和 execution environment

将 agents 连接到 sandboxes 有两种模式:在 sandbox 内部运行 agent,或在外部运行 agent 并将 sandbox 作为 tool 使用 Claude Agent SDK 仅支持第一种模式。你的 agent 在 sandbox 内运行,并针对 sandbox 的 local filesystem 执行 tools。Anthropic 托管的 Claude managed agents 使用解耦 model,这反映了 production agent architectures 的发展方向。 Deep Agents 同时支持两种模式,并允许你选择 backend 将它们连接起来。实践中,这意味着你可以:
  • 在 sandbox 内运行 agent(与 Claude Agent SDK 相同的 model)。
  • 在 long-lived container 中运行 agent,并将 remote sandbox 作为 tool 使用,通过网络执行 commands。
  • 为测试换入 virtual filesystem,或为自己的基础设施换入 custom backend。

Multi-tenancy

将应用投入 production 时,你通常会将其暴露给许多 end users,并且必须隔离每个 user 的 environment。 在 Claude Agent SDK 中,SDK 将 agent 绑定到其 sandbox。若要为每个 user 提供隔离的 execution environment,你必须构建一个 API wrapper,为每个 user 启动 sandbox、跟踪 sandbox 归属,并在之后销毁它。 Deep Agents 直接处理这些工作:在 harness 中按 per user or per assistant 配置 sandbox,并包含 scoped threads、run history 和 RBAC。如果使用 LangSmith Sandbox,你还会获得开箱即用的 auth proxy,让 end users 可以从 sandbox 调用第三方 APIs,而无需你为每个 user 配置 credentials。

Production agent server

若要将 self-hosted Claude Agent SDK app 暴露给 end users,你需要编写自己的 HTTP/WebSocket 或 SSE server,用它调用 agent、流式传回 tokens,并管理 conversation threads。该 server 需要你自行构建、运维和保护。 Deep Agents deployments 开箱包含 agent server:streaming endpoints、thread management、run history、webhooks 和 authentication

Managed cloud 或 self-hosted

Claude Agent SDK deployments 是 self-hosted 的。SDK 和 Claude managed agents 是不同产品。基于 SDK 编写的代码不能直接部署到 managed offering。 Deep agents 可以在无需代码更改的情况下以两种模式运行:
若需要适用于任意 model provider 的 managed agent platform,请使用 LangSmith FleetClaude managed agents 仅限 Anthropic ecosystem。

LLM

Claude Agent SDK execution 将 model、backend 和 deployment 绑定在一起,并优化三者之间的支持。 使用 Deep Agents 时,你可以独立选择 model provider、execution backend 和 deployment target。选择这个 harness 可以最大限度保留 model 和 infrastructure 选择上的灵活性。

Ecosystems

Claude Agent SDK 专为 Claude 和 Anthropic 的 product surface 构建。Deep Agents 则集成到更广泛的 LangChain ecosystem 中,包括用于 observability、evaluation 和 deployment 的 LangSmith,并适用于任意 model provider。

总结

  • 如果你需要 model 和 infrastructure 灵活性、内置 multi-tenant deployment,以及无需代码更改即可选择 managed 或 self-hosted 的能力,请选择 Deep Agents
  • 如果你已深度投入 Anthropic ecosystem,并希望 self-host 且自行构建 API、auth 和 multi-tenant layers,请选择 Claude Agent SDK
发现错误?此对比编写于 2026 年 4 月 16 日。如果产品已经变化,请 file an issue