We introduce Shepherd, a functional programming model that formalizes meta-agent operations on target agents as functions, with core operations mechanized in Lean. Shepherd records every agent-environment interaction as a typed event in a Git-like execution trace, enabling any past state to be forked and replayed. The system forks the agent process and its filesystem $5\times$ faster than Docker, achieving $>95\%$ prompt-cache reuse on replay. We demonstrate the model through three applications. First, in runtime intervention, a live supervisor increases pair coding pass rates from 28.8% to 54.7% on CooperBench. Second, in counterfactual meta-optimization, branching exploration outperforms baselines across four benchmarks by up to 11 points while reducing wall-clock time by up to 58%. Third, in Tree-RL training, forking rollouts at selected turns improves TerminalBench-2 performance from 34.2% to 39.4%. These results establish Shepherd as an efficient infrastructure for programming meta-agents. We open-source the system to support future research.


翻译:我们提出Shepherd,一种函数式编程模型,它将作用于目标代理的元代理操作形式化为函数,并在Lean中实现了核心操作的机械化。Shepherd将每次代理与环境的交互记录为类似Git的执行轨迹中的类型化事件,从而允许对任意历史状态进行分支与重放。该系统对代理进程及其文件系统的分支速度比Docker快5倍,重放时提示缓存复用率超过95%。我们通过三个应用展示了该模型。第一,在运行时干预中,实时监督器将CooperBench上结对编码的通过率从28.8%提升至54.7%。第二,在反事实元优化中,分支探索在四个基准测试上的表现优于基线方法最高达11个百分点,同时将实际运行时间缩减最高达58%。第三,在Tree-RL训练中,在选定回合进行分支展开使TerminalBench-2性能从34.2%提升至39.4%。这些结果确立了Shepherd作为高效编程元代理的基础设施。我们已开源该系统以支持未来研究。

0
下载
关闭预览

相关内容

Al Agent:AI时代的软件革命
专知会员服务
48+阅读 · 2025年5月13日
AI Agent,大模型时代重要落地方向, 42页ppt
专知会员服务
291+阅读 · 2023年10月12日
【ICML2022】Transformer是元强化学习器
专知会员服务
56+阅读 · 2022年6月15日
八个不容错过的 GitHub Copilot 功能!
CSDN
11+阅读 · 2022年9月22日
TheFatRat 一款简易后门工具
黑白之道
36+阅读 · 2019年10月23日
预知未来——Gluon 时间序列工具包(GluonTS)
ApacheMXNet
24+阅读 · 2019年6月25日
用PyTorch实现各种GANs(附论文和代码地址)
资源 | Github项目:斯坦福大学CS-224n课程中深度NLP模型的PyTorch实现
黑龙江大学自然语言处理实验室
10+阅读 · 2017年11月13日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
4+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
7+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
4+阅读 · 6月17日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员