Twelve tutorials on object capabilities (ocaps) with Endo and Agoric — from a single JavaScript object to a blockchain capability marketplace with a mobile PWA wallet.

Part 1 — Alice's Car Key: Capabilities, Attenuated

Define a Car object with two methods. Wrap it in a "valet key" that only unlocks. Hand the key to a confined guest and watch the guest try (and fail) to drive away. By the end you understand pet names, formulas, Far, harden, eventual send (E()), and the Principle of Least Authority.

Part 2 — Mailing Bob the Start Fob: Capabilities Across the Wire

Bob moves from a guest on Alice's daemon to his own daemon. Alice issues an invitation, Bob accepts, and Alice delivers the start capability over CapTP — the same capability transport protocol used in Agoric's production blockchain. You meet invitations, the CRDT-backed synced pet store, and the revocation model.

Part 3 — One Key Per Valet: Per-Grantee Wrappers and Independent Revocation

Build a makeRevocableForwarder factory. Mint one wrapper per grantee. Revoke Bob's without touching Charlie's. The Car keeps running. This is the per-grantee wrapper pattern: attenuation and revocation are independent, both expressed in plain JavaScript closures.

Part 4 — Bob Makes a Request: The Endo Mailbox and Forms

Bob asks Alice for a capability instead of waiting for her to push one. Alice sees the request in her inbox, approves or rejects it, and Bob's code handles both outcomes. Covers the Endo mailbox, endo resolve, endo reject, persistent settled requests, and pipelining off a promise before the host acts.

Part 5 — The Plugin That Can't Escape: Hardened Compartments

Run untrusted third-party code inside a Hardened JavaScript Compartment. Three escape attempts — fetch, process.env, prototype mutation — each fail cleanly. The same plugin does its legitimate work through an attenuated capability. Covers SES compartments, frozen primordials, supply-chain attack resistance, and the Date.now / Math.random covert channel.

Part 6 — The Smart Garage: A Capability Broker

Assemble tutorials 1–5 into a working system: a garage broker that provisions per-grantee forwarders to third-party plugins, audits active grants, revokes any plugin independently, and emergency-stops everything at once. Two plugins — one well-behaved, one adversarial — each get exactly the access they were given.

Part 7 — What the Garage Is Missing: Toward a Blockchain Capability Marketplace

A bridge chapter. Five things the garage cannot do: trust is personal not contractual, payment and access are not atomic, there is no marketplace, the fob cannot be traded, revocation is Alice's word not the chain's. Each gap maps directly to a part of Agoric's stack — ERTP, Zoe, on-chain marketplaces, the wallet, and a Lit PWA mobile wallet.

Part 8 — The Car as a Digital Asset: ERTP

Agoric's Electronic Rights Transfer Protocol. Turn the car's access right into a tradeable non-fungible asset. Mint a payment, deposit it into a purse, transfer it to Charlie without Alice's involvement, burn it on revocation. Every ERTP primitive maps to a concept from tutorials 1–3 — supply control, attenuation, revocation — now standardised and financially meaningful.

Part 9 — The Garage as a Smart Contract: Zoe

Port the garage to a Zoe smart contract on a local Agoric chain. Alice lists a CarAccess token for 50 IST. Zoe holds both sides in escrow and releases them atomically. Neither party can cheat. Offer safety is enforced by the contract, not by Alice's goodwill.

Part 10 — The Listing Board: An On-Chain Capability Marketplace

Multiple sellers post CarAccess listings at different prices. Buyers browse the board, pick a listing, and buy atomically through Zoe. No central operator, no discovery gap, no trust required between parties. Closes the marketplace gap from tutorial 7.

Part 11 — The Wallet: Petnames on the Blockchain

The Agoric wallet is tutorial 1's three-layer model applied to a blockchain. Pet name → ERTP brand → purse balance. Bob approves a CarAccess purchase through the wallet UI, seeing exactly what he gives and receives before signing. The dapp-wallet bridge is attenuation and offer safety composing at the financial layer.

Part 12 — The Mobile Wallet: Lit, Web Components, and Offline Capabilities

The capstone. A Lit + Vite PWA installable on iOS and Android. lockdown() fires before any component code. Each <car-fob> web component holds its CapTP reference in a private field — the closure from tutorial 3, running in a browser. IndexedDB stores the offline CRDT replica. Tutorial 1's three-layer model, twelve tutorials later, on a phone connected to a blockchain.

A 12-part series on securing AI agents with object capabilities and information-flow control. Prompt injection is the confused-deputy problem reborn; the fix is least authority, not a better-behaved model.

Part 1 — The Model Is Never a Principal

Prompt injection is the confused deputy reborn, and why "make the model behave" can't be the boundary.

Part 2 — A Tool Is a Capability; an Agent Is a Vat

The five reframings that turn an LLM agent into an ocap citizen, and the single axiom underneath.

Part 3 — Least Authority and Least Knowledge

Ocaps bound what an agent can do; information-flow bounds what it can know; you need both.

Part 4 — Label the Turn, Not the Token

Why an LLM is a mixing channel, why confidentiality must be prevented at ingestion, and why the best secrets are designed to decay.

Part 5 — Building the Kernel

Capabilities, the membrane, the agent-as-vat, and a prompt-injected agent that structurally cannot escalate or exfiltrate.

Part 6 — Hardening with Endo

This is where this series shakes hands with the old one: SES lockdown, a transitive revocable membrane, and shrinking the trusted base to a four-method core.

Part 7 — A Real Model, Structurally Constrained

Grammar-constrained tool calls so the model cannot emit an invalid action, then a frontier model over a gateway. Safety turns out to be model-independent.

Part 8 — The Isolation Ladder

Process, container, gVisor, microVM, Firecracker, and finally seL4: the rung where confinement stops being strong and becomes proven.

Part 9 — A Microblog Is a Capability System Wearing ACL Clothes

Sharing is delegation, visibility is information-flow, and the social graph turns out to be the capability graph.

Part 10 — Owning and Selling a Post

Money as mint-and-purse, ownership as a transferable deed, and the discovery that an AI agent owns property by exactly the same mechanism a human does.

Part 11 — The Financial Dual: Offer Safety

Agoric's Zoe lets an untrusted smart contract run without being able to steal; the worst it can do is refund. That is the same move as confining the model. This post is the bridge back to the Endo-and-Agoric series.

Part 12 — What It Can't Do, and Why That's Honest

The irreducible limits. The striking part: the authority half of the design has no entries on that list. Everything that stays hard lives in the knowledge, human, and hardware halves — and that's true for everyone, not just us.

RECENT

Recent Dispatches & Essays