[!IMPORTANT] Shepherd is in early alpha and under active development. APIs may still change between releases. Feedback and issues are very welcome!
Install | Quickstart | Examples | Docs | Citation
Shepherd is a runtime substrate for agent work that needs inspection, reversibility, and supervision. It records agent runs as durable, inspectable execution traces, with retained workspace outputs that can be reviewed before they are selected, released, or discarded.
Installation
pip install shepherd-ai
Working on Shepherd itself? Install the local editable closure instead:
python -m venv .venv && . .venv/bin/activate && pip install -r requirements-dev.txt
(see CONTRIBUTING.md).
Quickstart
Shepherd is an agent framework: a task's implementation can be a sandboxed agent, and its work comes back as a reviewable proposal — nothing touches your files until you accept it. Here the whole body of a task is a Claude agent.
Needs the
claudeCLI — signed in (a Claude subscription works) or with anANTHROPIC_API_KEY. Neither? Jump to the Offline Quickstart — it runs anywhere, keyless.
A task is a plain Python function with no body; the signature and docstring are the contract the agent fulfils at runtime:
def write_program(repo, prompt: str, output_path: str = "program.py") -> None:
"""Write a small, self-contained Python program that does what `prompt` asks.
Save it to output_path. It must run with plain `python3`, read no input,
and finish on its own within about ten seconds.
"""
Set up a scratch workspace and check the agent lane is ready:
mkdir /tmp/agent-task && cd /tmp/agent-task
shepherd init # turn this directory into a Shepherd workspace
shepherd doctor claude # confirm claude CLI, sign-in/key, and sandbox are ready
Fetch the demo and let the agent work (about a minute):
shepherd demo write agent-task > agent_task.py
python agent_task.py
The agent writes donut.py — but not into your directory. It lands as a
retained output: a proposal held safely to one side, which you can run
without applying anything:
shepherd run changeset --latest --read donut.py | python3 -
Ten seconds of spinning ASCII donut, straight out of the retained output. If you like it, keep it; if not, throw it away — the trace remembers either way (the demo prints both commands with the real run id):
shepherd run select <run-ref> # keep it
shepherd run discard <run-ref> # ...or not
Edit PROMPT in agent_task.py and re-run to ask for anything else — the
contract stays the same. For an agent that edits existing files, see
shepherd demo write claude-readme.
Offline Quickstart
No API key required. This runs the same retained-output machinery through Shepherd's deterministic provider — the agent lane above, minus the agent:
mkdir /tmp/shepherd-quickstart && cd /tmp/shepherd-quickstart
shepherd init # turn this directory into a workspace
shepherd demo write quickstart > quickstart_demo.py
python quickstart_demo.py # register + run a task, retaining its result
shepherd run list # the run and its status
shepherd run changeset --latest # what it wrote, kept as a retained output
Inspect the full record with shepherd run show --latest (add --json to any
read command for the durable machine payload); see the
docs for backend selection and the complete
run surface.
Examples
The demo scripts above are the Python surface in miniature — checked-in copies
live in examples/quickstart/.
The visual-artifact notebooks live in
examples/notebooks/visual_artifact/notebooks/
— launch them with make notebooks.
Development
Useful local gates:
make dev-install
uv run pytest integration-tests/test_quickstart_core.py -q
make baseline
Documentation
Full documentation lives at docs.shepherd-agents.ai. In this repository the docs are authored under docs/shepherd/, starting with the
Quickstart guide and
Concepts — tasks, effects, scopes, permissions, and the trace.
Reproducing Paper Results
The full experiment code — the meta-agent applications and the framework-performance microbenchmarks — lives in a companion repository: shepherd-agents/shepherd-experiments. It bundles the frozen substrate snapshot used for the paper, so the numbers stay reproducible against the exact version that produced them.
Citation
@misc{yu2026shepherdenablingprogrammablemetaagents,
title={Shepherd: Enabling Programmable Meta-Agents via Reversible Agentic Execution Traces},
author={Simon Yu and Derek Chong and Ananjan Nandi and Dilara Soylu and Jiuding Sun and Christopher D Manning and Weiyan Shi},
year={2026},
eprint={2605.10913},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2605.10913},
}
License
This project is licensed under the MIT License — see the LICENSE file for details.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shepherd_ai-0.1.3.tar.gz.
File metadata
- Download URL: shepherd_ai-0.1.3.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34eed0d1c0f9431b9e2e6456bbe95ac0629644a140784bfc3d7532f3c4cbad27
|
|
| MD5 |
37128ddfeb56136b451b9c27d024e49a
|
|
| BLAKE2b-256 |
60615db71764422f3a7360ef994d53f54708f6d8055bb9de9634c3c9b4a915a2
|
Provenance
The following attestation bundles were made for shepherd_ai-0.1.3.tar.gz:
Publisher:
release.yml on shepherd-agents/shepherd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shepherd_ai-0.1.3.tar.gz -
Subject digest:
34eed0d1c0f9431b9e2e6456bbe95ac0629644a140784bfc3d7532f3c4cbad27 - Sigstore transparency entry: 2041549631
- Sigstore integration time:
-
Permalink:
shepherd-agents/shepherd@25ebce03978ee7c7d781341dbfbf08718283521a -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/shepherd-agents
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@25ebce03978ee7c7d781341dbfbf08718283521a -
Trigger Event:
release
-
Statement type:
File details
Details for the file shepherd_ai-0.1.3-py3-none-any.whl.
File metadata
- Download URL: shepherd_ai-0.1.3-py3-none-any.whl
- Upload date:
- Size: 1.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8147f832776a728119b111162e96d03930a3d618a3728923e6b84ba8031ef016
|
|
| MD5 |
4c0963b8aaf6e73ca00553c0d0518d3f
|
|
| BLAKE2b-256 |
534490ef5a34a1063030056888acce6c6acdf7a455175b75dd2a948c8981f7a8
|
Provenance
The following attestation bundles were made for shepherd_ai-0.1.3-py3-none-any.whl:
Publisher:
release.yml on shepherd-agents/shepherd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shepherd_ai-0.1.3-py3-none-any.whl -
Subject digest:
8147f832776a728119b111162e96d03930a3d618a3728923e6b84ba8031ef016 - Sigstore transparency entry: 2041549694
- Sigstore integration time:
-
Permalink:
shepherd-agents/shepherd@25ebce03978ee7c7d781341dbfbf08718283521a -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/shepherd-agents
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@25ebce03978ee7c7d781341dbfbf08718283521a -
Trigger Event:
release
-
Statement type: