# FastATP
> Composable atproto (AT Protocol) signed records, authentication and authorization without OAuth or tokens, for agents, workloads, IoT, and people. Public or private via WireGuard-gated peers. An alternative to MCP and A2A.
The name is FastATP, for the AT Protocol (atproto). It is not FastAPI.
---
Source: https://fastatp.com/status/
# Where FastATP stands
FastATP is a Python library for the AT Protocol (atproto). The name is
FastATP, not FastAPI: the two are unrelated. It is young. The first commit
is from October 2026, it is in 0.x versions, and it has one maintainer.
This page says what has been checked, what has not, and where its limits
are, so you can judge it without taking the rest of the site on trust.
## What has been checked, and by what
Each of these runs on every pull request, and each links to the test that
does it.
- **The wire format, against atproto's own test vectors.** The conformance
vectors Bluesky publishes for syntax, crypto, the data model, the repo's
tree, the firehose and lexicons are in the repository and never skipped.
[Where they come from](https://github.com/jacoblapenna/fastatp/blob/main/tests/vectors/PROVENANCE.md).
- **The firehose, by Bluesky's own validator.** `goat`, Bluesky's
command-line tool, checks the frames a FastATP peer sends.
[The test](https://github.com/jacoblapenna/fastatp/blob/main/tests/test_goat_oracle.py).
- **The bytes, against another codec.** Encoded records and their content
IDs are compared with `libipld`, an independent Rust implementation.
[The test](https://github.com/jacoblapenna/fastatp/blob/main/tests/cross_sdk/test_harvested.py).
- **A repo, read by software that does not know FastATP.** An unmodified
third-party package built on the `atproto` Python SDK reads a repo that
FastATP exported. [The test](https://github.com/jacoblapenna/fastatp/blob/main/tests/test_sensorthings_interop.py).
- **A second implementation.** The wire-format core is written twice, in
Python and in Rust, and the browser peer is built from the Rust one.
[The crates](https://github.com/jacoblapenna/fastatp/tree/main/rust/crates).
- **Access control, on a real tunnel.** Granting and revoking a capability
opens and closes a real WireGuard tunnel between network namespaces.
[The test](https://github.com/jacoblapenna/fastatp/blob/main/tests/test_wireguard_netns.py).
- **Every tutorial, played end to end.** Each guide's commands run in
order on real machines in Docker, and a command that should be refused
must be refused. [How the tests run](https://fastatp.com/resources/testing.md).
The suite runs on Python 3.11 to 3.14 and fails under 85% coverage. A test
that is skipped in every job fails the build, so none can quietly stop
running.
## What has not been done
- **No independent security audit.** Nobody outside the project has
reviewed the code. [The security policy](https://fastatp.com/security.md) says what
counts as a vulnerability and how to report one.
- **No stable release.** In 0.x a minor release may change or remove
public API. [The changelog](https://fastatp.com/changelog.md) lists each break.
- **No known production use.** The maintainer knows of no deployment
outside the project's own tests and tutorials.
## Known limits
These are choices, not bugs, and they decide where FastATP fits.
- **FastATP never encrypts a record.** Privacy comes from who can reach a
repo, not from ciphertext. A peer you admit can read what it reaches. A
builder can encrypt a field of their own records, which
[the philosophy](https://fastatp.com/philosophy.md) allows as a discouraged escape
hatch; the library ships nothing for it, and who connects and when
stays visible either way.
- **A host can read what it serves.** People who will not run a server
need a host for their repo. The host holds no pen, so nothing it makes
up or changes passes a reader that verifies the record against its
author's key. A reader that skips that check is trusting the host. The
host can also read the repos it holds, see who connects and when, and
refuse to serve them. That is true of any hosted app today, on atproto
or off it, so it is a limit FastATP shares, not one it adds.
[The design note](https://fastatp.com/resources/hosted-peers.md) works through it.
- **A `did:web` identity rests on a domain, unless the reader knows its
twin.** Whoever controls the domain's DNS and web server controls the
DID document it serves. FastATP adds a twin to the document, an "also
known as" entry bound to a signed history of the keys, and a FastATP
peer [checks it](https://fastatp.com/api/continuityresolver.md). To a reader that already
holds the twin, from an earlier visit or because the twin was the name
it was given, a thief needs the domain and the pen, not the domain
alone. A reader meeting the plain domain name for the first time has
nothing to compare, and a thief with the domain can serve it a fresh
twin of their own. Ordinary atproto software does not check the twin at
all, so to it the domain is still enough.
- **Private repos need WireGuard.** A machine joins a tunnel with a kernel
interface, which takes privileges. A browser cannot join one at all, so
a person in a browser reaches an app's peer, and that peer hosts their
repo.
- **It takes two.** A record is only useful to a counterparty that reads
it. FastATP speaks atproto's sync protocol, so atproto tools can read a
public repo, but the private side needs the other party to run a peer
as well.
## When something else fits better
The README says when
[MCP or A2A is the better choice](https://fastatp.com/readme.md#when-mcp-or-a2a-is-the-better-choice):
one model using local tools in one session, or agents inside web login
infrastructure that already exists.
## Check it yourself
You do not have to take this page on trust either. A coding agent can
[run a tutorial by itself](https://fastatp.com/tutorials/agents.md), in about five
minutes, and report what the machines did.
---
Source: https://fastatp.com/readme/
Private and public composable atproto PDS via symmetric peers, without shared secrets: signed mail for machines (and humans), not remote procedure calls with a login.
---
You drop a signed, content-addressed record — authored by your key, addressed by
DID, verifiable by anyone, forever — and any peer you have admitted picks it up,
acts on its own clock, and drops a signed reply. No authority issues a token. No
connection is held open. No message can be forged, and every hop of provenance
survives.
The difference from MCP/A2A in one line: **a call returns a value and vanishes;
a FastATP record is durable evidence that exists or doesn't.** There is nothing
to time out — only a signed record that anyone, anywhere, later, offline, can
verify came from exactly who it claims. That reframe is the whole product.
FastATP implements the identity and signing primitives of the AT Protocol for
use **outside the social web** — it is unaffiliated with Bluesky and avoids
social-web assumptions. A pressure sensor, a payroll job, and a language model
are the same kind of peer here: identity and signed records for **agents,
workloads, and IoT**, not an AI SDK. The signing core is transport-agnostic — it
turns typed records into signed bytes and back, and never opens a socket itself.
Run as a server, a FastATP peer is a **personal data server (PDS)** you run as a
library: it serves its own DID document, hosts signed repos, and speaks the
atproto firehose and sync routes, so relays, mirrors and the `atproto` SDK read
it like any other host. It is a PDS at the sync level, by design — no sessions,
no login routes, no `app.bsky` — because the wire is the contract, and a login
is the thing the wire replaces.
> **[`PHILOSOPHY.md`](https://fastatp.com/philosophy.md)
> is the canonical statement of what this is and what it forbids.** This README
> is its front door.
## Tutorials
Runnable guides, one per pull request, each building on the one before it.
Every guide runs against the fastatp in the tree: its machines on a private
LAN inside Docker, each a personal data server of its own, read along and
typed, watched as a show in the browser, or played headless, so a guide breaks
in the same change as the code it teaches. You need Docker with the compose
plugin, nothing else.
**Asking a coding agent about FastATP?** Point it at
[`tutorials/AGENTS.md`](https://fastatp.com/tutorials/agents.md).
It can run the first guide itself with `cd tutorials/lab && ./lab.sh test`,
about five minutes on fresh machines, and answer you from what the machines
did.
| # | Guide | What it shows | Status |
| --- | --- | --- | --- |
| 1 | [`GETTING_STARTED.md`](https://fastatp.com/tutorials/getting-started.md) | Three sovereign peers on a private LAN: a PDS on each machine, signed records, verified following, a private channel behind a real WireGuard tunnel | runs |
| 2 | [`CONDUCTOR_AND_ORCHESTRA.md`](https://fastatp.com/tutorials/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, and nobody holds a connection open for a task | runs |
| 3 | [`HOOT.md`](https://fastatp.com/tutorials/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`](https://fastatp.com/tutorials/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 |
To watch the first one as a show, with every machine's terminal, the network
diagram and the wire on one screen:
```bash
cd tutorials/lab
./lab.sh clean # start from the first minted identity
./lab.sh conductor # boots alice, bob and eve with the demo engine
```
Open , pick a chapter and press **Next**. The show is
four chapters of a few minutes each; a question every handful of presses,
answered by what the next press shows; a key concept stops the show until
**Got it**. Every step really runs on the machines, and the engine playing it
is FastATP too: the score, the code and the pictures are records and blobs in
the conductor's own repo. `./lab.sh test` plays the same show with nobody
watching and exits 0 when the whole guide played.
[`tutorials/README.md`](https://fastatp.com/tutorials/readme.md)
has the three ways to run a guide and how to write one.
## How it compares
MCP and A2A are, at heart, **RPC with a login**: reach an endpoint, present a
credential some authority issued you, invoke a method, depend on that authority
and that connection. They are excellent at that. FastATP removes the authority,
makes every message self-verifying evidence, treats long-running and multi-party
work as the default, and applies to any workload.
| Dimension | MCP | A2A | **FastATP** |
|---|---|---|---|
| Mental model | Client calls a server's tool | Agent calls a remote agent | **Peer drops signed mail; peers act on their own clock** |
| Interaction | Synchronous RPC | Task RPC (long-running via SSE / push) | **Async durable signed records** |
| Identity | Server URL + OAuth | Agent Card at a URL + declared auth | **DID (did:web, did:key)** |
| Trust root | OAuth / token issuer | Web auth (OAuth, API keys) in the card | **None — cryptographic keys, per-record signatures** |
| Message verifiable after the fact? | No | No (messages not independently signed) | **Yes — by anyone, offline, across hops** |
| Topology | Host–client–server | Client-agent ↔ remote-agent | **Symmetric peers** |
| Authorization / revocation | Server-side token scopes | App logic + web auth | **Signed capabilities + WireGuard admission; absence = unreachable; bilateral kill switch** |
| Long-running work | Awkward | Supported (tasks, SSE, webhooks) | **Native — no connection held** |
| Discovery | Static config | Agent Cards + registries | **User-built, untrusted directory; no privileged registry** |
| Domain | LLM tools / context | AI agents | **Any workload — agents, services, IoT** |
| Transport | stdio, HTTP+SSE | HTTP + JSON-RPC + SSE | **Transport-agnostic (firehose / HTTP / MQTT / serial)** |
### When MCP or A2A is the better choice
Credibility comes from not overclaiming. Reach for them instead when:
- You want **one model to use local tools right now**, in one session — MCP is
simpler and FastATP is overkill.
- You are building **AI-agent interop inside existing web-auth infrastructure**
and want a turnkey, widely-supported protocol today — A2A is more
batteries-included for that narrow case.
FastATP wins decisively when you need **no trusted third party**, **cryptographic
provenance that composes across hops**, **durable async / long-running work**, a
**bilateral kill switch**, or **non-AI workloads** — any one of which the others
cannot give you.
### FastATP and the atproto SDK
The [`atproto` SDK](https://github.com/MarshalX/atproto)
([PyPI](https://pypi.org/project/atproto/), MIT, by MarshalX) is the Python
ecosystem's standard for AT Protocol — production-grade, battle-tested
against the live network, and the right choice for building on Bluesky or
talking to existing PDS hosts. FastATP and the SDK are **complementary
halves of one wire**: the SDK is a superb *client of hosts*; FastATP is a
way to *be* a host — a personal data server (PDS) as a library, a sovereign
peer. An SDK application can read a
FastATP-hosted repo today (see
[`examples/sensorthings_interop`](https://github.com/jacoblapenna/fastatp/tree/main/examples/sensorthings_interop),
where an independent SDK-based package flattens a FastATP CAR export unmodified),
and a FastATP peer serves SDK users like any other host.
| Dimension | `atproto` SDK | **FastATP** |
| --- | --- | --- |
| What it is | Client library for AT Protocol services | **Library for being an AT Protocol peer: your own personal data server (PDS)** |
| Primary use case | Build on Bluesky; talk to PDS hosts; consume the network | **Host your own signed repos; agent↔agent and user↔agent workflows** |
| Auth model | Sessions / OAuth against a host (as the network's services expect) | **No login surface: keys sign, capability records authorize, absence is revocation** |
| Lexicon approach | Generated models from the official corpus — batteries included | **User-defined: author any conforming lexicon in Pydantic; export valid lexicon JSON** |
| Firehose role | Consume (production-hardened client) | **Emit AND consume, with full verification (signatures + MST inversion)** |
| Repo role | Read via host APIs | **Sign, host, prove, serve: MST repo, commits, CAR, `prove()` record proofs** |
| Hosting | n/a (clients have hosts) | **PDS-as-a-library: firehose + sync routes on your own box** |
| Choose it when… | You're building an app or bot on the existing network — it's mature, complete, and maintained by the ecosystem's standard-bearer | **You need to be your own host: no trusted third party, secure SaaS without a login wall, sovereign agents** |
The sharpest way to see the difference: with FastATP, **a secure
multi-tenant app needs no login wall** — users sign locally, hosts never
hold a secret, presence of a signed capability record is authorization and
its absence is revocation. And to be precise about auth: OAuth is never *in*
FastATP, but a developer can build OAuth (or any auth UX) **on top of** it
at the edge — [`examples/bluesky_signup`](https://github.com/jacoblapenna/fastatp/tree/main/examples/bluesky_signup)
does exactly that, with the OAuth library as the builder's dependency, never
FastATP's.
## Install
```bash
pip install fastatp
```
> **FastATP is 0.x: a minor release may break, a patch release never does.**
> 0.2 to 0.3 can change or remove public API; 0.2.0 to 0.2.1 only fixes or
> adds. To take fixes without surprises, pin the minor line:
>
> ```bash
> pip install "fastatp~=0.3.0" # at least 0.3.0, below 0.4
> ```
>
> Breaking changes are listed under **Breaking** in the
> [`CHANGELOG.md`](https://fastatp.com/changelog.md).
FastATP speaks **one wire format: atproto's**. Records live in a signed,
present-state repository; a record travels as a *proof slice* (signed commit +
Merkle path + record) that anyone can verify with nothing but a DID resolver —
over a firehose, HTTP, MQTT, or a serial line.
## Five-minute prove / verify
A device signs a telemetry record; anyone verifies it later with only a DID
resolver — no live connection to the device, no shared secret.
```python
import asyncio
from datetime import datetime, timezone
from fastatp import Peer, Lexicon, build_did_document
from fastatp.crypto import generate_keypair
class PressureReading(Lexicon):
nsid = "com.example.telemetry.pressureReading"
pressure_psi: int
timestamp: datetime
async def main() -> None:
key = generate_keypair("k256")
did = "did:web:example.com:device-1"
doc = build_did_document(did=did, signing_key=key.public_key())
producer = Peer(did=did, signing_key=key) # or any fastatp.Signer: a TPM, an HSM
repo = await producer.create_repo()
await repo.put_record(
PressureReading.nsid,
"boot",
PressureReading(pressure_psi=1450, timestamp=datetime.now(timezone.utc)),
)
proof = repo.prove(PressureReading.nsid, "boot") # bytes; ride any transport
# In production the verifier resolves DIDs over HTTPS (web_resolver).
async def resolver(d: str):
return doc if d == did else None
record = await Peer(resolver=resolver).verify(proof, expected_signer=did)
print(record.pressure_psi) # 1450 — proven to come from device-1's key
asyncio.run(main())
```
## Dispatch, reply, admit — the `PeerApp` framework
`PeerApp` is a FastAPI-shaped layer over the primitives: route any lexicon to a
handler, reply with signed records, and admit/evict peers with a bilateral kill
switch. It ships **mechanism, never application schemas** — you define your own
request/reply lexicons.
```python
from fastatp import PeerApp
app = PeerApp(server) # a PeerServer for this peer's DID
@app.on(InspectionRequest) # your lexicon, in your namespace
async def handle(req, ctx):
# work happens on your clock — there is no call waiting on the other side
result = InspectionResult(context_id=req.context_id, finding="within spec")
await app.emit(InspectionResult.nsid, generate_tid(), result) # a durable signed reply
# a private, one-shot reply on an ephemeral channel only the requester can read:
# await app.reply_private(ctx, result, ttl=120)
# consumer side, same call site as the public path:
# reply = await agent.call(tool_did, req, reply_type=InspectionResult, private=True)
```
The requester is a sensor, a service, or an agent — the same peer either way.
See [`examples/workorder.py`](https://github.com/jacoblapenna/fastatp/blob/main/examples/workorder.py)
(public request/reply over a WireGuard-admitted firehose) and
[`examples/board_rendezvous.py`](https://github.com/jacoblapenna/fastatp/blob/main/examples/board_rendezvous.py)
(a documentless requester and a private service meet at a public board and
exchange a private reply, end to end).
## What's in the box
- **Identity** — `did:web` and `did:key`, DID documents, Multikey, low-S compact
ECDSA (secp256k1 / P-256). The pen is a handle: `Signer` lets a key that
never leaves a TPM, HSM or secure element sign commits, and the package
normalizes and verifies every signature before it is committed (no adapter
shipped; `docs/HOSTED-PEERS.md` sketches one). Optional **self-certifying
`did:web` continuity**
(`Identity.bootstrap`, `ContinuityResolver`): a hash-anchored twin + rotation-
signed chain gives plc-grade first-contact assurance with **no registry**, so
identity survives a lapsed or hijacked domain.
- **Lexicon layer** — define any atproto-conforming schema as a Pydantic model
from a type palette; `to_lexicon_json()` emits a valid `lexicon: 1` document,
and the bridge round-trips every `com.atproto.*` schema.
- **Canonical records & repos** — atproto-identical DAG-CBOR + CIDs (checked
against the interop vectors); `Repo` keeps a signed Merkle Search Tree of the
current state (per-commit GC, no history accretion) with CAR export/import.
- **Hosting and firehose** — `PeerServer` is the personal data server: it
hosts one or many repos (routed by DID) behind a
`com.atproto.sync.subscribeRepos`-shaped WebSocket with cursor resume;
`DIDServer`, beside it, serves the peer's DID document;
`RepoMirror` verifies every commit against the producer's DID. A repo whose
pen lives elsewhere is hosted **frozen**: the host serves it and takes the
owner's signed pushes, and can never commit to it itself. Readers still
verify; frozen is enforced in the host's code, not a property of its disk.
- **Authorization** — signed **capability** records decide *why* a peer is
allowed; a **WireGuard** peer set enforces it physically (absence =
cryptographic unreachability). The reconciler keeps them in lock-step — a
decentralized replacement for a coordination server, with a bilateral kill
switch. Records are never encrypted: confidentiality is reachability +
isolation, not ciphertext.
- **Private-response channels** — ephemeral `did:key` repos + signed attestations
for one-shot private replies, with a per-repo doorman enforcing isolation.
- **Storage is one decision** — `Storage` bundles a repo's blocks, head and
blobs. The built-in `SqliteStorage` is what `Identity.bootstrap(state_dir=)`
uses; bring your own database as a class with the same three stores
(`docs/HOSTED-PEERS.md`, "Bring your own database"). The head store is a
compare-and-swap, so several identical processes writing the same repos
in one database can never fork them, and a restarted peer resumes its
firehose seq. What the store does not do: refresh one process's in-memory
repo from another's commits, or fan a commit out to subscribers connected
elsewhere; an app that runs several processes builds that on the head
store.
## Philosophy
Read [`PHILOSOPHY.md`](https://fastatp.com/philosophy.md)
— it is canonical and governs the package. In one question: *does this make
FastATP more like signed mail between sovereign peers, or more like RPC with a
login?* The former is the direction; the latter is the thing it is deliberately
not.
## Development
```bash
uv venv && uv pip install -e ".[dev]"
uv run pytest # conformance vectors are vendored in tests/vectors/
uv run ruff check fastatp tests && uv run mypy fastatp
```
Clone to develop; a `pip install` never needs a Rust toolchain (the browser
peer ships pre-built). Running the full suite — browser/WASM, WireGuard, and
cross-implementation tests — is covered in
[`docs/TESTING.md`](https://fastatp.com/resources/testing.md).
The [tutorials](#tutorials) are tests too: `cd tutorials/lab && ./lab.sh test [GUIDE]`
plays a guide headless against the fastatp in the tree (`GETTING_STARTED`
unless you name another, such as `CONDUCTOR_AND_ORCHESTRA`), and
`uv run pytest` fails when a guide's quoted files drift from the files
themselves. Every pull request plays every guide in CI, so a tutorial cannot
stop working without the change that broke it failing its tests.
See [`CONTRIBUTING.md`](https://fastatp.com/contributing.md)
before opening a pull request, and
[`SECURITY.md`](https://fastatp.com/security.md)
to report a vulnerability privately.
### Releases
Releases are built in CI from a version tag: the workflow builds the browser
bundle, runs the full suite, builds the sdist and wheel, verifies their
contents, and publishes through PyPI trusted publishing. There are no API
tokens and no shared secrets anywhere in the pipeline — the same rule the
library lives by. Release candidates go to TestPyPI first; each publish waits
for maintainer approval. Changes are recorded in
[`CHANGELOG.md`](https://fastatp.com/changelog.md);
the versioning rule and release routine are in
[`CONTRIBUTING.md`](https://fastatp.com/contributing.md#changelog-and-versions).
## License
MIT. Copyright Jacob Lapenna.
---
Source: https://fastatp.com/philosophy/
# FastATP — Philosophy
This document is **canonical**. It ships with the package, and it governs the
package. Features, APIs, and contributions are measured against it. When a
proposed change and this philosophy conflict, the change is wrong until this
document is deliberately, explicitly revised (an ADR in `docs/decisions/`), not
worked around. If FastATP becomes popular, this is the thing that keeps it from
drifting into the shape of whatever it's compared to.
## The one-sentence version
**FastATP is signed mail for machines, not remote procedure calls with a
login.** You drop a signed, content-addressed record — authored by your key,
addressed by DID, verifiable by anyone, forever — and any peer you have admitted
picks it up, acts on its own clock, and drops a signed reply. No authority
issues a token. No connection is held open. No message can be forged, and every
hop of provenance survives.
That reframe is the whole product. Everything below is why it matters and what
it forbids.
## Tenets
1. **No trusted third party.** Identity is a DID; authenticity is a per-record
signature. There is no identity provider, no OAuth server, no token issuer
whose compromise is everyone's compromise. Trust is peer-local: each peer
unilaterally decides who it talks to. The blast radius of any breach is one
peer.
2. **Data, not calls.** The unit of exchange is a signed, content-addressed
record — never an RPC invocation. Records are durable, verifiable offline,
deduplicated by CID, and compose across hops. This is *why* async,
long-running, multi-party work is natural here instead of bolted on: there is
no call to time out, only a record that either exists or doesn't.
3. **Symmetric peers.** Every participant — device, agent, service, human
session — is a peer with a DID. No client/server asymmetry, no host/tool
hierarchy. Either side can produce, consume, admit, or sever. Admission is
mutual and the kill switch is bilateral: if either peer is compromised, the
other cuts it off alone, live, with no coordination.
4. **Enforcement is physical, not policy.** The authorization *decision* is an
auditable signed capability record; the *enforcement* is the WireGuard peer
set. Absence from that set is cryptographic unreachability, not an unchecked
box. A revoked peer cannot knock.
5. **Transport-agnostic core.** The signing core never opens a socket. Records
ride the firehose, HTTP, MQTT, or a serial line — provenance travels with the
bytes, not the channel. A record verified after three hops and a week offline
is exactly as trustworthy as one pulled live.
6. **Workload-agnostic, not AI-centric.** This is identity and signed records
for agents, workloads, and IoT. AI agents are *one* use case, not the frame.
FastATP deliberately sits outside both the social web (it is not Bluesky) and
the "LLM tool-calling" frame (it is not an AI SDK). A pressure sensor, a
payroll job, and a language model are the same kind of peer here.
7. **Ship primitives, not applications.** The library ships the type system
(the Lexicon palette) and the framework (PeerApp). Users define their own
lexicons and build their own systems. FastATP never guesses your domain —
no shipped `WorkOrder`, no `app.bsky.*`. The sole shipped app-ish namespace,
`dev.fastatp.auth.*`, is authorization *infrastructure*, not an application.
8. **The market emerges; it is not shipped.** Directories, reputation,
discovery, an "app store" of tools — all of it is built by users on top of
the primitives. No registry is privileged; any directory is an untrusted
phone book that gates nothing, because grants are signed by the parties, not
by the directory. FastATP ships the mechanism and gets out of the way.
## Why this is more powerful than MCP and A2A
MCP and A2A are both, at heart, **RPC with a login**: you reach an endpoint,
present a credential some authority issued you, invoke a method, and depend on
that authority and that connection. They are excellent at what they are. But
they inherit RPC's ceiling:
- A **trusted third party** issues the credentials — so its compromise is
systemic, and every participant must federate with it.
- A **message is not evidence.** Once a call returns, nothing about it is
independently verifiable. You cannot prove, later, to someone else, who asked
for what. Provenance dies at the connection boundary.
- **Long-running and multi-party work is retrofitted** — via polling, SSE,
webhooks — onto a model whose native shape is "call and wait."
- The frame is **AI agents talking to tools.** The rest of the computing world —
sensors, services, workloads — is out of scope.
FastATP removes the authority, makes every message self-verifying evidence,
treats long-running and multi-party as the default rather than the exception,
and applies to any workload. That is not an incremental improvement on MCP/A2A;
it is a different substrate that happens to also cover their use cases.
### Comparison
| Dimension | MCP | A2A | **FastATP** |
|---|---|---|---|
| Mental model | Client calls a server's tool | Agent calls a remote agent | **Peer drops signed mail; peers act on their own clock** |
| Interaction | Synchronous RPC | Task RPC (long-running via SSE / push) | **Async durable signed records** |
| Identity | Server URL + OAuth | Agent Card at a URL + declared auth | **DID (did:web, did:key)** |
| Trust root | OAuth / token issuer | Web auth (OAuth, API keys) in the card | **None — cryptographic keys, per-record signatures** |
| Message verifiable after the fact? | No | No (messages not independently signed) | **Yes — by anyone, offline, across hops** |
| Topology | Host–client–server | Client-agent ↔ remote-agent | **Symmetric peers** |
| Authorization / revocation | Server-side token scopes | App logic + web auth | **Signed capabilities + WireGuard admission; absence = unreachable; bilateral kill switch** |
| Long-running work | Awkward | Supported (tasks, SSE, webhooks) | **Native — no connection held** |
| Discovery | Static config | Agent Cards + registries | **User-built, untrusted directory; no privileged registry** |
| Domain | LLM tools / context | AI agents | **Any workload — agents, services, IoT** |
| Transport | stdio, HTTP+SSE | HTTP + JSON-RPC + SSE | **Transport-agnostic (firehose / HTTP / MQTT / serial)** |
### Where MCP or A2A is the better choice (be honest)
Credibility with skeptical experts comes from not overclaiming. Reach for MCP or
A2A instead of FastATP when:
- You want **one model to use local tools right now**, in one session. MCP is
simpler and FastATP is overkill.
- You are building **AI-agent interoperability inside existing web-auth infra**
and want a turnkey, widely-supported protocol today. A2A is more batteries-
included for that narrow case right now.
FastATP wins decisively when you need **no trusted third party**, **cryptographic
provenance that composes across hops**, **durable async / long-running work**,
**a bilateral kill switch**, or **non-AI workloads** — any one of which the
others cannot give you, and which together describe where autonomous machine-to-
machine systems are actually heading.
## How the market gets built (composition)
The market is not a feature FastATP ships — it is what emerges when people
compose four independent primitives: **a peer, a DID, a signed record, and an
optional network gate.** From those four building blocks:
- **Public peer** — no gate; anyone who can reach it may read its firehose /
`getRepo`. **Private peer** — the same server behind WireGuard / a tailnet /
a firewall; only admitted DIDs reach it. **Mixed** — gate one route and not
another (public for discovery/read, admitted for the workload firehose).
- **Authenticity is constant** across all of these: every record is signed, so
a public peer's records are exactly as unforgeable as a private one's. The
gate controls *who can reach/read*, never *whether you can trust what you
read*. Confidentiality/admission and authenticity are independent knobs.
- **The gate itself is swappable.** The native WireGuard reconciler is the
zero-dependency, peer-sovereign enforcement plane; a tailnet, a firewall, or
nothing at all are equally valid deployments — records stay self-verifying
under every one of them. Be honest about the trade: a tailnet's control plane
is a **reachability authority** (a trusted third party for who-reaches-what).
Inside one org that authority is legitimate — the org owns its network;
across orgs it is exactly the dependency the native plane exists to avoid.
An edge/deployment choice, never the substrate.
### Records are never encrypted; confidentiality is reachability, not ciphertext
FastATP does not encrypt records, and the substrate never will by default — the
same stance atproto takes, for the same reasons: a no-history, signed,
replicable record is the wrong place for ciphertext (no forward secrecy with
static keys, metadata still leaks — who, when, how big — and key rotation is
miserable without history). Confidentiality is handled two ways, both without
touching record contents:
- **Reachability** — WireGuard / a tailnet encrypts everything in transit and
controls who can reach a firehose. This is *why* WireGuard is in the design: so
records never have to be encrypted.
- **Isolation** — a separate repo/DID per recipient (the private-response
pattern in `docs/PEERAPP.md`): privacy by identity + admission, not by
encrypting a shared stream.
Encrypting a payload field is an explicit, discouraged escape hatch; reaching for
it is a `FASTATP-CONFLICT` to be recorded, not a default anyone chooses.
### The bulletin board
A directory is just a **public peer whose only workload is "accept and host
signed listings."** Private tools post their signed listing records to it; the
board re-hosts them. Because a listing is signed by the *posting tool's* key and
is content-addressed, the board is a pure **relay** — it cannot forge or alter a
listing, and a consumer verifies each one against the *tool's* DID, never the
board's. The board can list, rank, and point; it can never grant or impersonate.
That is the untrusted phone book made concrete: a swarm of these is the "app
store," and not one of them is a trusted third party.
Be honest about the boundary of this claim: content-addressed signing defeats
**forgery** — no board can put words in a tool's mouth — but it does not, by
itself, give **freshness** (is this listing still current, or a replayed stale
one?) or **sybil/spam resistance** (nothing stops a flood of signed junk
listings). Those are real problems the market must solve on top — via listing
TTLs, revocations, reputation, staking, curation — exactly the emergent layer
FastATP deliberately does not ship. The substrate guarantees authenticity; it
does not pretend to guarantee relevance.
FastATP ships none of this — no `Listing` lexicon, no board peer. A user builds
it on PeerApp in an afternoon. **This is what "the market emerges" means.**
### Publicly discoverable, selectively admitting
A tool can be **found by anyone and admit almost no one.** Discovery is public
(the board, or its DID document); admission is the tool's own sovereign
decision. The tool runs **whatever admission negotiation its developer wants** at
the edge — a signed proof-of-need, a payment, human approval, an allow-list, *or
even OAuth* — and then calls `admit(did)` on the peers it accepts.
This does **not** contradict the "no trusted third party" tenet, and the
distinction matters: that tenet governs the *substrate*. FastATP never requires
an issuer, and no peer depends on another peer's auth choices. A tool consulting
OAuth before it decides whom to `admit()` is just that one tool's private
business logic — an edge adapter, not the substrate. Its OAuth server gates
nothing for anyone else and can impersonate no one; remove it and every other
peer is unaffected. Sovereign admission means each peer may consult any oracle it
likes, *precisely because* that choice never leaks into the shared substrate.
The result is total composability: public front-desk DID -> private worker DID;
public catalog -> private execution; one tool with per-listener tiers; found
publicly, admitted selectively. All from the same four building blocks.
### First contact: the board is the rendezvous, and contact is symmetric
A fully private service has no tunnel to any requester yet, so no first request
can reach it — and it need not expose any public endpoint to fix that. The
board resolves first contact for both sides, symmetrically:
- **Services list what they offer** (capabilities, admission requirements,
contact instructions), signed by their stable DID.
- **Requesters list what they seek** — a *want ad* — carrying their own signed
contact info (their WG public key and reachability).
- A private service **lurks**: its only move is outbound (subscribe to the
public board). It reads want ads, engages the ones it chooses by posting a
signed engagement record answering the ad (its channel's key + endpoint), and
admits that requester. The requester, seeing the engagement, admits back. The
tunnel forms; the conversation goes dark. **The contact stayed public; the
content never was.**
- The discoverability burden falls on whoever wants to be contacted. Anonymous
participation costs only a keypair: a `did:key` requester needs no hosted
infrastructure at all — a signed want ad and one outbound handshake.
Admission is mutual and self-governed at every step: either party can decline
to begin, and either can terminate. The request architecture and the response
architecture are the same architecture — a signed record plus connection info,
delivered where the other party can already reach.
### Transparency is a dial the application composes
The substrate makes *who-contacts-whom* naturally public (signed records on a
board) and *what-they-say* naturally private (admitted tunnels). Where an
application sets the dial between those poles is a design choice — and choosing
transparency deliberately turns the metadata that a "don't encrypt records"
substrate exposes into an **honesty mechanism**.
A dating application makes the incentives visceral. Compose it with a public
contact graph: profiles are signed listings; contact requests are public
engagement records; conversations happen only after mutual admission, in
private. Then:
- **Shotgunning becomes public arithmetic.** One DID answering four hundred
listings is countable by anyone. Bad behavior isn't moderated away; it is
priced in by visibility.
- **Unreachability beats blocking.** "Can this person even contact me" is
admission, not a filter — an unwanted request doesn't land in a folder, it
*cryptographically cannot arrive*.
- **Reputation accrues to persistence.** History attaches to the DID. An app
builder can make that an easy filter — *"don't admit requesters whose DID (or
whose attestations) are younger than three months"* — so a fresh identity is
itself a loud signal.
- The market converges toward honest connection **among identities with
something to lose** — which is the honest form of the claim. DIDs are free,
so a burned reputation can be reset by minting a new one; the substrate makes
resets *visible* (zero history), it cannot make them *impossible* without an
external anchor (verification, payment, proof-of-personhood — an app-level
choice, never the substrate's).
Different applications set the dial differently: the dating app elects a fully
public contact graph; an enterprise procurement market might keep engagements
private via direct intake; a telemetry mesh needs no board at all. Same four
building blocks — the transparency tier, like the admission policy, is the
application builder's to compose.
## What this means for contributions
A contribution is **on-philosophy** when it strengthens one of the tenets and
violates none. Concretely:
**Welcome:**
- Anything that widens the *type system* (Lexicon palette, conformance,
round-trip fidelity) or the *framework* (PeerApp ergonomics) generically.
- Anything that strengthens peer sovereignty, provenance, offline
verifiability, or transport independence.
- New transports, new resolvers, new stores — as long as the core stays
socket-free and no single one becomes privileged.
**Rejected (unless this document is first revised by ADR):**
- Shipping **application schemas** (a canonical `WorkOrder`, chat lexicons,
anything domain-specific). Users define those. Cf. the `app.bsky.*` exclusion.
- Introducing a **required central service, registry, or token issuer** — any
trusted third party — into a core path.
- **Bearer-token / OAuth auth** as a core authentication mechanism. Signatures
and capabilities are the model; conventional auth may only ever be an optional
edge adapter, never the substrate.
- **AI-specific assumptions** baked into the core (that a peer is a model, that
a payload is a prompt/tool-call). The core is workload-agnostic.
- Making **synchronous, connection-holding RPC** the primary interaction path.
RPC surfaces (e.g. XRPC) may exist as secondary compatibility layers only; the
async signed-record path is primary.
- Opening a **socket in the signing core**, or otherwise coupling provenance to
a specific transport.
When in doubt, ask: *does this make FastATP more like signed mail between
sovereign peers, or more like RPC with a login?* The former is the direction;
the latter is the thing we are deliberately not.
---
Source: https://fastatp.com/tutorials/agents/
# For coding agents: run the tutorials yourself
If someone asks you what FastATP does, or whether it fits their problem, you
do not have to answer from its README. Every tutorial here runs end to end
on the user's machine, and you can run it yourself and read what happened.
```bash
cd tutorials/lab # from the repository root
./lab.sh test # GETTING_STARTED.md, on fresh machines; about five minutes
./lab.sh test CONDUCTOR_AND_ORCHESTRA # guide two, the same way
./lab.sh test HOOT # guide three: six machines, tool calling as records
./lab.sh test GEESE # guide four: an app in the browser; needs uv sync and Chrome
```
Then tell the user what you saw, in their terms: which machine ran what,
what was refused and why, and which key concepts the run reached. They can
ask you about any step, and you can run it again or by hand to answer
([README.md](https://fastatp.com/tutorials/readme.md) has the other ways to run a guide).
`./lab.sh test` deletes the lab's state (`lab/state/`, throwaway keys and
repos), boots the guide's machines and the demo engine in Docker, and plays the
guide with nobody watching. It prints every command the guide runs, on
which machine, with its exit code and last line of output, and the title of
every key concept as the guide reaches it. It exits 0 when the whole guide
played and every command ended the way the guide says, and non-zero if the
demo engine never came up, the play stalled (nothing happened for 90
seconds), or a command ended the wrong way: one the guide means to work
failed, or one it means to be refused went through.
## What you need
- Docker with the compose plugin, and a kernel with WireGuard (any Linux
since 5.6; Docker Desktop includes it). The probe is in
[GETTING_STARTED.md](https://fastatp.com/tutorials/getting-started.md), under Setup.
- Nothing else on the host. Python, fastatp and the page are built into the
images. Geese is the exception: its turns in the app are taken by
`tools/hands.py` in a headless Chrome on the host, so it needs Chrome or
Chromium on the path and fastatp installed here (`uv sync`).
## What it is tested against
The fastatp in this repository, the commit you have checked out: the lab
image installs the package from the tree, with its dependencies exactly as
the repo's `uv.lock` pins them, hashes checked. No guide names a version.
The guides quote the lab's files in full, and `uv run pytest` checks that
the quotes match the files (`tutorials/tools/md_embed.py --write `
updates a guide after the lab changes).
## Reading the output
- Exit codes are the guide's own, and the run checks them. `exit 1` on
`follow.py ... refused` or `ping ... 100% packet loss` is the guide
working: those are the refusals it teaches, marked in the markdown with
``. Any other command must exit 0. A line starting
`✗`, and a `WRONG:` line at the end, name a command that did not end the
way the guide says.
- `exit -15` with `^C` as the last line means the guide said Ctrl-C: a
command left running, like a follower, stopped where the guide stops it.
- The key concepts are the guide's claims. Each one is a `> 🔑` blockquote
in the markdown; read the ones the output lists to explain what the run
showed.
- The listings are checked too. Every line the guide prints under a
command block must have been printed by those commands, in the guide's
order. A listing is an excerpt, so lines it leaves out are fine. Values
that are new on every run (keys, DIDs made from keys, record keys, CIDs,
timestamps, tunnel addresses) are compared by shape; everything else,
counts and sequence numbers included, is compared exactly, apart from
spacing and where a line wraps. A pass means
every step ran, in order, on the right machine, ended the way the guide
says, and printed what the guide shows.
- In guide two, the conductor also commits records the machines answer:
`conductor commits ...` then `└ alice answered: at://...`, or `conductor
conducts ... x30` for a sequence it signs one record at a time. Each
member it names must answer with a signed record in its own repo, except
one the guide marks as meant to stay silent; a `✗` names any that did not.
- In guide four, `you` lines are the viewer's turns in the app, each with
the request that ended it: `└ POST /signup 201`, or `└ GET
/xrpc/com.atproto.sync.getRepo 404` for the second device refused. A turn
skipped, or never ended, is wrong; `hands:` lines are what `hands.py` did.
- A full run of Getting Started is 46 commands and 21 key concepts.
## Other ways to run
| Command | What it does |
| --- | --- |
| `./lab.sh test` | the whole guide, headless, as above |
| `python tutorials/tools/page_check.py` | after a play, from the repository root: the conductor's page checked step by step in a headless Chrome |
| `SPEED=1 ./lab.sh test` | the same at reading speed (4 is the default) |
| `./lab.sh conductor` | the same guide on a page at , for a person |
| `./lab.sh up` | the machines alone, for running the guide's commands by hand |
| `./lab.sh clean` | remove everything |
## Tutorials
| Guide | Runs headless | What it shows |
| --- | --- | --- |
| [GETTING_STARTED.md](https://fastatp.com/tutorials/getting-started.md) | yes | sovereign peers, signed records, verified following, a private channel behind WireGuard |
| [CONDUCTOR_AND_ORCHESTRA.md](https://fastatp.com/tutorials/conductor-and-orchestra.md) | yes | orchestrating work with signed records: a task in the asker's repo, its result in the worker's, sequence and fan-out, a worker that was offline catching up |
| [HOOT.md](https://fastatp.com/tutorials/hoot.md) | yes | tool calling as signed records, against MCP and A2A: one open request and sealed bids, an allowance the bank checks, each agent composing who reads which private repo, and a chain of custody checked step by step back to the start |
| [GEESE.md](https://fastatp.com/tutorials/geese.md) | yes, with Chrome | authentication with no secret on the wire: a pen made in the browser that never leaves it, sign-up and log-in by signature, a second device let in and out by a record, and the incentives signed records let a builder compose |
The guides are a series, each building on the last, and they arrive one at
a time.
## Do not
- Run the lab on a real network. It uses plain `http` for DID documents,
which is safe only on the private bridge Docker creates.
- Treat the demo engine's players as a pattern to copy. They run any command
the conductor signs, which is remote execution authorized by a signature:
fine on the user's own computer, nowhere else.