Meet Shepherd: An Open-Source Python Substrate That Lets Meta-Agents Fork, Replay, and Revert Any Agent Run
Shepherd is an open-source Python runtime that records agent executions as a Git-like trace of typed events, allowing users to fork, replay, and revert to any previous state during an agent run. Long-running agents accumulate state like edited files, running processes, and cached data that transcripts do not capture, making it expensive to recover from errors through either patching forward or full restarts. Shepherd addresses this by treating each agent-environment interaction as a commit that covers both the agent process and filesystem together, enabling faster recovery and higher-order agents that can supervise and intervene in other agent runs. The research team reports that Shepherd forks 5 times faster than Docker and achieves over 95 percent prompt-cache reuse on replay, with applications in software engineering, AI infrastructure, quantitative finance, security research, and data engineering.































































































