Shepherd: A Runtime Substrate Empowering Meta-Agents with a Formalized Execution Trace
Simon Yu, Derek Chong, Ananjan Nandi, Dilara Soylu, Jiuding Sun, Christopher D Manning, Weiyan Shi

TL;DR
Shepherd is a formalized runtime system for meta-agents that records interactions as typed events, enabling fast forking, replay, and application in various AI tasks, with open-source availability.
Contribution
The paper introduces Shepherd, a novel functional programming model with a typed event trace system, enabling efficient agent process forking and replay for meta-agent research.
Findings
Shepherd achieves 5× faster forking than Docker.
In runtime intervention, pass rates increased from 28.8% to 54.7%.
Counterfactual meta-optimization outperformed baselines by up to 11 points.
Abstract
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 faster than Docker, achieving 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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
