Skip to content

A pattern reference · v0.1

Consent patterns for AI agents

The “Allow” dialog, rethought for agents that act on your behalf.

Machines open your accounts, send your messages, spend your money. Every team building one carves its own asking-screens from nothing. Here are the named ways: hand over keys, say yes to a move, set standing rules, read the trail left behind — each with the why behind it, and working parts to build it.Agents connect to your accounts, send your messages, spend your money. Right now every team shipping an agent designs those permission screens from scratch. This reference names the ones that work: how to grant access, approve an action, set standing rules, and show what the agent actually did — each with the reasoning behind it and React code you can drop in.Agents exercise delegated authority over accounts, messages, and money. Every team shipping one independently re-derives the consent interface for that delegation. This is the reference: a pattern language for permissions, approval, standing authority, and auditability, each pattern with its rationale, its anti-patterns, and a headless React implementation.

What’s here

Three things, one problem

A book of the patterns, real working parts for each one, and a teaching for the machines that write your code.A documented set of patterns, a working implementation of each, and a skill that teaches coding agents to apply them.A documented pattern language, a reference implementation of each pattern, and a distilled skill that carries the same guidance to coding agents.

  • 01 · Read

    The patterns

    Each names a recurring trouble and shows the fix: parts, when to use it, screen reader talk, wrong turns, code.Each pattern documents a recurring consent problem: anatomy, when (not) to use it, real-world examples, accessibility, anti-patterns, and code.Each pattern documents a recurring problem and its resolution: anatomy, applicability, accessibility semantics, anti-patterns, and a reference implementation.

    Browse the patterns →
  • 02 · Build

    A React library

    Every pattern gets a working piece in @agentconsent/react: plain bones, a swappable skin, screen reader friendly, free to take.A working implementation of every pattern in @agentconsent/react: headless primitives plus a themeable default. WCAG 2.2 AA, axe-clean, MIT, and published with npm provenance so you can verify what you installed.A reference implementation of every pattern in @agentconsent/react: headless primitives with a themeable default skin, WCAG 2.2 AA, MIT, built and published entirely from GitHub Actions with npm provenance attestation. The premise: a pattern without a runnable artifact is an opinion.

    Read the library guide →
  • 03 · Delegate

    A skill for coding agents

    Hand this teaching to your code-writing machine, and it builds asking-screens right the first time.Install the best-practices skill into Claude Code and your agent applies these patterns when it builds consent flows.A distilled best-practices skill for coding agents: installed into Claude Code, it applies this guidance when generating consent flows.

    Read the skill guide →

The categories at a glance

All 12 patterns →

Four piles, from first handing over a key to reading the mark left behind.Four categories, tracing the arc from first granting access to reviewing what the agent did.Four categories tracing the delegation lifecycle: conferral, per-action authorization, standing policy, and accountability.

  • Granting access3

    How you hand the machine a key: which key, when, and where you can see what it's already holding.How a user first hands an agent access: at what granularity, when in the task, and where to review it later.The initial conferral of authority: it decomposes scope, defers escalation until need is demonstrated, and keeps granted connections legible.

  • Approving actions3

    Saying yes to one act before it happens: you see the real thing, and acts you can't take back get a heavier gate.Deciding on individual actions before they run: showing the exact act, and matching friction to how reversible it is.Per-action authorization: rendering verbatim parameters, scaling confirmation to recovery cost, and triaging queues without rubber-stamping.

  • Standing authority3

    Yeses that keep working after today: where they live, what limits them, and when they run out.Permissions that persist beyond the current task: how they're set, kept in view, bounded, and ended.Durable delegation: consequence-labeled durability at grant time, an aggregated policy surface, and quantitative limits that reset.

  • Trust & transparency3

    Knowing whose words the machine acts on, what it did after, and never letting it hold your secret.Knowing where a request came from, what the agent did afterward, and keeping secrets out of its reach.Provenance and accountability: surfacing untrusted-instruction origin, recording each exercise, and excluding the agent from credential paths.

The research behind the patterns

All research →

What the wise ones say about machine keys, boiled down, sorted by subject, every saying marked with who said it. The shared word-list lives there too.Summarized, attributed lessons on agent permissions from industry thinkers — organized by topic and paired with the shared glossary.Attributed digests of the industry literature on agent authorization, organized topically and colocated with the collection’s controlled vocabulary.

New here? Start with Action Preview. If you only read one pattern, make it that one.

Reading as an agent? llms.txt