Shepherd: Enabling Programmable Meta-Agents via Reversible Agentic Execution Traces
About
As LLM agent systems take on more complex tasks, they increasingly rely on meta-agents: higher-order agents that create, operate on and manage other agents. Meta-agent operations such as coordinating agents, halting risky actions before execution, or repairing failed runs, require runtime manipulation of agentic execution. Yet existing agentic substrates make this difficult: they expose only transcripts and environment snapshots, forcing meta-agents to build ad hoc tooling to reconstruct and operate over full execution state. Therefore, we introduce Shepherd, a Python substrate grounded in functional programming principles, where an agent's execution is itself a first-class object that a meta-agent can easily inspect and transform. Every model action, tool call, and environment change becomes a structured event in a reversible, Git-like execution trace, where any past state can be reverted 5x faster than docker commit and fork. Three example use cases show Shepherd's versatility: (1) a supervisor meta-agent prevents conflicts among parallel coding agents, lifting pair-coding pass rate from 28.8% to 54.7% on CooperBench; (2) a counterfactual optimization meta-agent repairs agent workflows by proposing edits and replaying runs from the point of changed behavior, outperforming MetaHarness on Terminal-Bench 2.0 by 12.8% with 58% lower wall-clock; (3) a training meta-agent picks fork points during rollouts to improve credit assignment in long-horizon agentic RL, doubling GRPO's uplift on Terminal-Bench 2.0. We open-source Shepherd to enable principled and efficient operations over agentic execution for both users and meta-agents.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Mathematical Problem Solving | MATH (test) | -- | 45 | |
| Code Generation | LiveCodeBench (test) | Pass@1 Overall51 | 42 | |
| Instruction Following | IFBench (test) | Score51.3 | 36 | |
| Agentic Terminal Tasks | Terminal-Bench out-of-distribution 2.0 (test) | Avg@539.4 | 6 | |
| Multi-hop Claim Verification | HoVer (test) | Accuracy (Test)79.4 | 4 | |
| Terminal Task Execution | TerminalBench 2.0 (test) | Test Accuracy35.2 | 4 |