Paper Overview
- Field: Machine Learning
- Authors: Simon Yu, Derek Chong, Ananjan Nandi
- Published: 2025-05-09
- arXiv: 2505.07236
- Functional model for meta-agents: operations performed by meta-agents on target agents are formalized as functions, giving agent orchestration a precise, composable semantics.
- Formal verification: the core operations are mechanized in the Lean theorem prover, providing correctness guarantees for agent manipulation primitives.
- Git-like execution traces: every agent-environment interaction is recorded as a typed event, so any past state can be forked and replayed—time-travel debugging and branching for AI agents.
- Performance: forking the agent process and its filesystem is 5x faster than Docker; replay achieves >95% prompt-cache reuse, significantly cutting LLM inference costs.
Abstract (Original)
> 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 5x faster than Docker, achieving >95% prompt-cache reuse on replay. We demonstrate the model through three applications...