explaingit

shepherd-agents/shepherd

Analysis updated 2026-08-13

2,290PythonAudience · developerComplexity · 4/5Setup · moderate

TLDR

A framework that runs AI agents as reviewable, reversible proposals, with function signatures defining exactly what each agent can read or write.

Mindmap

mindmap
  root((Shepherd))
    What it does
      Reversible agent execution traces
      Reviewable proposals before applying
      Permission grants in function signatures
    Tech stack
      Python
      Claude CLI integration
      OS level sandboxing
    Use cases
      Run agents safely before trusting output
      Supervise and replay agent runs
      Build meta-agents that train other agents
    Audience
      Developers
      Researchers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Run an AI coding agent and review its proposed changes before applying them

USE CASE 2

Grant an agent read-only or read-write access to specific repositories only

USE CASE 3

Replay or fork a past agent run from its recorded execution trace

USE CASE 4

Try the framework offline with a deterministic provider, no API key needed

What is it built with?

PythonClaude CLILandlockSeatbelt

How does it compare?

shepherd-agents/shepherdamap-cvlab/abot-worldaminblg/simpleenglish
Stars2,2902,2952,280
LanguagePythonPythonPython
Setup difficultymoderatehardeasy
Complexity4/55/51/5
Audiencedeveloperresearcherdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Live agent runs need the Claude CLI with a subscription or API key, an offline mode needs neither.

In plain English

Shepherd is a framework for running AI agents in a way that can be inspected, undone, and reviewed before anything actually changes your files. When an agent completes a task, its work is not written directly into your project. Instead it comes back as a proposal that sits to one side, which you can look at, run, and only apply to your real files once you have decided you actually want it. The core idea is that a task is written as a plain Python function with no body at all. Its name, its parameters, and its docstring describe what the agent should do, and those parameters also define exactly what the agent is allowed to touch. For example, marking a parameter as a writable repository handle grants the agent permission to write to that specific location, while marking it read only means any attempt by the agent to write there is blocked at the operating system level, on both macOS and Linux. This means you can read a task's function signature and know precisely what it is and is not permitted to do, before it ever runs. Every agent run is recorded as a durable trace, so its outputs can be selected and merged in, applied on top of a workspace that has since changed, or discarded entirely, with the record kept either way. Shepherd includes an offline quickstart that needs no API key and runs the same underlying machinery using a deterministic built in provider instead of a real AI model, useful for trying the system out. There is also a live quickstart that uses the Claude command line tool, which requires either a Claude subscription or an Anthropic API key. The project describes itself as being built specifically so that meta-agents, meaning higher level agents, can supervise, optimize, and train other agents by observing, forking, and replaying their execution. It is installed with pip, requires Python 3.11 or newer, and the README states plainly that it is in early alpha with APIs that may still change between releases. Windows is not supported directly, and the documentation recommends using WSL instead.

Copy-paste prompts

Prompt 1
Install shepherd-ai from pip and run the offline quickstart from https://github.com/shepherd-agents/shepherd
Prompt 2
Using Shepherd, write a task function that grants an agent write access to only one repository
Prompt 3
Explain how Shepherd's read-only permission grants are enforced at the operating system level
Prompt 4
Show me how to select, apply, or discard a Shepherd agent run after reviewing its output

Frequently asked questions

What is shepherd?

A framework that runs AI agents as reviewable, reversible proposals, with function signatures defining exactly what each agent can read or write.

What language is shepherd written in?

Mainly Python. The stack also includes Python, Claude CLI, Landlock.

How hard is shepherd to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is shepherd for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.