Shepherd Brings Version Control to AI Agent Oversight
Northeastern and Stanford researchers released Shepherd, an open-source framework where meta-agents intercept, revert and fork rogue AI agent actions like commits in version control. Paper lands at NeurIPS in December 2026.

Why it matters
- Shepherd, an open-source meta-agent framework from Northeastern and Stanford, will be presented at the 2026 NeurIPS conference in December.
- The framework stores every agent action, state and environment as a commit in a graph, letting meta-agents intercept, revert or fork worker agents.
- Three use cases showed results: a supervisor meta-agent lifted a pair coding benchmark pass rate; an optimizer replayed only affected run segments; a trainer forked better paths during reinforcement learning.
- Shepherd is part of the Agent Sciences Research Initiative (ASRI), combining Northeastern, Stanford and UC Berkeley researchers.
- The code is on GitHub now, but the team says it is still moving from alpha to production readiness.
Researchers from Northeastern University and Stanford University have released Shepherd, an open-source framework that lets supervisory AI agents intercept, revert and fork the actions of other AI agents before damage is done. The team will present the accompanying paper at the 2026 NeurIPS conference in December, and the code is already available on GitHub.
The project attacks a problem that has moved from theoretical to operational. AI agents now run semi-autonomously across the internet, and their failures have ranged from deleting an entire email inbox to hacking websites and even launching cyberattacks. As companies deploy agents that act for hours without supervision, the industry lacks a reliable middle layer of oversight between the human operator and the worker agent doing the task.
That gap is exactly what Weiyan Shi, an assistant professor at Northeastern University, set out to close. "They are running potentially for a long time. However, the longer they run, they may have some errors, and they may make some dangerous, unsafe actions. We feel like there should be a middle layer," she says.
The metaphor gives the framework its name. "Worker agents are like the sheep wandering around, and the meta agent is like this shepherd trying to get them back on track," Shi says.
Why does version control apply to agents?
The core idea borrows one of software engineering's oldest and most trusted tools. Version control systems such as GitHub track every change to a codebase over time. Engineers can fork a copy to develop independently, commit to save a new version, review revisions, and roll back when something breaks.
Shepherd applies the same machinery to agent behavior. The framework is built in Python and rooted in functional programming principles. Every agent action gets stored as a commit, alongside the agent's state and its relevant environment, such as an email inbox or a file system. Those commits form a graph, and meta-agents traverse the graph to reach any point in a worker agent's run.
That structure gives the supervisor real power. A meta-agent can observe what a worker is doing, intercept a buggy action, revert the worker to its previous step, or fork it to try a different direction, all without losing the record of what came before. The takeaway: agents stop being black boxes whose mistakes can't be undone, and start looking like code with a commit history you can inspect and rewind.
How does Shepherd stop a bad action before it happens?
The enforcement mechanism is a sandbox. Worker agents believe they're operating in the real world, but their actions pass through a Shepherd-controlled layer first.
"There's a subtlety because it looks to [worker] agents like they're in the regular world where they can do things like send emails. But in actuality, the action of sending the email has been caught by a Shepherd sandbox, so a meta-agent or a human can come in and decide to actually send it," says Derek Chong, a researcher at Stanford University's Natural Language Processing Group and part of the Shepherd team. He describes the sandboxing as a guardrail, or governance component, sitting between the agent and the world.
Humans stay in the loop by design. "If there is a middle layer to help govern these worker agents, then that will help humans have better control," Shi says. "Humans will still, eventually, have a say, and they can intervene with the meta-agent. They can also help steer these meta-agents."
In plain terms: the worker proposes, the meta-agent reviews, and the human can overrule either of them.
What did the three use cases show?
To test whether the approach works in practice, the team built three demonstrations, each targeting a different failure mode of agentic systems.
- Supervision. A supervisor meta-agent intervened when conflict broke out between parallel programming agents. Its interventions lifted the agents' pair coding pass rate on a particular benchmark.
- Optimization. An optimization meta-agent proposed targeted edits to a worker agent's finished workflow, then tested them by replaying only the parts of the run the edits affected, rather than rerunning everything. That improved performance.
- Training. A training meta-agent worked during reinforcement learning, picking the points in a run at which to fork the worker agent onto a better path and rewarding it along the way.
The three cases cover the lifecycle of an agent: fixing failures as they happen, improving finished runs, and shaping behavior while it's still being trained. Together they argue that the same commit-graph substrate supports supervision, optimization and learning.
Who is behind it, and what comes next?
Shepherd is available now as an open-source project, but Chong cautions that the team is still moving it from alpha toward full production readiness. That distinction matters for anyone hoping to drop the framework into a live deployment tomorrow.
The framework is also part of a larger research agenda. Shepherd sits within the Agent Sciences Research Initiative (ASRI), cofounded by Chong and Shi, which brings together researchers from Northeastern, Stanford and UC Berkeley. ASRI's stated goals are making AI agents more reliable and robust, evaluating them better, and ensuring they're safer.
Chong frames the stakes in management terms. "It's becoming more and more clear that agent management is really important," he says. "Agents should be able to inspect other agents and operate on them, just the way that management in real life can happen. We think Shepherd is the way we can build toward that and enable agent management to be democratized. And if you can democratize that, then humans can be empowered to build AI systems that support human flourishing."
The NeurIPS presentation in December will give the work its first broad academic airing, but the open-source release means practitioners don't have to wait. If agent deployments keep growing at their current pace, expect the middle layer to stop being a research curiosity and become standard infrastructure, the same way version control itself did for software teams.
Original: github.com
More from Sophie Lindqvist
Show full bio
Staff writer covering regulation, policy and their impact on artificial intelligence and machine learning at AI In Context.
823 articles