FastATP

FastATP tutorials

Hands-on guides that run end to end on your computer, against the fastatp in this repository. They are a series: each one builds on the one before it and ends by pointing at the next, and they arrive one at a time.

If you are a coding agent, start at AGENTS.md. You can run a guide yourself, headless, in about five minutes, and answer the user from what happened on the machines.

# Guide What it shows Status
1 GETTING_STARTED.md Three sovereign peers on a private LAN: signed records, verified following, a private channel behind a real WireGuard tunnel runs
2 CONDUCTOR_AND_ORCHESTRA.md The engine that plays guide 1, taken apart, then put to work: a conductor orchestrates three machines with signed records, from one note to a tune runs
3 HOOT.md Tool calling as signed records: an agent drops one request, two ride companies bid sealed from each other, a bank holds and pays, a car drives, and alice checks every step back to alice's own words runs
4 GEESE.md A person reaching an app from a browser tab with no secret on the wire: sign up, log in, and let a second device in and out, while the app keeps the account without holding its key runs

Everything they run is shared: lab/ is the machines on a LAN inside Docker and the scripts baked into their image (each guide names its cast, <!-- @demo machines alice bob eve -->, and only those machines boot), conductor/ is the demo engine's page, and tools/ turns a guide into the score the conductor plays and keeps a guide's quoted files equal to the files themselves. A new guide adds one markdown file, whatever scripts it needs, and one line in lab/Dockerfile that builds its score into the conductor's image.

Three ways to run a guide

You need Docker with the compose plugin, and nothing else; each guide's Setup section says how to check that your Docker can create a WireGuard interface.

Read it and type along. Open the guide, then:

cd tutorials/lab             # from the repository root
./lab.sh up                  # build the image and boot alice, bob and eve
./lab.sh alice <command...>  # every command in the guide is one of these
./lab.sh clean               # when you are done: stop everything, delete all state

Watch it on one screen. The demo engine plays the guide on fresh machines and shows every machine's view, the whole diagram and the wire side by side:

cd tutorials/lab             # from the repository root
./lab.sh clean               # start from the first minted identity
./lab.sh conductor           # boots the machines with the demo engine

That plays Getting Started; ./lab.sh conductor CONDUCTOR_AND_ORCHESTRA plays guide two, whose machines run its own program (the guide names it, <!-- @demo peer orchestra.py -->, and lab.sh reads it), and ./lab.sh conductor HOOT plays guide three, on a cast of six machines of its own, each running its own program (<!-- @demo peer bank bank.py -->). ./lab.sh conductor GEESE plays guide four, where the app is on the page and you use it: the show waits for you at each turn.

Then open http://localhost:8080 and press Start. Each press of Next is one step: a caption from the guide, or one command on one machine, with the terminal it runs in lit up. The show is four chapters of a few minutes each, chosen from the menu the page opens with: a chapter builds on the ones before it, so choosing ahead plays them first, fast and without stops, then opens the one chosen. When a command runs one of the lab's scripts, or one of the peer's routes, that file opens beside the machine, at the handler. Key concepts stop the show until Got it, which is also Next. Back shows an earlier caption or concept again; the machines stay where they are, because every step really ran. The page is the only thing published to your computer, on 127.0.0.1 only.

Play it headless. The same show with nobody watching, reported step by step, exit 0 when the whole guide played. This is what a coding agent runs to see for itself (AGENTS.md):

cd tutorials/lab             # from the repository root
./lab.sh test                # GETTING_STARTED; about five minutes

The run fails if a command ends the wrong way (one the guide means to work fails, or one it means to be refused goes through) or does not print what the listing under it shows. A guide with an app (Geese) has turns a person takes in it; headless, tools/hands.py takes them in a Chrome on your computer, so that guide needs fastatp installed (uv sync) and a Chrome on the path to play. With the lab still up, python tutorials/tools/page_check.py (from the repository root, with fastatp installed and a Chrome on the path) then opens the page in a headless browser and looks back through every step: no page errors, a page no wider than its window, and every key concept's card and picture where the guide puts them. Every pull request runs both.

What a guide is tested against

The fastatp in this tree, the commit you have checked out: the lab image installs the package from the repo root with its dependencies exactly as uv.lock pins them. No guide names a version. A guide quotes its lab files in full, and uv run pytest fails when a quote and its file differ; after changing a file, run this from the repository root to update the guide:

python tutorials/tools/md_embed.py --write tutorials/GETTING_STARTED.md

Writing one