insight Latent Space Wed, 07 Oct 2026 正文 ok 1468 words

云原生 Harness 能否让 Agent 在桌面之外可靠运行?

英文标题:Can a Cloud-Native Harness Make Agents Reliable Beyond the Desktop?

Kubernetes 联合创始人 Craig McLuckie 与 Joe Beda 正通过 Stacklok,将 Agent harness 从以桌面为中心的模式迁移至云原生架构。其开源项目 Mecatl 将 Agent 循环、工具执行、会话状态、模型提供商和客户端解耦,以 Kubernetes 式控制循环提升可靠性、隔离性和可管理性。Stacklok 还推出了用于治理 MCP 服务器的 ToolHive,并在构建面向受监管企业的 AI Gateway。公司认为,企业需要能够集中管理身份、权限、策略、审计与成本的 Agent 基础设施,而非仅依赖运行在员工个人电脑上的 Claude Code、Codex 或 GitHub Copilot 等工具。
打开原文相关 3.3 · 机会 2
media1.5 KB media13.3 KB media1.3 KB media1017.7 KB media1.2 KB media43.0 KB media46.8 KB media161.4 KB media306.5 KB media39.1 KB

中文

从高层来看,编程 Agent 具有一种基本架构:LLM 在循环中调用工具,同时持续携带所需上下文。由于这类架构最容易在本地实现,许多编程 Agent 最初都是终端工具,随后才演变为桌面应用(知名的 Claude Code 就是从 CLI 工具起步)。但正如 “打开笔记本电脑”梗图 所揭示的,如果现代 Agent harness 无法在云端得到管理,就会存在令人沮丧的局限性。

[软件工程师在 Agent 出现前后 2026 年 5 月 3 日凌晨 3:04 · 509 万次浏览


457 条回复 · 1,290 次转发 · 1.97 万个赞](https://x.com/cormachayden_/status/2050773588521992642)

自 2025 年以来,OpenAI 和 Anthropic 都在尝试将其 harness 更多地迁移到云端,但成功程度各不相同。其中的挑战包括保持会话可靠、隔离工具执行,以及保存上下文。

这听起来很像2010 年代初期的容器编排。开源项目 Kubernetes 于 2014 年从这一领域中诞生。由 Google 开发的 Kubernetes 成为了在大规模环境中部署和管理云应用的主导性开源系统,并开启了计算领域的 “云原生”时代。

Kubernetes 使用控制循环来保持应用持续运行、从故障中恢复,并在需要时进行扩缩容。如果编程 Agent 也能以同样的方式被管理,会怎样?

这正是两位 Kubernetes 创始人——Craig McLuckie 和 Joe Beda——借助 Stacklok 所押注的方向。

Stacklok 架构图

Stacklok 架构;图示来自 Stacklok

Stacklok 曾在 2023 年从 Accel、Madrona 和 Bain Capital 获得 1750 万美元 A 轮融资。该公司最初专注于软件供应链安全,近期则转向基于 Kubernetes 的 Agent 解决方案。

Stacklok 最值得关注的产品是 Mecatl。这是一个“云原生 harness”,于今年 6 月作为 GitHub 上的开源项目启动。起初,我以为这个名字读作“me-cattle”,是在玩 Kubernetes “牲畜与宠物(cattle vs. pets)”概念的文字游戏——即应将服务器、Pod 和集群当作牲畜而不是宠物对待。但实际上并非如此:它读作“MEH-kah-tl”,是一个意为绳索或缆绳的阿兹特克词汇。

无论如何,在 harness 的语境中,云原生究竟意味着什么?

McLuckie 表示,这主要是要**“将价值的重心从桌面迁移到云端”**。他说的是企业视角下的“价值”:代码和上下文往往来源于本地环境。Beda 补充说:“知识产权就在那里。如果你希望真正将其纳入管理,当它位于桌面上时,管理难度会高得多。”

McLuckie 还补充说,云原生方法也让 Stacklok 能够对 Agent 编程提出一些更深层的问题。

“为什么 Agent 循环要与工具调用子系统如此紧密地耦合?为什么要透过人类身份系统的视角来理解 Agent 身份?”

在开源 Agent harness 领域,已经存在备受认可的方案,例如 Pi——一个“极简 Agent harness”,Flue 等项目正构建于其之上。我们询问 Stacklok 的两位创始人:他们的 harness 有何不同?

Beda 没有特别提到 Pi,但他说,在桌面优先的 harness 中,循环、本地执行和会话状态通常都始于同一个进程。

“这个领域有大量解决方案,但它们本质上都聚焦于在桌面运行,”他说,“所以即便它们具备可插拔性,其架构仍是一个进程,或者一组紧密耦合的进程,专为运行在桌面上而构建。”

但企业难道不能利用虚拟机、容器,或众多沙箱产品中的一种,将 harness 迁移到云端吗?

Beda 表示,这种**“直接迁移(lift and shift)”**方法往往会带来与 Agent 生命周期相关的问题,也难以让 Agent 进入静默状态(即在等待人工输入时安全地暂停它)。

“我们的想法是:如果我们从底层重新思考 harness,让它真正运行在云端,会怎样?”

Mecatl 的一个耐人寻味之处在于,它使 Agent 循环独立于客户端、模型提供商、状态存储和执行环境。

Beda 在谈到循环应用时表示:“这是一个我们知道如何在云端良好运行的应用。如果我们把它拿出来,将其与更敏感的操作分离,例如工具调用和 bash;再将会话管理和记忆等内容分离出去,使这些内容不再作为位于磁盘上的 JSONL 文件存储,而是能够原生地放入可管理的系统中,会怎样?”

许多读者可能都拥有非常有主见、根据自身需求定制的 harness。但 Mecatl 的设计目标,是超越单用户、本地化的 harness,成为企业能够集中运营的基础设施。Beda 将其类比为企业管理电子邮件的方式。

“我们认为,未来当你为一家企业工作时,与 Agent 的互动**属于那家企业;**企业会希望像管理电子邮件那样,对这些互动进行管理与治理。”

Stacklok 的主要动机之一,是帮助大型企业降低对前沿实验室和超大规模云服务商的依赖,例如 Codex、Claude Code 和 GitHub Copilot。McLuckie 表示,这与 Kubernetes 如何帮助企业减少对大型云服务商的依赖相似。

对 McLuckie 而言,“云原生”一词代表了一种能够**“运行于与特定云服务商细节解耦的云中”**的方式。“因此,我们在 Stacklok 尝试做的很多事情,或多或少就是我们在 Kubernetes 时代所做的事。”

在转向 Agent 基础设施后,Stacklok 构建了 ToolHive——一个用于运行和治理 MCP 服务器的开源平台。它最初是为了管理在桌面 Docker 容器中运行的 MCP 服务器而创建的。Beda 表示,后来团队将其扩展为一个“基于 Kubernetes 的网关以及其他相关服务——包括注册表、用于运行和管理 MCP 服务器的 Operator 辅助工具,以及确保这些组件输入输出认证正确性的机制。”

正如 McLuckie 所说,其目标是让已经运行 Kubernetes 的企业“开始将 Agent 工作负载带入这些环境”。

Beda 称,许多其他 Agent 工具是为个人或小型创业团队设计的,这无法满足企业级公司的需求。

“我们与大型组织交流时,它们正在解决这样的问题:如何将这个原本为一个 6 人团队构建的东西,部署给数千人乃至数万人的工程团队使用。”

MCP 是第一步。下一步是构建 LLM 网关,Stacklok 网站将其称为“AI Gateway”,帮助企业控制访问权限和成本。

McLuckie 表示:“我们的大多数客户是银行、半导体公司、电信企业……也就是在监管相对严格行业中运营的企业。”

AI Gateway 是 Stacklok 唯一尚未开源的主要产品,但 Beda 表示,它“已经在我们的路线图上,我们很快就会实现。”

与 Glean 的解决方案不同,Stacklok 的 AI Gateway 目前不会根据任务选择模型。相反,它专注于访问控制、预算、报告和提供商路由。

McLuckie 解释道:“我们更倾向于让语义路由的模型选择发生在一个在 harness 内进行打磨的智能系统中,因为那里拥有更多上下文。”

既然 ToolHive(MCP 平台)和 Mecatl(harness)都是开源的,Stacklok 的商业模式是什么?

McLuckie 回答称,ToolHive 和 Mecatl 都旨在独立发挥作用,但该公司会在这些开源组件之间提供一致的身份、授权、策略和审计能力。

他说:“我们的商业产品是企业脊柱,是将它们全部连接起来的控制平面。”

Stacklok 调查图表

来自 Stacklok 一项调查,受访者为“520 名负责所在组织使用大语言模型和/或 AI Agent 的领导者”。

Beda 补充说:“对于一个小团队而言,开源项目相对容易启动和运行。但一旦开始将这些能力扩展到多个集群、多个云环境,……就会涌现各种新问题。这正是我们专注于解决的问题。”

Amazon 在 2006 年推出了 S3 和 EC2,标志着云计算时代的开端,但最初这些产品主要由创业公司和个人使用。数年之后,Windows Azure 等企业级解决方案才出现;随后,Kubernetes 于 2014 年到来,用于大规模管理容器化应用。

我们开始看到同样的模式正在 Agent 技术中上演。企业未必希望允许员工定制一个开源 harness,甚至不一定愿意让员工使用运行在个人电脑上的前沿实验室 harness。由两位云原生领域的重要人物打造的 Stacklok,旨在通过将 Agent harness 完全带入云端来解决这些问题。

English / 原文

At a high level, coding agents have a basic architecture: an LLM calls tools in a loop, while carrying forward the required context. Since that’s easiest to implement locally , many coding agents started out as terminal tools and then desktop apps (Claude Code famously began as a CLI tool). But as the open laptop meme illustrates, modern agent harnesses have frustrating limitations if they’re not able to be managed in the cloud.

[software engineers before vs after agents 3:04 AM · May 3, 2026 · 5.09M Views


457 Replies · 1.29K Reposts · 19.7K Likes](https://x.com/cormachayden_/status/2050773588521992642)

Since 2025, both OpenAI and Anthropic have been trying to shift their harnesses more into the cloud — but with varying levels of success. The challenges include keeping sessions reliable, isolating tool execution and preserving context.

This sounds a lot like container orchestration in the early 2010s , from which emerged the open source Kubernetes in 2014. Kubernetes, developed by Google, became the dominant open source system for deploying and managing cloud applications at scale — it kickstarted the “cloud native” era of computing.

Kubernetes uses control loops to keep applications running, recover from failures, and scale when needed. What if coding agents could be managed in the same way?

That’s the bet that two Kubernetes creators, Craig McLuckie and Joe Beda, are making with Stacklok.

Stacklok architecture; diagram via Stacklok

Stacklok raised a $17.5 million Series A back in 2023 from Accel, Madrona and Bain Capital. Initially focused on software supply chain security, the company recently pivoted to Kubernetes-based agentic solutions.

The most interesting product of Stacklok is Mecatl, a “cloud-native harness” begun in June as an open source project on GitHub. At first, I thought the name was pronounced “me-cattle” — a play-on-words referencing the ‘cattle vs. pets’ concept of Kubernetes, where you treat your servers, pods and clusters like cattle rather than pets. But no, the name is actually pronounced “MEH-kah-tl” and is an Aztec word meaning a cord or rope!

In any case, what does cloud-native mean in the context of a harness?

It’s primarily about “moving the locus of value from the desktop to the cloud,” said McLuckie. He’s talking about “value” from an enterprise perspective — that the code and context are often derived from local environments. “That’s where the IP sits,” Beda chimed in. “And if you want to be able to actually bring that under management, it’s that much more difficult when it’s sitting on a desktop.”

McLuckie added that a cloud native approach also allows Stacklok to ask some deeper questions about agentic coding.

“Why is the agent loop so intricately coupled to the tool calling subsystems? Why is agent identity being reasoned about through the lens of human identity systems?”

When it comes to open source agent harnesses, there are already well-regarded solutions — such as Pi , a “minimal agent harness” that projects like Flue have built on top of. We asked the Stacklok pair what makes their harness different?

Beda didn’t mention Pi specifically, but he did say that in desktop-first harnesses, the loop, local execution and session state often begin inside the same process.

“There are a ton of solutions in this space, but they’re all focused to essentially run on the desktop,” he said. “So even if they have pluggability, the architecture is still one process, or one set of tightly coupled processes, that are built to run on the desktop. ”

But can’t enterprises use VMs, containers, or one of many different sandbox products to move their harness to the cloud?

Beda says this “lift and shift” approach tends to create issues around the lifecycle of an agent or being able to quiesce it (safely pause it while it waits for human input).

“Our thinking is, well, what if we rethought the harness from the ground up to actually run in the cloud?”

One of the intriguing approaches of Mecatl is that it keeps the agent loop independent of the client, model provider, state store and execution environment.

“This is an application that we know how to run in the cloud well,” said Beda, regarding the loop application. “What if we take that and we separate that out from the more sensitive operations , like tool calling and bash, and then also separate out things like session management and memory, so that these things are no longer stored as JSONL files sitting on disk, but can natively be put into manageable systems”

A lot of you reading this will probably have very opinionated harnesses, customized for your own requirements. But Mecatl is designed to extend beyond a single-user, local harness into infrastructure that enterprises can operate centrally. Beda likened this to how enterprises manage email.

“We think, in the future, interactions that you have with an agent while you’re working for an enterprise belong to that enterprise; and they’re going to want to manage that and govern that like they do email.”

One of the main motivations of Stacklok is to help large enterprises lessen their dependency on frontier labs and hyperscalers , such as Codex, Claude Code and GitHub Copilot. This, suggested McLuckie, is similar to how Kubernetes helps companies reduce dependency on the big cloud providers.

For McLuckie, the term “cloud native” came to represent a way to “run in a cloud that is decoupled from the specifics of the cloud provider. So a lot of what we’re trying to do [at Stacklok] is more or less what we did in the Kubernetes time.”

After its pivot into agent infrastructure, Stacklok built ToolHive — an open-source platform for running and governing MCP servers. It initially began as a way to manage MCP servers running in Docker containers on the desktop. Then, said Beda, they expanded it into a “Kubernetes-based gateway and other associated services — a registry and an operator helper for running and managing MCP servers and getting some of the input-output auth stuff right with those things.”

The idea, as McLuckie put it, was to enable enterprises that already ran on Kubernetes to “start to bring agentic workloads into those environments.”

Beda claims that many other agent tools were designed for individuals or small startup teams, which doesn’t fly for enterprise-scale companies.

“We talk to larger organizations and they’re struggling with like, how do I take this thing that was built for a team of six people and deploy it for an engineering task force in the thousands or tens of thousands.”

MCP was the first step. Next was building an LLM gateway , or “AI Gateway” as it’s called on the Stacklok’s website, to help companies control access and costs.

“Most of our customers are banks, semiconductor companies, telcos…you know, people operating in relatively regulated industries,” McLuckie said.

The AI Gateway is the one main product Stacklok hasn’t open sourced yet, but Beda says it’s “on our roadmap and we’re going to get there soon.”

Unlike Glean’s solution, Stacklok’s AI Gateway does not currently choose a model based on the task. Instead, it focuses on access control, budgets, reporting and provider routing.

“We prefer to see the semantic-routing model choice happening in an intelligent system that’s honed in the harness , because there’s just more context there,” McLuckie explained.

Since both ToolHive (MCP platform) and Mecatl (the harness) are open source, what’s the business model for Stacklok?

McLuckie replied that ToolHive and Mecatl are both intended to be independently useful, but that the company offers things like consistent identity, authorization, policy and auditing across the open source parts.

“Our commercial product is the enterprise spine , the control plane that ties them all together,” he said.

Froma Stacklok survey of “520 leaders who are responsible for their organization’s use of large language models and/or AI agents.”

“The open source projects are relatively easy to get up and running for a small team,” Beda added. “But once you start scaling these things out to multiple clusters, multiple clouds, [...] all sorts of new problems crop up there. And that’s what we’re focused on solving.”

Amazon introduced S3 and EC2 — the beginnings of the cloud era — in 2006, but at first these products were mainly used by startups and individuals. It took several years for enterprise solutions like Windows Azure to emerge, and then in 2014 Kubernetes arrived to manage containerized applications at scale.

We’re starting to see that same pattern play out with agentic technology. Enterprises don’t necessarily want to allow their employees to customize an open source harness, or even use frontier lab harnesses that run on their personal computers. Stacklok — built by two kings of cloud native — aims to solve those problems by bringing agent harnesses fully to the cloud.