Skip to content

docs(nips): NIP-AK — Agent Keyrings (owner-sealed, rotating credential delivery) - #6011

Open
akeemjenkins wants to merge 1 commit into
block:mainfrom
akeemjenkins:nip-ak
Open

docs(nips): NIP-AK — Agent Keyrings (owner-sealed, rotating credential delivery)#6011
akeemjenkins wants to merge 1 commit into
block:mainfrom
akeemjenkins:nip-ak

Conversation

@akeemjenkins

Copy link
Copy Markdown

What

A spec-first draft NIP, in the NIP-AE precedent (#575): Agent Keyrings, kind:30180 — owner-authored, NIP-44-encrypted, addressable events that deliver an agent's credentials (env vars, a subscription OAuth token, MCP server grants, small credential files) wherever its harness runs.

NIP-OA made identity travel. NIP-AE made memory travel. This proposes making the third machine-bound thing travel: with a keyring, a harness holding the agent's key can materialize its full working credential set on any executor (a laptop, a fleet container, a buzz-backend-kubernetes pod), and the machine becomes disposable.

Design highlights

  • Rotation is republication. One blinded address per grant; the newest head is the live credential. The canonical scenario the spec is built around: the owner re-runs /login in Claude Code on their laptop; an owner-side source watcher republishes the sealed head within seconds; every executor converges on push (a live keyring subscription on the same socket as mentions), a mandatory re-query-on-auth-failure rule heals the mid-turn race, and boot-time head fetch collapses any number of missed rotations for offline agents into one head. No catch-up protocol, no user ceremony.
  • Owner-authored only, enforced pre-decryption. Agents consume grants and cannot mint, widen, or re-target them; a dedicated kind (vs. a slug convention on 30174) keeps that authorship rule checkable from kind + author alone. A compromised agent key cannot grant itself anything.
  • The MCP grant list is the agent's tool allowlist, which turns today's out-of-band credential plumbing (wrapper scripts, hand-edited env) into visible, revocable, rotating grants. The client-behavior section sketches the per-agent keyring panel this enables.
  • Blinded addressing per NIP-AE (distinct domain prefix), slug round-trip binding against entry-swapping relays, created_at monotonicity for rollback resistance, tombstone heads for revocation, and a hard rule that the identity key never rides its own keyring.

Kind number

30180, verified unassigned in this repo's kind.rs (30174–30179 are engrams, personas, teams, managed agents, team catalogs, private managed agents) and in the upstream nostr-protocol/nips table as of 2026-08-15. An earlier draft of this spec used 30176 and was renumbered after re-checking against current main — an accidental demonstration of why the registry-first rule in AGENTS.md earns its keep.

Scope of this PR

Docs only — no kind.rs reservation, no implementation. If the direction lands, the natural follow-ups are a buzz keyring CLI surface (pack/grant/rotate/revoke), the harness materialize + heal path in buzz-acp, and the desktop keyring panel with source watchers. Happy to iterate on any of it here.

🤖 Generated with Claude Code

Owner-sealed credential delivery for agents as kind:30180 addressable
events, completing the set NIP-OA (identity travels) and NIP-AE (memory
travels) began: with a keyring, credentials travel too, and the machine
becomes disposable.

Design highlights: entries are authored by the OWNER and consumed by the
agent (a compromised agent key cannot grant itself anything); addresses
are HMAC-blinded per the NIP-AE pattern so relays learn nothing; the MCP
grant list is the agent's tool allowlist; and rotation is republication:
a new head at the same address converges every executor, with a live
subscription for push, a mandatory re-query-on-auth-failure heal for the
race, and boot-time head fetch collapsing any number of missed rotations
for offline agents. Rollback resistance via created_at monotonicity;
revocation as tombstone heads.

Spec-first per the NIP-AE precedent (block#575); no kind.rs reservation in
this PR. kind:30180 verified unassigned in both this registry and the
upstream nostr-protocol/nips table as of 2026-08-15.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Akeem Jenkins <accounts@akeemjenkins.com>
@akeemjenkins
akeemjenkins requested a review from a team as a code owner August 16, 2026 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant