使用开源执行框架构建长时间运行的智能体
[
[

](https://x.com/Sumanth_077)
](https://x.com/Sumanth_077)

Build a Long-Running Agent With an Open Source Harness
使用开源执行框架构建长时间运行的智能体
Sam Altman recently wrote one line that captures where agent engineering is heading: “also, a reason to favor open-source harnesses.”
Sam Altman最近写了一句话,概括了智能体工程的发展方向:“此外,这也是倾向于使用开源运行框架的一个理由。”
https://x.com/i/web/status/2077053226080436235
https://x.com/i/web/status/2077053226080436235
Most of the attention in AI still goes to the model. Which model reasons better, which one writes better code, how large the context window is, or how well it performs on a benchmark. But once you ask an agent to work for several minutes, search across sources, execute code, delegate work, and take dozens of steps, the model is only one part of what keeps the task running.
AI 领域的大部分注意力仍然集中在模型上。哪个模型推理能力更强,哪个模型写代码更好,上下文窗口有多大,或者在基准测试中表现如何。但一旦你让一个 agent 工作几分钟,跨多个来源搜索,执行代码,委派任务,并执行数十个步骤,模型就只是维持任务运行的其中一个部分。
A raw model has no persistent execution loop. It doesn’t automatically know how to call tools, decide what context to keep, isolate code execution, recover from a dropped connection, or pause before a sensitive action. All of that comes from the runtime around it.
原始模型没有持久的执行循环。它不会自动知道如何调用工具、决定保留哪些上下文、隔离代码执行、从断开的连接中恢复,或在敏感操作前暂停。所有这些都来自于它周围的运行时环境。
That runtime is the agent harness.
该运行环境就是智能体运行框架。
In this article, we’ll break down how a long-running agent actually executes by following a web research agent through the entire run: the model loop, MCP, skills, sandbox execution, subagents, context compaction, approval checkpoints, and the event stream that keeps the session durable.
在本文中,我们将通过跟踪一个 Web 研究智能体的整个运行过程,来剖析一个长时间运行的智能体实际上是如何执行的:模型循环、MCP、技能、沙箱执行、子智能体、上下文压缩、审批检查点,以及保持会话持久化的事件流。
What an agent is actually made of
智能体实际上是由什么构成的

A language model by itself is stateless between API calls. You send it some context, it produces an output, and the call ends. It has no built-in concept of a task that needs to keep running across twenty or fifty separate steps.
语言模型本身在 AP...