NeurIPS 2026QuestionsPapersAreasAboutMarkdown

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

NeurIPS page · OpenReview · Open on the map

Category: LLM Agents, Evals & Benchmarks › Agent Orchestration and Meta-Reasoning · Type: new method · Keywords: meta-agents, execution trace, functional programming, forking and replay, runtime substrate, LLM agents

Areas: Code & Coding Agents › Code Verification › Software engineering agents; AI Agents › Agentic Decision Making › Evolutionary Search

Summary

Shepherd is a runtime substrate that formalizes meta-agent operations on agents as functions in a Git-like execution trace, enabling fast forking, replay, and live interventions.

Explained to a 5-year-old

A boss can watch what workers do and copy their work to try new things. This system lets a manager look at what an AI agent does step by step. If something goes wrong, they can start over quickly. It helps the manager test new ideas without starting from scratch. This makes it easier to improve how the AI works.

Explained to a 5-year-old, longer

Imagine a team of smart robots that can help you do things, like writing code or answering questions. Sometimes you want a higher-level robot, called a meta-agent, to watch what the first robots are doing. The new system records every tiny action the robot takes, like a video of what happened. This record is kept in a special way that works like a photo album where you can copy any page and start a new album from it. Because of this, a manager can look back at any moment and see exactly what the robot did. If the manager thinks the robot made a mistake, they can quickly start a new copy of the robot from that moment. This copying is super fast, so you don’t have to wait a long time to try a new plan. The manager can also try many different plans at the same time, like branching out like a tree, to see which works best. This helps the manager improve the robot’s performance without having to train it from the very beginning. The system also lets the manager step in while the robot is still running, fixing problems on the fly. All of these ideas are put together in a tool that is easy to share and use for other researchers. In short, it gives a boss-like robot the power to watch, copy, and improve the work of other robots.

For a technical reader

Shepherd provides a functional programming model that encodes meta-agent operations as pure functions, with core logic verified in Lean. It maintains a Git-style event log of every agent-environment interaction, enabling cheap snapshots and deterministic replays. The runtime forks both the agent process and its filesystem, achieving a 5× speedup over Docker and preserving prompt caches for efficient replay. This design supports live supervision, counterfactual exploration, and branch-and-bound reinforcement learning, as demonstrated across multiple benchmarks.

Problem

Current agentic runtimes provide only static snapshots of execution, which prevents meta-agents from performing live interventions or analyzing past behavior. This limits the ability to supervise, debug, or optimize agents after they have started running.

Method

The approach defines a functional programming model where meta-agent operations are expressed as functions, with core operations mechanized in Lean. It records each agent-environment interaction as a typed event in a Git-like execution trace, allowing any past state to be forked and replayed efficiently. The system forks the agent process and its filesystem, achieving fast forking and high prompt-cache reuse during replay.

Results

The approach achieves a live supervisor that raises pair-coding pass rate from 28.8% to 54.7% on CooperBench, improves meta-optimization by up to 11 points with 58% less wall-clock time versus MetaHarness and GEPA, and boosts Tree-RL performance from 34.2% to 39.4% on TerminalBench-2.

Contributions

It introduces a functional programming model with a formal execution trace that enables cheap forking and replay of agent runs, and mechanizes core operations in Lean. The paper demonstrates its utility through three use cases-runtime intervention, counterfactual meta-optimization, and Tree-RL training-showing significant performance gains.

Practical relevance

By providing a fast, traceable substrate, Shepherd enables developers and researchers to build powerful meta-agents that can supervise, debug, and optimize LLM agents in real time, accelerating progress in agentic AI.

Research questions this paper is counted under

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction