Exo:从运行时自改进研究,到Agent托管基础设施

Exo: Self-Improving Harnesses and Runtime Boundaries

Tech-News #Exo#Agent#Harness#自改进#Braintrust#开源
更新于
🇨🇳 中文

Exo把Agent的运行基础设施与决策策略分开:基础层保存历史、管理沙箱和凭证,harness决定怎样组织上下文、调用模型与使用工具。研究里的自改进Agent可以在工作过程中修改这些策略代码,再请求切换到新版本。

你提到的项目对应exoharness/exo。相关论文作者来自加州大学伯克利分校、a16z与Braintrust,代码采用MIT许可。它与同名的多机本地模型推理项目exo-explore/exo是不同项目。

核对日期:2026年11月30日;源码提交:961f6bb6be6948caf729907b6991764c724b5d5f。当前主线强调托管多种harness的运行时;早期自改进Agent位于examples/self-improving-agent。我们阅读论文和源码,完成两组共10项本地单元检查;未执行真实模型、沙箱部署、自重启或论文基准。

代码:https://github.com/exoharness/exo/tree/961f6bb6be6948caf729907b6991764c724b5d5f 当前文档:https://exoharness.ai/docs 论文:https://arxiv.org/abs/2611.00463

自改进,具体改的是哪一层?

研究对象是模型外面的可编程策略:提示如何拼接、哪些历史保留在上下文、常见动作怎样封装为工具,以及什么时候尝试进一步优化。模型权重保持不变。

例如,Agent发现每次都让模型重复下达几步相同操作,就把它们写成一个可复用过程;发现上下文里混入大量无关输出,就改写上下文组装代码。这些改变成为可查看的代码差异,之后的工作继续使用它们。

论文把它分成可编辑策略与受保护机制。历史以追加方式记录,状态保留恢复依据;新策略的启用交给独立guardian。论文默认guardian检查构建是否成功,这能拦住一部分坏修改,但编译通过并不证明业务正确,更不保证下一版一定更省钱。

小M修改可替换策略模块,历史与激活门禁留在受保护机制层

当前仓库,和早期论文示例有什么区别?

README明确指出,早期自改进harness已作为示例保留,旧API文档进入Archive。当前产品思路是让Codex、Claude Code、Pi或自定义harness共享持久线程、事件、工作环境与凭证管理,通过API托管。

你可以用Markdown定义Agent的harness、模型与指令;基础设施保存身份和执行记录,harness负责具体的模型循环。这里的价值是减少每换一种harness就重搭一套托管基础设施,而不是自动替所有harness实现同一种上下文策略。

同时,仓库首页仍标注文档与部分功能正在建设。当前计划列表包含技能、记忆存储、部分工具模块加载和沙箱快照等工作。早期示例里的某个能力,不能直接当成当前主线统一配置已完整支持。

当前架构:https://github.com/exoharness/exo/blob/961f6bb6be6948caf729907b6991764c724b5d5f/website/docs-src/architecture/harnesses.md 示例位置:https://github.com/exoharness/exo/tree/961f6bb6be6948caf729907b6991764c724b5d5f/examples/self-improving-agent

保留历史,能否保证中断后续跑?

不能把这两件事合并。客户端断开后,线程与事件可以保留;服务重启时,当前那一轮能否恢复,还依赖各harness的实现和工具结果能否确定。

当前文档描述的路径中断恢复边界
Codex优先重连原生turn;必要时恢复或重建线程,但未知工具结果会导致恢复失败
Claude Code、Pi中断turn目前按失败结束,可在同一thread开始新turn
自定义TypeScript harness需实现resumeTurn,并在确能判断结果时协调未决工具调用

Fork一段历史也不等于把外部世界倒回去。已发邮件、已修改的远程系统,以及沙箱文件系统状态,都需要独立处理。重复执行结果未知的工具,可能造成重复副作用;持久日志帮助判断发生了什么,不会自动消除这个问题。

数据模型:https://github.com/exoharness/exo/blob/961f6bb6be6948caf729907b6991764c724b5d5f/website/docs-src/architecture/data-model.md

小M保留同一份历史,分别检查不同harness能否恢复未完成动作,而不是直接重放

沙箱和凭证代理保护到哪里?

当前设计通过vault和代理,把沙箱中的凭证占位符替换为授权目标所需的真实值;目的地、端口与网络策略需要匹配。它降低直接把密钥交给沙箱进程的需要,但仍要检查实际后端与配置。

文档特别说明,TypeScript harness和工具模块在宿主进程里作为受信代码运行。沙箱出网策略约束沙箱进程,不会自动限制任意宿主模块或客户端的网络访问。加载一个模块,是给它相应宿主信任,不只是添加一条工具描述。

还要注意global vault的共享范围:在启用认证的服务器上,它是服务器级共享凭证集合;私人集成不应被误放进所有获准用户都能继承的位置。自托管也只说明你控制一部分运行与存储,不能单凭这个词认定模型供应商不会接收请求或保存数据。

凭证边界:https://github.com/exoharness/exo/blob/961f6bb6be6948caf729907b6991764c724b5d5f/website/docs-src/architecture/vaults.md 网络代理:https://github.com/exoharness/exo/blob/961f6bb6be6948caf729907b6991764c724b5d5f/docs/egress.md

论文的省钱结果,适用于所有任务吗?

作者在RuneScape长任务中比较Exo、Codex与Pi,报告独立运行的完成成本降低12%—53%,迁移运行降低45%—82%。迁移实验会保留先前经验,Exo还带着已经学到的策略,因此要和从零开始的运行分开看。

以战斗目标为例,论文报告Exo独立运行花费3.71美元,Codex为7.26美元,Pi为7.95美元。这是该实验按统一token定价计算的模型成本,不是任意部署的总拥有成本,也不是我们的账单实测。

论文也给出反例:重复利用较少的任务中,Exo的平均成本是每个quest point 0.28美元,对照Codex为0.24美元、Pi为0.21美元。自改进先花成本构建流程,如果后续没有足够多相似工作来摊薄这笔投入,就可能更贵。

AppWorld、SREGym等实验还使用了“相同初始策略、禁止自改”的对照,评估口径与游戏中的跨harness比较不同。不能把每个百分比都归纳成通用的“比Codex省八成”。

Mycelium Protocol更愿意把它理解为可观察的流程优化:记录改了什么、花了多少、是否通过任务验收,再决定复用。收益来自具体策略与工作负载的匹配,而不是“允许自改”这个开关本身。

小M比较重复任务摊薄学习成本和一次性任务难以回本两种路径

本地实际检查了什么?

我们在固定源码上运行两份原始Vitest测试:Codex用量事件累计与guardian工具定义,共10项通过。它们使用合成token事件和工具注册对象,检查去重、缺失计价、重建理由及暴露的工具定义;没有真正调用模型或重启服务。

起初尝试的另外两组恢复与MCP批准测试未能加载,因为隔离环境缺少模型SDK;补充依赖时又遇到Lingua与Anthropic SDK的peer版本冲突。它们未计入通过,也没有通过替换实现或绕过依赖规则伪装成已验证。

因此,这里没有完成Rust全量构建、真实工具恢复、凭证代理、VM隔离、自修改激活或成本基准验收。适合先做的试点,是用测试凭证托管一个低风险重复任务,检查历史、失败边界与结果,再评估是否要引入自改进示例。

原测试目录:https://github.com/exoharness/exo/tree/961f6bb6be6948caf729907b6991764c724b5d5f/exoharness/typescript/codex 功能计划:https://github.com/exoharness/exo/blob/961f6bb6be6948caf729907b6991764c724b5d5f/website/docs-src/agent-definition.md 相关harness接口阅读:https://blog.mushroom.cv/blog/harnessrouter-uhp-unified-agent-protocol-self-hosted-codex-claude-code/

常见问题

Exo是在继续训练模型吗?

这里的自改进研究修改harness代码、工具与上下文策略,模型权重保持不变。当前主线则提供这些harness可共享的运行基础设施。

安装当前主线就等于获得论文里的省钱比例吗?

不等于。论文使用指定任务、模型与计价方法,包含学习成本和迁移设置。当前源码还在演进,必须按具体版本与自己的任务复测。

持久历史是否保证每次中断都能无损恢复?

不保证。harness能力、原生进程状态与未决工具结果都会影响恢复;外部副作用也不能靠回滚会话记录撤销。


© 2026 Author: Mycelium Protocol. 本文采用 CC BY 4.0 授权——欢迎转载和引用,须注明作者姓名及原文链接,不得去除署名后以原创发布。

🇬🇧 English

Exo separates agent infrastructure from decision policy. A protected runtime manages durable history, sandboxes and credentials, while a harness decides how to build context, call models and use tools. The research agent can edit that policy during ongoing work and request activation of a revised implementation.

The project is exoharness/exo. The associated paper has authors affiliated with UC Berkeley, a16z and Braintrust. The repository uses MIT. It is distinct from the similarly named distributed-inference project exo-explore/exo.

We checked commit 961f6bb6be6948caf729907b6991764c724b5d5f on November 30, 2026. Current main emphasizes hosting multiple harnesses; the earlier self-improving agent lives in examples/self-improving-agent. Two original local unit suites passed 10 checks. No live models, sandbox deployment, self-restart or paper benchmarks were run.

Source: https://github.com/exoharness/exo/tree/961f6bb6be6948caf729907b6991764c724b5d5f Current docs: https://exoharness.ai/docs Paper: https://arxiv.org/abs/2611.00463

What does the research agent improve?

It edits programmable policy around the model: prompt assembly, retained context, reusable action procedures and the strategy for further improvement. Model weights remain fixed.

Repeated model-directed actions can become a reusable tool; irrelevant output can be removed by revising context assembly. These are inspectable code changes rather than an unexplained change to model parameters.

The paper separates editable policy from protected mechanisms. Canonical history is append-only and recovery evidence is retained. A guardian outside the editable policy controls activation. The default guardian checks build success, which does not establish business correctness or guarantee that the next policy is cheaper.

Little M edits replaceable policy modules while history and activation remain protected

How does current main differ from the earlier example?

The README places earlier self-improving harness work in an example and older API docs in Archive. Current infrastructure hosts Codex, Claude Code, Pi or custom harnesses behind durable threads, events, working environments and credential management.

A Markdown definition selects a harness, model and instructions. Infrastructure owns identity and records; the harness owns the model loop. The goal is to avoid rebuilding hosting infrastructure for every harness, while retaining their different semantics.

The project explicitly remains under construction. Its planned work includes skills, a memory store, parts of tool-module loading and sandbox snapshots. A capability in the earlier example is not automatically a complete, uniform configuration feature in current main.

Architecture: https://github.com/exoharness/exo/blob/961f6bb6be6948caf729907b6991764c724b5d5f/website/docs-src/architecture/harnesses.md Earlier example: https://github.com/exoharness/exo/tree/961f6bb6be6948caf729907b6991764c724b5d5f/examples/self-improving-agent

Does durable history guarantee interrupted-turn recovery?

No. Client disconnection can preserve the thread and events. Resuming a turn after a service restart additionally depends on the harness and whether tool outcomes are known.

Current documented pathRecovery boundary
CodexReconnect to the native turn or recover/rebuild its thread; unknown tool outcomes can fail recovery
Claude Code and PiInterrupted turns currently fail; a new turn can start on the same thread
Custom TypeScript harnessImplement resumeTurn and reconcile unresolved calls only when their outcomes can be established

Forking history does not roll back external systems or automatically restore the sandbox filesystem to that event. Replaying an uncertain operation can duplicate its effects. Durable records help determine what happened; they do not make every operation idempotent.

Data model: https://github.com/exoharness/exo/blob/961f6bb6be6948caf729907b6991764c724b5d5f/website/docs-src/architecture/data-model.md

Little M keeps history but checks separate harness recovery paths before replaying unresolved work

Where do sandbox and credential protections end?

Vaults and the credential proxy replace sandbox placeholders with real values on authorized requests. Destinations, ports and network policies matter, along with the chosen backend.

TypeScript harness and tool modules run as trusted code in the host process. Sandbox egress policies constrain sandbox processes, not arbitrary host modules or the client’s networking. Loading a module grants host-side trust beyond a tool description.

On an authenticated server, the global vault is shared server-wide with admitted users. Keep private integration credentials in appropriately scoped vaults. Self-hosting controls part of execution and storage; it does not establish what an external model provider receives or retains.

Vaults: https://github.com/exoharness/exo/blob/961f6bb6be6948caf729907b6991764c724b5d5f/website/docs-src/architecture/vaults.md Egress: https://github.com/exoharness/exo/blob/961f6bb6be6948caf729907b6991764c724b5d5f/docs/egress.md

When does self-improvement repay its cost?

In long RuneScape objectives, the authors report 12–53% lower model completion cost in standalone runs and 45–82% lower cost in transfer runs compared with Codex and Pi. Transfer retains previous experience, including Exo’s learned policy, and is distinct from starting fresh.

For one combat objective, reported standalone model costs are $3.71 for Exo, $7.26 for Codex and $7.95 for Pi. These use common token pricing in that experiment, not total deployment cost or our measured bills.

The paper also reports a negative example. Less reusable quest work costs Exo an average $0.28 per quest point, versus $0.24 for Codex and $0.21 for Pi. Investing in reusable procedures can cost more when subsequent work does not reuse them enough.

AppWorld and SREGym use another comparison: the same initial policy without self-editing. Their percentages should not be collapsed into a universal claim of savings against Codex. Mycelium Protocol treats this as observable workflow optimization: track edits, costs and accepted outcomes before deciding whether to reuse a policy.

Little M compares repeated work amortizing a learning investment with one-off work that may not repay it

What did our local checks cover?

We ran two original Vitest files for Codex usage-event accumulation and guardian tool definitions: 10 checks passed. Synthetic token events and registry objects cover deduplication, missing pricing, rebuild reasons and the exposed tool definition. No live model call or service restart occurred.

Two additional attempted suites for recovery and MCP approval failed to load because model SDK dependencies were absent from the isolated environment. Adding dependencies encountered a Lingua/Anthropic SDK peer-version conflict. Those suites are not counted as passing; implementations were not replaced to hide the gap.

We did not complete a full Rust build, native tool recovery, credential-proxy or VM validation, self-edit activation or a cost benchmark. A sensible pilot is a low-risk repeated task with test credentials, checking history, failure boundaries and accepted results before evaluating the self-improving example.

Tests: https://github.com/exoharness/exo/tree/961f6bb6be6948caf729907b6991764c724b5d5f/exoharness/typescript/codex Planned features: https://github.com/exoharness/exo/blob/961f6bb6be6948caf729907b6991764c724b5d5f/website/docs-src/agent-definition.md Related harness interfaces: https://blog.mushroom.cv/blog/harnessrouter-uhp-unified-agent-protocol-self-hosted-codex-claude-code/

FAQ

Does this train the model further?

The self-improvement research edits harness code, tools and context policy while holding model weights fixed. Current main supplies shared runtime infrastructure for harnesses.

Does installing current main guarantee the paper’s savings?

No. The experiments use specified workloads, models and pricing, with learning and transfer conditions. Evaluate the exact version on your task.

Does persistent history guarantee lossless recovery?

No. Harness support, native-process state and unresolved tool outcomes affect recovery. External side effects cannot be undone by rolling back conversation history.


© 2026 Author: Mycelium Protocol. Licensed under CC BY 4.0 — free to share and adapt with attribution. You must credit the author and link to the original; removing attribution and republishing as original is not permitted.

💬 评论与讨论

使用 GitHub 账号登录后发表评论

关于本站 · 免责声明

🍄 Mushroom Research Blog 是非营利、免费公开的个人科技观察博客与公众号 XStack18,不接受商业合作、不代表任何企业或机构立场,也不谋求商业利益。我们以个人视角客观中立地记录和分析 AI、Web3 等领域的最新模型发布与技术动态——不止转述新闻标题或二手信息,而是给出有独立思考的深入分析,希望帮更多人获得有价值的一手科技认知。

⚠️ 文中介绍的开源代码与模型,仅供学习交流与技术借鉴。它们大多仍处于早期阶段,有待进一步研究和验证,请勿直接用于工作或生产环境;如需采用,请先自行充分测试,并核实其许可证与安全性。
Open-source code and models featured here are shared for learning and reference only. Most are early-stage and still need further study and verification — please don't use them directly in your work or in production. Test them thoroughly and check their licenses and security first.

  1. 本站文章均为作者基于公开信息的个人研究与观点整理,不代表文中提及的任何公司、产品、模型的官方立场,未与其构成商业关联或合作关系。
  2. 科技行业信息更新极快,我们尽力保证内容准确、及时,但不对完整性、实时性做绝对保证,具体请以相关企业/项目官方公告为准。
  3. 文中引用的第三方商标、产品名称、图片、数据等版权归原权利人所有,我们会尽量注明来源;如你认为存在版权疑问或侵权,请通过下方邮箱联系我们,收到通知后会尽快核实处理(更正、加注来源或删除)。
  4. 文章内容仅为技术科普与个人观点,不构成投资、法律或其他专业建议,据此进行任何决策的后果需自行判断和承担。

📮 侵权 / 勘误 / 合作咨询:[email protected]