ai-agent-deployment-platforms-in-2026-bedrock-agentcore-vs-vertex-vs-foundry-vs-langsmith-2026%e5%b9%b4ai-agent%e9%83%a8%e7%bd%b2%e5%b9%b3%e5%8f%b0%e5%af%b9%e6%af%94%ef%bc%9aagentcore%e3%80%81verte.md raw 2026-11-04
style="padding: 30px;">
🔥 For Super-Solo Operators
Every Monday at 9am,
your AI toolbox arrives
Battle-tested prompt templates, copy-and-paste ready
Join 1,200+ super-solo operators making money with AI
⚡ Plug-and-play 🔒 Unsubscribe anytime 0 Fluff
Delivered Mondays 9am · Unsubscribe anytime
🔥 仅限超级个体
下周一早 9 点,
你的 AI 工具箱
每个提示词模板都经过实战验证,复制即用
已有 1,200+ 订阅者正在用 AI 搞钱
⚡ 即学即用 🔒 随时退订 0 废话
下周一早 9 点送达 · 随时退订

AI Agent Deployment Platforms in 2026: Bedrock AgentCore vs Vertex vs Foundry vs LangSmith | 2026年AI Agent部署平台对比:AgentCore、Vertex、Foundry 与 LangSmith 深度指南

> 2026-11-04 02:21  |  Uncategorized, 最佳实践 (Best Practices)  |  269 views269 次浏览

Where should a production AI agent actually run? A hands-on comparison of the four managed agent runtimes shipping in 2026 — what each one owns, where they differ architecturally, how they actually cost you, and how to pick between them without a rewrite later.

生产环境的 AI Agent 到底该跑在哪?2026 年在售的四个托管 Agent 运行时的实操对比——各自负责什么、架构差异在哪里、真实成本怎么算,以及如何在不留下「将来要重写」隐患的前提下做选择。

Every team that finishes an agent prototype eventually asks the same question: where does this thing run in production? The answer used to be “a container somewhere.” In 2026 it is a genuine architecture decision, because four vendors now sell a managed agent runtime, and the four make structurally different bets about identity, sandboxing, session semantics and cost. Most teams choose by feature checklist, then discover in month two that the thing they did not decide — who holds the credentials, how a session survives a deploy — was the thing that mattered.

每个把 Agent 原型做完的团队最终都会问同一个问题:这东西在生产环境跑在哪?过去的答案是「某个容器里」。到了 2026 年,这成了一个真正的架构决策——有四家厂商在卖托管 Agent 运行时,而这四家在身份、沙箱、会话语义和成本上做了结构性不同的取舍。多数团队按功能清单选,结果在第二个月才发现,真正关键的那个决定——凭证归谁管、会话如何熬过一次发版——恰恰是自己没做决定的那一件。

This guide compares Amazon Bedrock AgentCore, Google Vertex AI Agent Engine, Microsoft Foundry Agent Service and LangSmith Deployment — and, more usefully, gives you the decision path to choose between them. If you are still comparing agent frameworks rather than agent runtimes, start with AI agent workflow orchestration patterns compared and come back here. For the security side of shipping agents into an enterprise, see LLM security testing compared.

本指南对比 Amazon Bedrock AgentCore、Google Vertex AI Agent Engine、Microsoft Foundry Agent Service 与 LangSmith Deployment——更有用的是,给你一条在它们之间做选择的决策路径。如果你还在比较 Agent 框架而不是 Agent 运行时,先读AI 智能体工作流编排模式对比再回来。至于把 Agent 送进企业时的安全问题,见LLM 安全测试框架对比。

📑 Table of Contents


📑 文章目录


1. Why Agent Deployment Became Its Own Problem / 为什么「Agent 部署」成了独立命题

Almost every team that has shipped an AI agent has hit the same sequence of events. The prototype ran on a laptop. A colleague asked whether it could run in production. Somebody said yes, of course — the agent is just a Python process with an API key, so you put it behind a load balancer and you are done. Then the first real request arrives with a session longer than the timeout, a tool call that returns two megabytes of HTML, and a token that was minted ninety seconds ago and is now expired. The load balancer never notices any of it. The team spends a weekend adding retries.

几乎每个上线过 AI Agent 的团队都经历过同样的剧本。原型在笔记本上跑得好好的。有人问能不能上生产,有人说当然可以——Agent 不就是一个带 API key 的 Python 进程吗?套个负载均衡器就完事了。然后第一个真实请求进来:会话长度超过超时、某个工具调用返回了两兆的 HTML、九十秒前签发的 token 已经过期。负载均衡器对这些一无所知。整个团队花了一个周末补重试逻辑。

The reason this keeps happening is that a chat completion and an agent are not the same kind of software. A completion is a pure function: request in, tokens out, and the worst case is a slow response. An agent is a stateful, long-running, non-deterministic program that calls tools you do not control, holds credentials while it runs, and makes decisions that are impossible to replay deterministically. That combination changes what infrastructure you need. You do not need a bigger server. You need a runtime that knows what a session is.

之所以反复出问题,是因为「一次对话补全」和「一个 Agent」根本不是同一类软件。补全是纯函数:请求进、token 出,最坏情况只是响应慢。Agent 则是一个有状态、长运行、不确定性的程序:它会调用你无法控制的工具,运行期间持有凭证,并做出无法确定性重放的决策。这个组合彻底改变了你需要的基础设施。你不需要更大的服务器,你需要一个知道「会话」是什么的运行时。

This is where the 2026 platform market consolidated. AWS, Google, Microsoft and LangChain all now ship a managed runtime for agents, and the marketing pages look almost identical: runtime, identity, tools, observability, evaluation. Underneath, however, they make very different architectural bets, and the differences matter enormously the moment your agent has to run for eleven minutes, call a payment API, and survive a deploy in the middle of a task.

这正是 2026 年平台市场整合的起点。AWS、Google、Microsoft 和 LangChain 现在都提供了 Agent 托管运行时,营销页面看上去几乎一模一样:运行时、身份、工具、可观测性、评测。但底层架构取舍完全不同,而一旦你的 Agent 需要跑十一分钟、调用支付 API、并在任务中途经历一次发布,这些差异就变得极其致命。

2. The Five Layers of an Agent Deployment Stack / Agent 部署栈的五层结构

Before comparing vendors it helps to name the layers, because vendors cover different subsets and a lot of buying mistakes come from assuming parity. There are five layers, and a platform can own any combination of them.

在比较厂商之前,先把层次讲清楚,因为各家覆盖的子集不同,很多采购错误都源于误以为它们对等。总共五层,任何平台都可能拥有其中任意组合。

Layer 1 — Model access. Which models the agent can call, how they are routed, whether your provider bill is one line item or four. Bedrock gives you Claude, Llama, Nova and others behind one IAM policy; Vertex gives you Gemini plus partner models; Foundry hands you its own catalog plus gateway access to others.

第 1 层 —— 模型接入。Agent 可以调用哪些模型、如何路由、账单是一行还是四行。Bedrock 把 Claude、Llama、Nova 等收在一个 IAM 策略后面;Vertex 给你 Gemini 加合作伙伴模型;Foundry 提供自己的模型目录并通过网关接入其他模型。

Layer 2 — Runtime and session. The actual place the agent process lives, and whether the platform understands that a conversation has state across several minutes and several HTTP requests. Durable execution, streaming, pause-and-resume, and horizontal scaling of individual sessions all live here.

第 2 层 —— 运行时与会话。Agent 进程实际跑在哪里,以及平台是否理解「一次对话会跨越数分钟、数个 HTTP 请求持续保有状态」。持久化执行、流式返回、暂停恢复、以及单个会话级别的水平扩缩容都在这一层。

Layer 3 — Identity and tool access. How the agent authenticates to the outside world and what it is allowed to touch. This is where a naive deployment leaks: one long-lived credential sits in the process environment and every tool call uses it.

第 3 层 —— 身份与工具访问。Agent 如何对外认证、能碰什么。朴素部署的泄漏点正在这里:一个长期有效的凭证躺在进程环境变量里,所有工具调用共用它。

Layer 4 — Sandbox and execution. Whether code the agent writes actually runs somewhere isolated. Browser automation needs a real browser with a real network profile; code execution needs a container with a CPU and memory ceiling; both need outbound filtering.

第 4 层 —— 沙箱与执行。Agent 写出的代码是否真的跑在隔离环境里。浏览器自动化需要一个带真实网络配置的浏览器;代码执行需要带 CPU 和内存上限的容器;两者都需要出网过滤。

Layer 5 — Observability and evaluation. Traces, spans, token accounting, prompt versioning, and a way to score whether the agent did the right thing. Layer 5 is what turns a demo into an operable service, and it is where most teams discover they have no answer for a third of their traffic.

第 5 层 —— 可观测性与评测。链路追踪、span、token 计量、prompt 版本管理,以及给「Agent 是否做对了」打分的能力。第 5 层把演示变成可运营的服务,多数团队正是在这里发现自己有三分之一的流量完全答不上来。

Most platforms now sell layers 1, 2, 3 and 5. Only some sell a genuinely isolated layer 4. If your agent writes and executes code, that distinction decides your security review.

如今多数平台提供第 1、2、3、5 层。真正提供隔离第 4 层的只有一部分。如果你的 Agent 会写代码并执行,这个区别直接决定你的安全评审结论。

3. What “Managed” Actually Means (And What It Does Not) / 「托管」到底意味着什么(以及不意味着什么)

Managed agent platforms are routinely sold with the word serverless, and in a narrow sense that is true: you do not provision a container and you do not patch a base image. But the operational surface you inherit is very different from a Lambda function, and teams that confuse the two get surprised in month two.

托管 Agent 平台经常以 serverless 出售,在狭义上确实成立:你不申请容器,也不用打基础镜像。但你继承的运维面与 Lambda 函数截然不同,把两者混为一谈的团队通常在第二个月就吃到苦头。

A Lambda function has a request in, a response out, and a hard wall-clock limit you configure up front. An agent session can hold a sandboxed browser open for twenty minutes, retry a flaky third-party API, wait on a human approval step, and resume tomorrow. The platform therefore has to manage state you did not ask for: session stores, artifact storage for screenshots and downloaded files, background task queues, and a mechanism for waking a paused session back up.

Lambda 函数是请求进、响应出,前提是你提前配好硬性挂钟时限。Agent 会话可能让一个沙箱浏览器开着二十分钟、重试不稳定的第三方 API、等待人工审批、明天再恢复。于是平台必须管理你并没有要求的各种状态:会话存储、截图与下载文件的产物存储、后台任务队列,以及把暂停的会话唤醒的机制。

The second thing managed usually does not cover is the model bill. Agent workloads are token-hungry and unpredictable, and in most of these platforms the LLM inference cost is billed separately from the platform fee, in the provider’s own console. That means your platform bill can look completely healthy while your cloud bill triples. Budget for this before you launch, not after the first invoice.

第二件「托管」通常不覆盖的事是模型账单。Agent 负载吃 token 且难以预测,而在多数这类平台里,LLM 推理费用与平台费用分开计费、显示在供应商自己的控制台。也就是说平台账单看起来完全健康,你的云账单却翻了三倍。这笔账要在上线前算清楚,而不是在收到第一张发票之后。

Finally, check what happens to the data. Agent runtimes accumulate traces, tool outputs, retrieved documents and sometimes raw user content. Where those traces live, how long they are kept, and whether they are used for training are separate questions from whether your agent itself is secure, and the answers are not always the ones the marketing page implies.

最后要确认数据怎么处理。Agent 运行时会堆积链路追踪、工具输出、检索到的文档,有时还有原始用户内容。这些追踪存在哪、保留多久、是否被用于训练,与「Agent 本身是否安全」是两个独立问题,而答案并不总是营销页暗示的那样。

4. AWS Bedrock AgentCore: The AWS-Native Agent Runtime / AWS Bedrock AgentCore:AWS 原生的 Agent 运行时

Amazon Bedrock AgentCore is AWS’s answer to the deployment problem, and it is the most explicitly layered of the four. Rather than one blob, it is a set of composable runtime services that an agent uses independently: a Runtime to host the agent process, Memory for persistent context, a Gateway that fronts tools, an Identity component that issues scoped credentials, a Browser for real web interaction, a Code Interpreter for running generated code, plus Observability and Evaluations services.

Amazon Bedrock AgentCore 是 AWS 对部署问题的答案,也是四家里分层最明确的一个。它不是一个整块服务,而是一组可组合的运行时组件:托管 Agent 进程的 Runtime、用于持久上下文的 Memory、前置工具调用的 Gateway、签发受限凭证的 Identity、用于真实网页交互的 Browser、用于执行生成代码的 Code Interpreter,再加 Observability 与 Evaluations 服务。

The design decision that matters most is that Identity is a first-class component rather than something you bolt on. The agent does not hold a long-lived AWS key. Instead it requests scoped, short-lived credentials for a specific action, which is the pattern that makes an agent running arbitrary generated code survivable in an enterprise account. If you are deploying into an AWS organization with strict IAM boundaries, this is the single most important row in the evaluation matrix.

其中最关键的设计是:Identity 是一等组件,而不是事后自己缝上去的东西。Agent 本身不持有长期 AWS 密钥,而是针对某个具体动作去申请范围受限、有效期短的凭证——这正是「让运行任意生成代码的 Agent」在企业账号里能被接受的模式。如果你要部署进 IAM 边界严格的 AWS 组织,这是评估矩阵里最重要的一行。

Where AgentCore is weaker is ecosystem breadth. The tool and framework story is AWS-shaped: Bedrock models, Bedrock Knowledge Bases, Bedrock Guardrails, and Lambda-backed custom tools. Deploying a LangGraph or CrewAI app means packaging it yourself and leaning on the Runtime’s container contract, which is doable but less turnkey than the alternatives. Observability, on the other hand, is strong and integrates with CloudWatch.

AgentCore 相对薄弱的是生态广度。工具与框架的叙事完全围绕 AWS 展开:Bedrock 模型、Bedrock Knowledge Bases、Bedrock Guardrails,以及基于 Lambda 的自定义工具。部署一个 LangGraph 或 CrewAI 应用意味着自己打包、适配 Runtime 的容器契约——能做,但没有别家那么省事。反过来,它的可观测性很强,与 CloudWatch 集成良好。

Verdict: pick AgentCore when your agents must live inside an AWS account with real governance requirements, and you want identity and tool access handled by the platform rather than by your own code.

结论:当你的 Agent 必须活在有真实治理要求的 AWS 账号里,并且希望身份与工具访问由平台而不是你自己的代码来管时,选 AgentCore。

5. Google Vertex AI Agent Engine: The Gemini-Native Agent Platform / Google Vertex AI Agent Engine:Gemini 原生的 Agent 平台

Google’s answer is now branded as the Gemini Enterprise Agent Platform, and the deployment piece is the Agent Runtime — historically known as Agent Engine — sitting on Vertex AI. It is the most complete platform of the four in terms of adjacent services: the same account gives you Agent Development Kit for building, a runtime for hosting, an Agent Registry for discovery, session management, a sandbox for code execution, an evaluation service, RAG Engine for retrieval, and support for skills.

Google 的答案现在以 Gemini Enterprise Agent Platform 品牌呈现,部署部分是 Vertex AI 上的 Agent Runtime(历史上叫 Agent Engine)。就周边服务的完整度而言,它是四家里最高的:同一个账号里既有构建用的 Agent Development Kit、托管用的运行时、用于发现的 Agent Registry、会话管理、用于代码执行的沙箱、评测服务、RAG Engine 检索层,以及对 skills 的支持。

The interoperability story is the strongest argument for Vertex. The Agent Development Kit is framework-neutral, and the platform documents supported paths for LangChain, LangGraph, AG2, LlamaIndex and Google ADK, plus an Agent2Agent protocol for agent-to-agent communication and a first-class MCP story. If your organisation has already standardised on LangGraph across teams, the friction of adopting Vertex is mostly the runtime contract and the IAM model rather than rewriting your agent code.

互操作性是选 Vertex 最有说服力的理由。Agent Development Kit 与框架无关,平台文档明确给出了 LangChain、LangGraph、AG2、LlamaIndex 和 Google ADK 的接入路径,还有用于 Agent 间通信的 Agent2Agent 协议以及一等公民的 MCP 支持。如果你的组织已经在多个团队统一到 LangGraph,那么采用 Vertex 的摩擦主要是运行时契约和 IAM 模型,而不是重写 Agent 代码。

Cost is where Vertex gets interesting, and where you need to read carefully. Vertex bills for the underlying infrastructure you provision for a deployment, and on-demand serverless pricing behaves differently from a provisioned always-warm deployment depending on your traffic shape. For an agent workload with long sessions and bursty arrival rates, that difference is not academic — the same agent can be three times more expensive or three times cheaper depending on whether its runtime sits idle between sessions. Check the Vertex AI pricing page against your actual session length distribution before committing.

成本是 Vertex 有意思的地方,也是你必须仔细读的地方。Vertex 按你为部署实际配置的基础设施计费,而按需无服务器计费与常驻预置部署的行为差异取决于你的流量形态。对长会话、到达率突发的 Agent 负载来说,这个差别不是学术问题——同一个 Agent 在运行时闲置与否之间,成本可能差三倍。承诺之前,请用你真实的会话时长分布对照 Vertex AI 定价页核对一遍。

Verdict: pick Vertex AI Agent Engine when your stack is already Google-centric, when your agents need first-class MCP and agent-to-agent interoperability, or when you want a single platform spanning build, deploy, evaluate and observe.

结论:当你的技术栈本就以 Google 为中心、Agent 需要一等公民的 MCP 与 Agent 间互操作,或者你希望构建、部署、评测、观测都收敛到一个平台时,选 Vertex AI Agent Engine。

6. Microsoft Foundry Agent Service: The Enterprise Microsoft-Native Runtime / Microsoft Foundry Agent Service:面向企业的微软原生运行时

Microsoft Foundry Agent Service is the most explicitly enterprise-shaped of the four, and its documentation is the clearest about what each component does. The Agent Runtime hosts and scales both prompt agents (declarative, defined in the portal) and Hosted agents (your own packaged code), managing conversations, tool calls and agent lifecycle.

Microsoft Foundry Agent Service 是四家里最具企业形态的一个,其文档也最清楚地说明了各组件职责。Agent Runtime 负责托管和扩缩容两类 Agent:prompt agent(在门户中声明式定义)和 Hosted agent(你自己打包的代码),并管理会话、工具调用与 Agent 生命周期。

The Toolboxes concept is the piece most teams miss. You curate a set of tools once — web search, file search, code interpreter, MCP servers, custom functions — and then share them across every agent through a single managed MCP endpoint with centralised authentication, governance and versioning. That is not a small feature. It is the difference between thirty agents each hand-rolling their own tool-calling loop with a leaked API key, and thirty agents calling one audited, versioned endpoint.

多数团队会忽略 Toolboxes 这个概念。你只需一次性策展一套工具——网页搜索、文件搜索、代码解释器、MCP 服务器、自定义函数——然后通过一个统一的托管 MCP 端点在所有 Agent 之间共享,集中处理认证、治理和版本管理。这不是个小功能,而是「三十个 Agent 各自手写工具调用循环、各藏一个 API key」与「三十个 Agent 调用同一个被审计、有版本控制的端点」之间的差别。

The identity story is the other reason enterprises pick it. Microsoft Entra ID, role-based access control, content filters and virtual network isolation are part of the platform rather than something bolted on, and agents can be published into Microsoft Teams, Microsoft Copilot and the Entra Agent Registry as stable versioned endpoints. For an organisation already standardised on Entra and M365, an agent that can be surfaced to staff inside Teams without building a new front end is worth a great deal.

企业选择它的另一个理由是身份体系。Microsoft Entra ID、基于角色的访问控制、内容过滤与虚拟网络隔离都是平台自带而非事后加装,Agent 可以通过 Microsoft Teams、Microsoft Copilot 和 Entra Agent Registry 发布为带稳定版本的端点。对于已经标准化到 Entra 和 M365 的组织来说,一个无需另做前端就能出现在员工 Teams 里的 Agent,价值极高。

The trade-off is model and framework flexibility. Foundry works with a broad model catalog and lets you swap models without changing agent code, and it explicitly supports building with any framework or calling the Responses API from an agent you run elsewhere. But if your roadmap depends on bleeding-edge open-source agent frameworks, the ecosystem here is narrower than LangChain’s own runtime, and the developer experience outside Microsoft tooling is less documented.

代价是模型与框架的灵活度。Foundry 兼容广泛的模型目录且允许不改代码就换模型,也明确支持用任意框架构建、或从别处运行的 Agent 调用 Responses API。但如果你的路线图依赖前沿的开源 Agent 框架,这里的生态比 LangChain 自家运行时更窄,且在微软工具链之外的开发者体验文档更少。

Verdict: pick Foundry Agent Service when your organisation runs on Microsoft Entra and M365, when you need agents delivered into Teams and Copilot, and when governance and identity must pass your security review from day one.

结论:当你的组织运行在 Microsoft Entra 与 M365 之上、需要把 Agent 交付进 Teams 和 Copilot、且治理与身份必须从第一天起就是企业级时,选 Foundry Agent Service。

⭐ Editor’s Pick

Microsoft Foundry Agent Service — the Toolboxes-to-one-managed-MCP-endpoint model is the most transferable architectural idea in this entire comparison. It works in any cloud, on any framework, and it solves the exact problem most hand-rolled agent stacks get wrong: every agent reaching for the same tool with its own credentials. If you copy one pattern from this guide, copy that one.

⭐ 编辑推荐

Microsoft Foundry Agent Service——Toolboxes 统一到一个托管 MCP 端点的模式,是整篇对比里最值得搬运的架构思路。它在任何云、任何框架上都成立,而且正好解决了大多数手写 Agent 栈最容易搞错的问题:每个 Agent 都拿着自己的凭证去调同一个工具。如果你从这份指南里只复制一个模式,就复制这一个。

7. LangSmith Deployment: The Framework-Agnostic Runtime / LangSmith Deployment:框架无关的运行时

LangSmith Deployment takes the opposite approach to the three hyperscalers. It does not try to be a model provider or an enterprise identity system. It is a workflow orchestration runtime purpose-built for agent workloads, and it is explicitly framework-agnostic: you can deploy LangGraph and LangChain applications with the LangGraph CLI and application templates, deploy Google ADK agents as LangGraph applications through the deployments-wrap-sdk package, and deploy the Claude Agent SDK, Strands, CrewAI and AutoGen through the Functional API or the same wrapper.

LangSmith Deployment 的思路与三大云厂商完全相反。它不试图做模型供应商,也不试图做企业身份系统,它是一个专为 Agent 负载打造的 workflow 编排运行时,并且明确与框架无关:LangGraph 和 LangChain 应用可以用 LangGraph CLI 与应用模板部署,Google ADK Agent 可通过 deployments-wrap-sdk 包装成 LangGraph 应用部署,而 Claude Agent SDK、Strands、CrewAI、AutoGen 则通过 Functional API 或同一套 wrapper 部署。

Every deployment type runs the same Agent Server runtime — the control plane and the data plane are separate concerns, and you choose an environment: fully managed Cloud, bring-your-own-cloud, or self-hosted on your own infrastructure. For teams with data residency or air-gap requirements, BYOC and self-hosted are the reason this option exists at all; none of the hyperscalers offer you the option of running the agent runtime in your own account with the vendor’s control plane.

所有部署类型都跑同一套 Agent Server 运行时——控制平面与数据平面是分离的,你按需选择环境:完全托管的 Cloud、自带云(BYOC),或自托管在你自己的基础设施上。对于有数据驻留或气隙要求的团队,BYOC 与自托管正是这个选项存在的理由;三大云厂商都不提供「控制平面归厂商、数据平面放你自己账号」这种组合。

The durable execution model is the other differentiator. Agent workloads are long, stateful and interruption-prone; LangGraph’s checkpointer model plus the deployment runtime’s support for durable execution and real-time streaming means a session can survive a redeploy mid-task. Horizontal scaling of individual sessions is the specific claim that matters for multi-tenant agent products, where one noisy customer should not consume the entire capacity.

持久化执行模型是另一个差异点。Agent 负载冗长、有状态且容易被中断;LangGraph 的 checkpointer 模型加上部署运行时对持久化执行和实时流式的支持,意味着一个会话可以在任务中途经历重新发布而存活。单个会话级别的水平扩缩容,是多租户 Agent 产品真正在意的指标——一个吵闹的客户不该吃掉全部容量。

The trade-off is equally clear. LangSmith Deployment is a runtime, not an enterprise control plane. You will not get Entra-style directory integration, managed model catalogs with content filtering, or a first-party browser sandbox unless you bring your own. And if your organisation has standardised on one hyperscaler, running this runtime outside that cloud introduces a second cloud relationship, a second set of network paths, and a second bill.

代价同样清晰。LangSmith Deployment 是运行时,不是企业控制平面。你不会自动获得 Entra 式的目录集成、带内容过滤的托管模型目录,或第一方浏览器沙箱——除非你自己带。另一个问题是:如果你的组织已经统一到某一家云,把这个运行时放在该云之外,就意味着多出一段云合作关系、多一套网络路径和多一张账单。

Verdict: pick LangSmith Deployment when your agents are built in LangGraph or another portable framework, when you need BYOC or self-hosting for data residency, or when you want to keep the runtime independent of your model provider.

结论:当你的 Agent 基于 LangGraph 或其他可移植框架构建、需要 BYOC 或自托管来满足数据驻留、或者希望运行时不与模型供应商绑定时,选 LangSmith Deployment。

8. Head-to-Head: Runtime, Identity, Sandbox, Observability / 正面对比:运行时、身份、沙箱、可观测性

Vendor pages describe capabilities; procurement needs a matrix. The four capabilities below are the ones that most often determine whether an agent can go to production, and they are the ones you should score vendors against rather than feature checklists.

厂商页面描述能力,采购需要的是矩阵。下面四项能力最常决定一个 Agent 能否真正上生产,也正是你应该用来给厂商打分的东西,而不是功能清单。

Runtime and session semantics. Does the platform keep session state across requests, support streaming, and let one session pause for human approval and resume hours later? All four claim yes. The real question is whether pausing and resuming works across a redeploy, and whether you can scale a single long-running session without queueing behind others.

运行时与会话语义。平台是否跨请求保持会话状态、是否支持流式返回、单个会话能否暂停等待人工审批并在数小时后恢复?四家都声称支持。真正的问题是:暂停与恢复能否跨越一次重新发布,以及单个长会话能否扩容而不排在别人后面。

Identity. AgentCore issues scoped short-lived credentials per action. Foundry binds to Entra and RBAC. Vertex gives you IAM plus OAuth auth managers for service-to-service and user-delegated access. LangSmith Deployment leaves identity to you, which is a feature if you already have a strong internal token service and a liability if you do not.

身份。AgentCore 按动作签发范围受限的短期凭证;Foundry 绑定 Entra 与 RBAC;Vertex 提供 IAM 以及面向服务间与用户委托访问的 OAuth auth manager;LangSmith Deployment 把身份完全交给你——如果你已有强内部令牌服务,这是优点;没有的话就是负债。

Sandbox. Only some of these platforms ship a genuinely isolated execution environment with resource ceilings and outbound network filtering. If your agent generates and runs code, or drives a browser against untrusted pages, this is a compliance requirement, not a nice-to-have. AgentCore and Vertex both offer sandboxed execution; Foundry offers hosted agents with network isolation controls; LangSmith offers sandboxes as a separate product surface.

沙箱。只有部分平台提供真正隔离的执行环境,具备资源上限与出网过滤。如果你的 Agent 会生成并运行代码,或者驱动浏览器访问不可信页面,这是合规要求而非可选项。AgentCore 与 Vertex 都提供沙箱执行;Foundry 提供带网络隔离管控的 Hosted agent;LangSmith 则把沙箱作为独立产品面提供。

Observability and evaluation. Bedrock AgentCore writes into CloudWatch; Vertex uses Cloud Trace and Cloud Logging; Foundry exposes tracing, metrics and evaluations with Application Insights; LangSmith is the strongest standalone option here because evaluation was the product before deployment was. If you are an OpenAI shop that already uses LangSmith for tracing, note that evaluation and deployment are separate SKUs with separate pricing.

可观测性与评测。Bedrock AgentCore 写入 CloudWatch;Vertex 使用 Cloud Trace 与 Cloud Logging;Foundry 通过 Application Insights 暴露追踪、指标与评测;LangSmith 在这一项是最强的独立方案——评测本来就是它的起点产品,部署是后加的。如果你已经在用 LangSmith 做追踪,注意评测与部署是分开的产品线、分开计费。

9. Framework Compatibility: What Actually Ports / 框架兼容性:哪些东西真的能迁移

A platform that requires rewriting your agent in a proprietary SDK is not a platform, it is a migration project. The four options differ more here than the marketing suggests.

需要你把 Agent 重写成某种专有 SDK 的平台不是平台,而是一次迁移工程。这一项上四家的实际差异比营销页暗示的更大。

If your agents are LangGraph graphs, LangSmith Deployment is the zero-friction path and Vertex AI Agent Engine is a good second, since the platform documents a LangGraph path alongside ADK. If your agents are Google ADK, Vertex is obviously native and LangSmith supports ADK through the wrapper. If your agents are Microsoft Copilot Studio prompts, Foundry is the only one of the four that hosts that style of agent natively. If your agents are plain Python with a custom tool loop, all four can host them, and the decision comes down to identity and sandboxing rather than framework support.

如果你的 Agent 是 LangGraph 图,LangSmith Deployment 是零摩擦路径,Vertex AI Agent Engine 也很顺——平台在 ADK 之外也记录了 LangGraph 接入方式。如果是 Google ADK,Vertex 当然是原生,LangSmith 通过 wrapper 也支持 ADK。如果是 Microsoft Copilot Studio 式的 prompt agent,四家里只有 Foundry 原生托管这种形态。如果是带自定义工具循环的纯 Python,四家都能托管,此时决策点就不是框架支持,而是身份与沙箱。

The trap is the runtime contract. Most managed platforms expect a specific packaging shape — a FastAPI-style ASGI app, a container image, a health endpoint, a specific start command. Agents written as Jupyter-notebook-shaped scripts with global state fail to deploy in ways that are annoying but fixable. Budget a day for the packaging work and read the platform’s deployment contract before you commit to it.

陷阱在于运行时契约。多数托管平台期望特定的打包形态——FastAPI 风格的 ASGI 应用、容器镜像、健康检查端点、特定的启动命令。以笔记本脚本形态写成、带全局状态的 Agent 会以令人恼火但可修复的方式部署失败。为打包工作预留一天,并在承诺前先读平台的部署契约。

10. The Real Cost Model / 真实的成本模型

Pricing pages for agent platforms are unusually unhelpful, because the meaningful cost is not the platform fee. Here is the model that actually determines your bill.

Agent 平台的定价页异常地没有参考价值,因为真正有意义的成本不是平台费。下面才是决定你账单的模型。

Your bill has three components. First, the platform fee — the runtime, the gateway, the evaluation storage, the trace retention. Usually the smallest line. Second, model inference, billed by the model provider and dominated by the agent’s context window rather than its answer length, because every tool result and every prior turn gets re-sent. Third, the incidental infrastructure: sandboxes with browser instances are surprisingly expensive, because a browser session is memory-heavy and holds a slot while it thinks.

你的账单由三部分组成。第一,平台费——运行时、网关、评测存储、追踪保留,通常是最小的一项。第二,模型推理,由模型供应商计费,且被 Agent 的上下文窗口而非回答长度主导,因为每个工具结果和每一轮历史都要重新发送。第三,附带基础设施:带浏览器实例的沙箱出奇地贵,因为浏览器会话很吃内存,而且它在「思考」期间也占着槽位。

That third point is the one that catches teams. A browser-using agent that keeps a Chromium instance alive across a twenty-minute task is holding a memory-heavy slot for the whole task. If your platform charges for sandbox runtime rather than sandbox count, your cost scales with agent think-time, which is the one metric nobody forecasts accurately.

第三点最容易让团队栽跟头。一个跨二十分钟任务保持 Chromium 实例存活的浏览器 Agent,在整个任务期间都占着一个吃内存的槽位。如果你的平台按沙箱运行时长而非沙箱数量计费,你的成本就随 Agent 的「思考时长」增长——而这恰恰是最没人能准确预测的指标。

The practical advice: instrument session duration and tool-call count on day one, before you scale. Multiply by your model context size and your sandbox rate, and you will have a defensible per-task cost. Teams that do this discover within a month that their most expensive agent is not the one with the most features but the one that retries a failing tool three times, because each retry re-sends the full context.

实用建议:上线第一天就埋点统计会话时长和工具调用次数,乘以模型上下文规模和沙箱费率,你就能得到一个站得住脚的「每任务成本」。做过这件事的团队通常一个月内就会发现,最贵的 Agent 不是功能最多的那个,而是某个工具失败后重试三次的那个——因为每次重试都要重发完整上下文。

11. BYOC, Self-Hosting, and When They Are the Right Answer / 自带云与自托管:什么时候才是对的答案

Every one of these four platforms can run somewhere other than its vendor’s cloud, in one form or another. This matters for three reasons, and it is the axis on which the choice often turns.

这四个平台都能以某种形式跑在厂商云之外。这一点对三个原因很关键,也是决策经常真正转向的维度。

Data residency is the most common driver. If a regulator, a customer contract, or an internal policy says agent traces and tool outputs must stay inside a specific jurisdiction or a specific network boundary, then a managed-only platform is simply disqualified for that workload — and it does not matter how good the runtime is.

最常见的驱动因素是数据驻留。如果监管、合同或内部政策规定 Agent 的追踪与工具输出必须留在特定司法辖区或特定网络边界内,那么「仅托管」的平台对这类负载就直接出局——运行时有多好都不重要。

The second driver is the agent’s own position in your architecture. An agent that orchestrates across many internal services, each behind its own IAM boundary, sometimes ends up better hosted on infrastructure you already operate well than on a new managed platform with its own networking model and its own egress rules.

第二个驱动因素是 Agent 在你架构中的位置。一个横跨多个内部服务、各自背后有独立 IAM 边界的 Agent,有时更适合跑在你已经运维熟练的基础设施上,而不是一个新的托管平台——后者有自己的网络模型和自己的出网规则。

The third driver is cost predictability at volume. At a small number of sessions, a fully managed platform’s simplicity is worth paying for. At thousands of concurrent long-running sessions, the difference between a managed platform’s per-session rate and your own reserved capacity becomes material enough to change the calculation. Most teams should start managed and revisit at roughly a hundred concurrent sessions — but they should know the crossover is coming.

第三个驱动因素是大规模下的成本可预测性。在会话量不大时,完全托管平台的省事值得付钱;到上千个并发长会话时,托管平台按会话计价与自己预留容量之间的差距就足以改变账目。多数团队应该从托管起步,在大约一百并发会话时重新评估——但你要知道拐点终究会来。

12. Common Failure Modes in Agent Deployments / Agent 部署中的常见故障模式

None of this is exotic. These are the failures that show up in the first month on every platform, and knowing them in advance saves a rewrite.

这些都不是什么新鲜事。下面是每个平台上线第一个月都会出现的故障,提前知道能省掉一次重写。

Context growth that breaks the model. An agent that accumulates tool output without summarisation eventually exceeds the context window or degrades badly inside it. The platform will happily run it until the request fails or the bill doubles. Budget for compaction in the agent, not in the platform — most platforms do not provide it.

撑爆模型的上下文增长。Agent 不断累积工具输出却不做摘要,最终会超出上下文窗口,或在窗口内严重退化。平台会一直开心地跑,直到请求失败或账单翻倍。摘要压缩要在 Agent 里做,不要指望平台——多数平台并不提供。

Credential leakage through tool output. A tool that returns an environment dump, a verbose stack trace or a config file puts credentials into the transcript, and the transcript goes to the trace store. If the trace store is broadly readable, your secrets are now broadly readable.

工具输出导致的凭证泄漏。某个工具返回了环境变量转储、冗长堆栈或配置文件,凭证就进了对话记录,而对话记录会进追踪存储。如果追踪存储的读取权限过宽,你的密钥也就过宽了。

Retry storms. A flaky third-party API plus an agent retry policy without backoff and jitter turns a mild degradation into a self-inflicted outage, and the agent burns tokens on every attempt while waiting.

重试风暴。不稳定的第三方 API 加上没有退避与抖动的重试策略,会把轻微劣化变成自己制造的故障,而 Agent 每次等待都在烧 token。

One session, one user, all the traffic. If your platform scales deployments rather than sessions, one heavy customer occupies a worker and every other customer queues behind them. Test this explicitly with a deliberately long-running session before you sign the contract.

一个会话、一个用户,扛下全部流量。如果你的平台扩缩的是部署而不是会话,那么一个重量级客户会占住一个 worker,其他客户全排在他后面。签约前用一个刻意超长的会话专门测这一条。

Sessions that never end. Without a hard ceiling on turn count and wall-clock time, a confused agent will loop until it exhausts its budget. Put the limit in code and enforce it in the platform.

永不结束的会话。如果没有轮次和挂钟时间的硬上限,一个混乱的 Agent 会一直循环直到耗尽预算。上限要写在代码里,并在平台侧强制执行。

13. How to Choose: A Decision Path / 如何选择:一条决策路径

If you take one thing from this guide, take the decision path. Vendor features will change; the constraints that pick a platform do not.

如果从这份指南里只带走一样东西,就带走这条决策路径。厂商功能会变,而决定平台选择的约束不会变。

Are you bound by data residency or network isolation? If yes, eliminate every platform you cannot run in your own account or your own jurisdiction. That leaves LangSmith Deployment BYOC, Foundry with virtual network isolation, or Vertex in your own Google Cloud project. You are now choosing between three, not four, and the rest of the path applies to the survivors.

你受数据驻留或网络隔离约束吗?如果是,先把不能在你自己的账号或司法辖区内运行的平台全部排除。剩下 LangSmith Deployment 的 BYOC、带虚拟网络隔离的 Foundry,或你自己 Google Cloud 项目里的 Vertex。此时你是在三个里选,而不是四个,后续路径对这三人适用。

Which hyperscaler does your identity system live in? Entra means Foundry and it is not close. AWS IAM and a mostly-AWS estate means AgentCore. Google Cloud and Workspace means Vertex. A framework-neutral, provider-neutral engineering culture that already runs LangGraph points at LangSmith Deployment.

你的身份体系住在哪家云?Entra 就选 Foundry,而且没有悬念;AWS IAM 为主、资产基本在 AWS,就选 AgentCore;Google Cloud 和 Workspace 为主,就选 Vertex;而框架中立、供应商中立、已经在用 LangGraph 的工程文化,则指向 LangSmith Deployment。

Does the agent generate and execute code, or drive a browser? If yes, sandbox quality becomes a gate rather than a weighted criterion, and you should run a real escape-and-resource test against the finalists — not read the feature matrix. If no, this dimension barely matters and you should weight observability and evaluation higher.

你的 Agent 会不会生成并执行代码,或驱动浏览器?如果会,沙箱质量就从「加权项」升级为「准入门槛」,而且你应该对入围者跑真实的越界与资源占用测试,而不是读功能矩阵。如果不会,这个维度几乎不重要,就该把可观测性与评测的权重调高。

What is your real session volume and session length? Under a hundred concurrent sessions, take the managed experience and revisit. Above that, cost per session-hour starts to matter more than developer ergonomics, and the BYOC and self-hosted options come into the calculation properly.

你的真实会话量和会话长度是多少?并发会话不到一百,就选托管体验并留待复评;超过这个量级,每会话小时的成本就比开发体验更重要,BYOC 与自托管选项才真正进入计算。

What is your framework, and who owns it? Framework-native platforms win the first port. But if the framework is LangGraph and you might change runtime provider later, LangSmith Deployment keeps that optionality open, while a Vertex or AgentCore deployment quietly couples you to one cloud’s packaging, IAM and egress model.

你的框架是什么,以及谁拥有它?框架原生的平台在第一次迁移上占优。但如果框架是 LangGraph、而你将来可能更换运行时供应商,LangSmith Deployment 会保留这份可选性;投到 Vertex 或 AgentCore 则会悄悄把你绑定在某一家的打包、IAM 与出网模型上。

14. A Rollout Checklist That Holds Up / 一份经得起检验的上线清单

A staged rollout beats a big-bang migration almost every time, and the stages below are ordered so that each one is cheap to abandon.

分阶段推进几乎总是好过一次性大迁移,下面这些阶段的排序保证每一阶段都能低成本放弃。

Stage one: one agent, one tool, read-only. Pick an agent with a single read-only tool. Deploy it to the platform’s managed tier. Do not write any platform-specific code beyond the packaging contract. If this stage takes more than a week, the platform is wrong for you and you have learned that cheaply.

阶段一:一个 Agent、一个工具、只读。挑一个只有单一只读工具的 Agent,部署到平台的托管层。除了打包契约之外不写任何平台专属代码。如果这一步超过一周,说明平台不适合你,而你只花了很小的代价就知道了。

Stage two: add identity and a sandbox. Wire the platform’s identity component to the agent’s tool calls and move code execution into a sandbox. This is where you find out whether the platform’s security model matches your internal review, and it is much cheaper to find out with one agent than with forty.

阶段二:加上身份与沙箱。把平台的身份组件接到 Agent 的工具调用上,把代码执行移进沙箱。这一步你会发现平台的安全模型是否符合你们的内部评审——用一个 Agent 去发现,比用四十个便宜得多。

Stage three: observability and evaluation. Turn on tracing, then define three to five evaluations that assert outcomes rather than phrasing. Run them as a nightly regression suite. Only after this stage is green does it make sense to let the agent touch anything that writes.

阶段三:可观测性与评测。打开追踪,然后定义三到五个断言「结果」而非「措辞」的评测,把它们跑成每夜的回归套件。只有这一步全绿之后,才有必要让 Agent 去碰任何会写入的系统。

Stage four: cost instrumentation and a scale test. Instrument session duration, tool calls and sandbox time. Then run a load test that deliberately includes one very long session, to see whether it blocks other traffic. Fix whatever that test breaks before you need it in production.

阶段四:成本埋点与压测。埋点统计会话时长、工具调用次数与沙箱占用时长,然后跑一次压测,故意包含一个超长会话,观察它是否阻塞其他流量。在你需要它之前,先修好这次压测暴露的问题。

Stage five: production with a kill switch. Ship to a small slice of traffic with an independent kill switch that stops the agent from acting, not just from responding. Every mature agent platform assumes you will need to halt an agent quickly and independently of a deploy.

阶段五:小流量上线并配急停开关。先放一小部分流量,并准备一个独立于发布的急停开关——它要能停止 Agent 行动,而不只是停止它响应。每个成熟的 Agent 平台都默认你会需要快速、独立于发版地叫停一个 Agent。

15. Where This Is Heading / 未来走向

The direction of travel is clear enough to plan around, even if the details will change.

趋势已经清晰到足以据此规划,尽管细节还会变。

The category is consolidating around the five layers defined earlier, with the hyperscalers owning models plus identity plus runtime and the specialists owning runtime plus evaluation. The most interesting developments will come at the seams: a managed runtime that can hand a session to a BYOC data plane, and evaluations that run against the deployment rather than against a mock.

这个品类正围绕前面定义的五层整合:超大规模云厂商拥有模型、身份与运行时,专门的厂商拥有运行时与评测。最有意思的进展会出现在接缝处——托管运行时把会话交还给自带云的数据平面,以及直接针对部署环境、而非针对 mock 运行的评测。

Two specific things are worth watching. The first is agent identity becoming a standard, the way service accounts and workload identity did for services — an agent acting under a delegated, auditable, expiring identity is the only way these systems get past enterprise security review. The second is durable execution becoming the default rather than a feature, which quietly changes what an agent application can promise its users about long-running work.

有两件事特别值得观察。第一是 Agent 身份走向标准化,就像服务账号和工作负载身份之于服务——一个在可委托、可审计、会过期的身份下行动的 Agent,是这些系统通过企业安全评审的唯一方式。第二是持久化执行从「功能」变成「默认」,这悄悄改变了 Agent 应用能向用户承诺什么。

The strategic implication for readers running agents today: the runtime choice matters less than it will look in a year, because the packaging contracts will keep converging and portability will keep improving. The things that will not commoditise are your evaluation suite, your identity integration, and your cost model. Those three are worth investing in now, on whichever platform you pick.

对今天就在跑 Agent 的读者来说,战略含义是:运行时的选择没有一年后看起来那么重要,因为打包契约会持续收敛、可移植性会持续改善。不会商品化的是你的评测套件、你的身份集成和你的成本模型。这三样值得现在就投入,无论你选哪个平台。

FAQ | 常见问题

EN: Which agent platform should a small team choose in 2026?

For a small team, the framework usually decides it: LangGraph points to LangSmith Deployment, Google ADK points to Vertex AI Agent Engine, and Copilot Studio-style prompt agents point to Microsoft Foundry Agent Service. If you have no framework yet and no cloud commitment, start with the managed tier of whichever platform your identity system already lives in — identity integration is the part you cannot easily change later.

对小团队来说,通常是框架决定一切:LangGraph 指向 LangSmith Deployment,Google ADK 指向 Vertex AI Agent Engine,Copilot Studio 式 prompt agent 指向 Microsoft Foundry Agent Service。如果既没有框架也没有云绑定,就从你身份体系所在的那家云开始选托管层——身份集成是后面最难改的部分。

CN: 小团队该选哪个 Agent 平台?

EN: Do I need a sandbox if my agent only calls read-only APIs?

Not strictly, but you still need identity scoping. Read-only tools can still leak data through their responses, and a compromised tool endpoint can return anything. The sandbox matters most when the agent generates and executes code or renders untrusted web content, where the execution environment itself becomes the attack surface.

严格说不必须,但你仍然需要身份范围控制。只读工具仍可能通过响应泄漏数据,被攻陷的工具端点也可以返回任意内容。当 Agent 会生成并执行代码,或渲染不可信网页内容时,沙箱才最关键——那时执行环境本身就成了攻击面。

CN: 如果我的 Agent 只调用只读 API,还需要沙箱吗?

EN: How do I keep an agent from looping forever?

Enforce a hard ceiling on both turn count and wall-clock time in your own agent code, and configure the platform’s own timeout and iteration limits as a second line of defence. Also make the agent’s state observable per turn so you can see the loop rather than infer it from a bill.

在自己的 Agent 代码里,对轮次和挂钟时间都设硬上限,再把平台自身的超时与迭代限制作为第二道防线。同时把每轮的 Agent 状态做成可观测的,这样你是「看到」循环,而不是从账单上倒推出来。

CN: 怎么防止 Agent 无限循环?

EN: Is a managed platform cheaper than running the agent yourself?

Below roughly a hundred concurrent sessions, managed is usually cheaper once you count the engineering time to run containers, patch base images, handle TLS, and keep the observability stack alive. Above that threshold, reserved capacity on infrastructure you already operate often wins, especially when your agents hold expensive resources like browser sandboxes idle between turns.

并发会话不到一百时,通常托管更便宜——一旦算上你自己运维容器、打基础镜像补丁、处理 TLS 和维持可观测性栈的人力成本。超过这个量级,在你已经熟悉的基础设施上用预留容量通常更划算,尤其是 Agent 在两轮之间还占着浏览器沙箱这类昂贵资源的时候。

CN: 托管平台比自己跑 Agent 更便宜吗?

EN: Can I migrate between platforms later?

You can move a LangGraph or ADK agent with moderate effort, because the framework code stays intact and only the packaging contract changes. You cannot easily move your identity integration, your evaluation suite, or your trace schema. Treat the platform as replaceable and the surrounding discipline as the actual asset.

LangGraph 或 ADK 的 Agent 迁移成本中等——框架代码保持不变,变的只是打包契约。但你的身份集成、评测套件和追踪 schema 是很难搬走的。把平台当作可替换的,把周围那套工程纪律当作真正的资产。

CN: 以后能换平台吗?

🏷️ Tags: AI Agents, Agent Deployment, Bedrock AgentCore, Vertex AI, Microsoft Foundry, LangSmith, MLOps, LLM Infrastructure

📰 分类: 最佳实践 (Best Practices) — Category ID: 9

📬 Your AI toolbox, every Monday at 9am

Battle-tested prompt templates, copy-and-paste ready
Join 1,200+ super-solo operators making money with AI

🔒 Unsubscribe anytime · No ads · Pure value · Delivered Mondays 9am

📬 下周一早上 9 点,你的 AI 工具箱

每个提示词模板都经过实测验证,复制即用
已有 1,200+ 超级个体正在用 AI 搞钱

🔒 随时退订 · 绝无广告 · 只发价值 · 下周一早 9 点送达

← LLM Security Testing in 2026: Promptfoo vs garak vs PyRIT vs NeMo Guardrails | 2026年LLM安全测试完全指南:Promptfoo、Garak、PyRIT 与 NeMo Guardrails 深度对比 AI Clinical Decision Support in 2026: A Complete Guide to CDS Platforms, Medical Coding AI and Denial Prevention | 2026年AI临床决策支持完整指南:CDS平台、医疗编码AI与拒付预防 →