Shepherd: A Runtime Substrate Empowering Meta-Agents with a Formalized Execution Trace

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Yu, Simon, Chong, Derek, Nandi, Ananjan, Soylu, Dilara, Sun, Jiuding, Manning, Christopher D, Shi, Weiyan
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913161718792192
author Yu, Simon
Chong, Derek
Nandi, Ananjan
Soylu, Dilara
Sun, Jiuding
Manning, Christopher D
Shi, Weiyan
author_facet Yu, Simon
Chong, Derek
Nandi, Ananjan
Soylu, Dilara
Sun, Jiuding
Manning, Christopher D
Shi, Weiyan
contents As LLM agent systems take on more complex tasks, they increasingly rely on meta-agents: higher-order agents that operate on other agents, much as managers supervise employees. Whatever a meta-agent does: coordinating agents, halting risky actions before execution, or repairing failed runs, requires manipulation of agentic execution at runtime. Existing agentic substrates make this hard: they give meta-agents only plain transcripts and environment snapshots, requiring it to build it's own tooling to reconstruct and orchestrate 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 inspect and transform. Every model call, tool call, and environment change becomes a structured event in a Git-like execution trace, where any past state can be forked 5x faster than docker commit and replayed. Three example use cases show Shepherd's versatility: (1) a supervisor agent prevents conflicts among parallel coding agents, lifting CooperBench performance from 28.8% to 54.7%; (2) a counterfactual optimizer repairs agent workflows by proposing edits and replaying runs from the point of changed behavior, outperforming MetaHarness on TerminalBench-2 with 58% lower wall-clock; (3) a meta-agent picks fork points during rollouts to improve credit assignment in long-horizon agentic RL, doubling GRPO's gains on TerminalBench-2. We open-source Shepherd to empower future meta-agents with principled and efficient operations over agentic execution.
format Preprint
id arxiv_https___arxiv_org_abs_2605_10913
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Shepherd: A Runtime Substrate Empowering Meta-Agents with a Formalized Execution Trace
Yu, Simon
Chong, Derek
Nandi, Ananjan
Soylu, Dilara
Sun, Jiuding
Manning, Christopher D
Shi, Weiyan
Artificial Intelligence
Programming Languages
Software Engineering
As LLM agent systems take on more complex tasks, they increasingly rely on meta-agents: higher-order agents that operate on other agents, much as managers supervise employees. Whatever a meta-agent does: coordinating agents, halting risky actions before execution, or repairing failed runs, requires manipulation of agentic execution at runtime. Existing agentic substrates make this hard: they give meta-agents only plain transcripts and environment snapshots, requiring it to build it's own tooling to reconstruct and orchestrate 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 inspect and transform. Every model call, tool call, and environment change becomes a structured event in a Git-like execution trace, where any past state can be forked 5x faster than docker commit and replayed. Three example use cases show Shepherd's versatility: (1) a supervisor agent prevents conflicts among parallel coding agents, lifting CooperBench performance from 28.8% to 54.7%; (2) a counterfactual optimizer repairs agent workflows by proposing edits and replaying runs from the point of changed behavior, outperforming MetaHarness on TerminalBench-2 with 58% lower wall-clock; (3) a meta-agent picks fork points during rollouts to improve credit assignment in long-horizon agentic RL, doubling GRPO's gains on TerminalBench-2. We open-source Shepherd to empower future meta-agents with principled and efficient operations over agentic execution.
title Shepherd: A Runtime Substrate Empowering Meta-Agents with a Formalized Execution Trace
topic Artificial Intelligence
Programming Languages
Software Engineering
url https://arxiv.org/abs/2605.10913