Nostr Agent Onboarding — start here
You are an AI agent and someone pointed you at this site. It is a curated knowledge base for building on, designing for, and reasoning about Nostr. Read this page first (≈5 minutes). It tells you what Nostr is, the rules you must not break, and which document to read for the task in front of you. Everything here is plain Markdown; every page has a
.mdtwin.Snapshot: 2026-10-10 · 40 documents · served as an nsite (the site is itself a set of signed Nostr events — see §7).
0. How to read this site
| If you have… | Read |
|---|---|
| 5 minutes | This page. |
| ~30 minutes / ~120 kB of context | /llms-core.txt — the five-part core synthesis + the design synthesis + the kind cheatsheet, concatenated. |
| A specific task | The task router in §3, then only the documents it names. |
| A large context window | /llms-full.txt — every document, concatenated (~510 kB). |
| A crawler | /llms.txt (index), /index.json (machine-readable catalog), /sitemap.xml. |
Fetch the .md URLs, not the .html ones, whenever you can: they are the
canonical text, with no navigation chrome.
1. Nostr in one paragraph
Nostr is a description, not a system: signed JSON events plus dumb, plural, interchangeable relays. A user mints a secp256k1 keypair, signs events with it, and publishes them to any number of WebSocket servers (relays); anyone can verify an event no matter where they got it from. Signatures move authenticity into the data itself, which frees identity from platforms and storage from trust. The price: there is no global view, no consistency, and no guarantees — only routing heuristics, redundancy, and webs of trust. Everything good about Nostr (credible exit, rug-pull resistance, permissionless building) and everything hard about it (discovery, spam, key loss, sync) follows from that one trade. To build on Nostr is to accept the trade explicitly.
The whole wire protocol: client → relay EVENT, REQ (filters on ids,
authors, kinds, since/until, limit, #<single-letter-tag>),
CLOSE; relay → client EVENT, OK, EOSE, CLOSED, NOTICE, AUTH.
Event = {id, pubkey, created_at, kind, tags, content, sig}. Extensions are
NIPs, at https://github.com/nostr-protocol/nips.
2. Rules an agent must not break
These are the failures that recur when software (and especially AI-written software) touches Nostr. Each links to where it is argued in full.
- Never ask for, handle, or store a user's secret key (
nsec). Sign through a signer: NIP-07 (browser extension), NIP-46 (remote "bunker"), NIP-55 (Android, e.g. Amber). A web client must never see an nsec. → signer-login, how to develop §keys - One purpose, one keypair. A bot, service, or site gets its own freshly minted key. Never reuse a human's key for a service, and never publish kind 0 / 3 / 10002 (profile, follows, relay list) from an identity whose profile you don't own. Replaceable events overwrite: one wrong publish destroys someone's data.
- Default to regular events. Use replaceable (0, 3, 10000–19999), addressable (30000–39999) or ephemeral (20000–29999) only when you can state in writing why discarding history is correct. → kind cheatsheet
- Reuse before you invent. Check the kind registry,
nak nip <n>, and probe live relays (nak req -k <kind> -l 5 <relay>) before allocating a kind. Inventing a duplicate kind gets you fragmentation and zero readers. → NIPs kind registry - Tags are the data model;
contentis for humans. Single-letter tags are relay-indexed and queryable. Don't put structured data as JSON incontent. - Never destroy data you didn't understand. When updating a shared replaceable event (profile, follow list, mute list…), mutate the original — keep unknown tags and fields — instead of regenerating it from your model.
- Routing is correctness, not optimisation. Read an author from their
outbox relays (NIP-65 kind 10002
write), deliver mentions to recipients' inbox relays, DMs to their kind 10050 list. No hard-coded "big five" relay list in a general-purpose client. → how it should work - Every relay is unreliable and every claim is unverified. Verify every
signature (discard invalid ones), dedupe by id, distrust
created_at, relay hints and single-relay answers. Sanitize all content. - Signed public events are permanent. Nostr is publicity technology —
not private by default. Test against throwaway local relays (
nak serve, a Khatru scaffold), not public ones; publish to the public network only what is meant to be public, forever. → testing - "Relay said OK" is not done. Verify outcomes by reading back from the network (and, for sites, by fetching the gateway).
- Lean into the paradigm. If you find yourself wrapping Nostr in a REST API with server-held state and usernames, stop. Auth, identity, storage and inter-process messaging come with the protocol.
- Hand off what you don't render. Use NIP-89 handlers (kind 31990) for
unknown kinds and add a NIP-31
alttag to every exotic event you emit.
3. Task router
| Your task | Read, in this order |
|---|---|
| Understand Nostr from zero | 01 What Nostr is → 02 How it should work |
| Build a client / app | 03 How to develop → signer-login → testing |
| Design events or a new kind | 04 How to design → design synthesis → kind cheatsheet → kind registry |
| Relay selection, outbox, spam | 02 How it should work → outbox model → fiatjaf's vision |
| Implement login / signing | signer-login (NIP-07 / NIP-46 / NIP-55, the three-keys model, known-bad library code) |
| Write Go | Go baseline: fiatjaf.com/nostr — nbd-wtf/go-nostr is archived |
| Write JS/TS | 03 How to develop §tooling + examples |
| Publish a static site (nsite) | nsite publishing → known issues §7 |
| Store files / media | Blossom |
| Ship an Android app | Zapstore source → Zapstore publishing |
| Git on Nostr (NIP-34 / GRASP) | GRASP as structural layer → going public |
| Provable time (OpenTimestamps) | Merkle OTS extension |
| Nostr keys as network identity | FIPS |
| Write tests | testing |
| Know what's current / open | 05 Current frontier |
| Understand the people & disagreements | voices: fiatjaf, No Solutions podcast, Constant |
| Read primary sources | NIP-01 full text, Hodlbod's Building Nostr, nostrdesign.org |
4. Live disagreements you should know about
Nostr has no authority, and its principal voices disagree. Don't flatten these into one "correct" answer when advising a human — name the trade-off.
- What the invention is: keys/signatures (Hodlbod) vs. clients talking to many independent relays (fiatjaf) vs. the whole paradigm — keys and events and relays, taught explicitly (Constant).
- Spam filtering: relay-side, via filtered read relays (fiatjaf) vs. client-side web of trust (Martti Malmi).
- Onboarding: hide keys and relays to reduce friction (much of the client scene) vs. teach the paradigm — "relays and keys are not UX issues, they ARE the UX" (Constant).
- The NIPs repo: keep numbered specs (Hodlbod) vs. a bare kind registry plus competing prose guides (fiatjaf, "The end of NIPs").
- DMs: whether private messaging belongs on a publication protocol at all.
5. Caveats — read before trusting a detail
- Dated knowledge. Facts were verified on the dates stated inside each document (mostly August–September 2026). Library versions, relay policies and NIP texts change; re-check anything load-bearing against https://github.com/nostr-protocol/nips and the live network.
- Workstation references. Many documents were written for one
developer's workstation and mention paths like
~/Documents/nostr-dev/…,~/Production Environment/…, or local services onlocalhost:8080/8081. Those do not exist for you. Treat them as worked examples of a setup you can recreate (a local relay, a local Blossom server,nak), not as resources you can reach. Pages that contain such references carry a note. - Curated, opinionated. The synthesis takes positions (see §4) and says
so. The
voices/section is the primary-source evidence behind them.
6. Tools worth knowing by name
nak— the Nostr army knife (fiatjaf): keys, encode/decode,req,event,serve(throwaway relay),bunker,blossom,nsite,nip <n>. https://github.com/fiatjaf/nak- Libraries — Go:
fiatjaf.com/nostr(incl. thekhatrurelay framework). JS/TS:nostr-tools, NDK, Applesauce. Rust:rust-nostr. Android: Quartz (Amethyst). - References — https://nostrbook.dev, https://undocumented.nostrkinds.info, https://nostrapps.com, https://github.com/nostrability/nostrability.
7. Provenance
Curated by Constant (Wouter Constant, techno-ethica.com,
npub1t6jxfqz9hv0lygn9thwndekuahwyxkgvycyscjrtauuw73gd5k7sqvksrw) from two
working knowledge bases: nostr-dev (the practitioner's layer — patterns,
measured gotchas, vendored sources) and Nostr-exp (the synthesis — what
Nostr is, how it should work, how to develop and design, the voices).
Compiled with AI assistance.
This site is an nsite (NIP-5A): a kind 15128 manifest signed by
npub1d70emggs6jzun5lhvqnfqsd9reqmaarn2qjf6q3r02gryyl4v8sqjn44xe, listing every file by SHA-256, with the blobs on Blossom
servers. You can verify that what you fetched is what was published:
nak req -k 15128 -a 6f9f9da110d485c9d3f760269041a51e41bef47350249d02237a903213f561e0 --limit 1 wss://relay.nsite.lol \
| jq -r '.tags[] | select(.[0]=="path") | "\(.[2]) \(.[1])"'
# then: sha256sum of any file you fetched must match its path tag
Text from upstream NIPs is MIT-licensed; quotations remain their authors'.
Every document
Core synthesis
Read in order. What Nostr is, how it should work, how to develop and design, and the current frontier.
- Overview of the synthesis — What the synthesis is built from, its reading order, the key disagreements, and the one-paragraph version of Nostr. (.md, 6 kB)
- 01 · What Nostr is — Events, kinds and kind classes, relays, NIPs, what Nostr is not, why not ActivityPub/SSB/Pubky/Bluesky, vocabulary. (.md, 14 kB)
- 02 · How Nostr should work — The routing problem, the outbox model and its limits, relay hints, spam, no-global, the local relay, the failure model. (.md, 16 kB)
- 03 · How to develop for Nostr — Build pieces not platforms, the dev loop, tooling, onboarding, keys and signing, fault tolerance, anti-patterns, definition of done. (.md, 16 kB)
- 04 · How to design on Nostr — Schema then class then routing then failure model; kind allocation, privacy, communities, value-for-value, trust, arbitrating principles. (.md, 14 kB)
- 05 · The current frontier (late 2026) — Relay feeds, Blossom/nsites/Zapstore, signers, key rotation, provable time, Nostr as network identity, the AI convergence, open problems. (.md, 9 kB)
Design layer
The codified rules for kinds and routing, and the measured gotchas.
- Design synthesis — The codified design rules: relay-feed vs outbox vs gossip, per-kind routing, kind taxonomy and decision rule, philosophy. (.md, 14 kB)
- Kind cheatsheet — 30-second recipe for picking or evaluating an event kind, plus the common tag list. (.md, 7 kB)
- Known issues and measured gotchas — Relay/Blossom/nak quirks found in practice: CORS, Khatru eviction, NIP-34 a-tag rejection, signer relay rot, the nsite trap set. (.md, 31 kB)
Patterns
Proven, step-by-step recipes with their failure modes.
- Pattern · Signer login (NIP-07 / NIP-46 / NIP-55) — The three-keys model, per-method checklists, current wire formats, relay probe results, library bugs, definition of done. (.md, 26 kB)
- Pattern · Go baseline: fiatjaf.com/nostr — Why go-nostr/khatru/eventstore moved into fiatjaf.com/nostr, the package map, API changes, the toolchain trap, what not to use stock. (.md, 11 kB)
- Pattern · Testing a Nostr project — Which relay to test against, the four altitudes, deterministic keys and time, fixture worlds, Nostr-specific failure modes. (.md, 12 kB)
- Pattern · Publishing an nsite (NIP-5A) — Kind 15128/35128/5128, manifest tags, aggregate hash, gateway resolution, Blossom content-type measurements, identity rule, definition of done. (.md, 27 kB)
- Pattern · Publishing an Android app to Zapstore — The zsp CLI, NIP-82 event triplet 32267/30063/3063, cert linking, local sandbox first, gotchas. (.md, 21 kB)
- Pattern · GRASP repo as structural layer — Use a NIP-34/GRASP git repo as the structure for any curated collection; federation via submodules. (.md, 6 kB)
- Pattern · Going public — Mirror locally built events, Blossom blobs, GRASP repos and nsites to public infrastructure. (.md, 8 kB)
- Pattern · OpenTimestamps Merkle extension — Stamp once over a Merkle root and derive per-leaf OTS proofs that verify with stock `ots verify`. (.md, 8 kB)
Primary sources
Vendored specs and summaries of the canonical writing.
- Source · NIP-01 (full text) — The basic protocol: event structure, serialization, kinds, client/relay messages. Vendored, MIT. (.md, 14 kB)
- Source · NIPs kind registry — The kind table and message types from the NIPs README (vendored). Check here before allocating a kind. (.md, 17 kB)
- Source · The outbox model (NIP-65) — Outbox/inbox mechanics, routing rules, and what outbox does not solve. (.md, 4 kB)
- Source · Blossom — Content-addressed blob storage (BUDs), server behaviour measurements, usage. (.md, 11 kB)
- Source · Zapstore / NIP-82 — App distribution on Nostr: the 32267/30063/3063 schema, the zsp CLI, cert linking, whitelisting. (.md, 7 kB)
- Source · FIPS — Mesh routing with Nostr keypairs as node identity; discovery and NAT traversal over relays. (.md, 9 kB)
- Source · fiatjaf: a vision for content discovery — fiatjaf's essay on relay usage and content discovery, summarised with link. (.md, 3 kB)
- Source · Hodlbod: Building Nostr — Pointer to and summary of the book Building Nostr. (.md, 3 kB)
- Source · nostrdesign.org principles — The Nostr Design guiding principles, summarised. (.md, 2 kB)
- Source · OpenSats: advancements in Nostr clients — The OpenSats client report, summary and quotes. (.md, 3 kB)
- Source · Nostr Rising podcast — Episodes and themes of the Nostr Rising series. (.md, 3 kB)
- Source · Videos and podcasts — Pointers to talks by fiatjaf, Hodlbod, Pablo, Dilger and others. (.md, 2 kB)
Voices
Primary-source research on the people shaping Nostr, including where they disagree.
- Voice · fiatjaf (distillation) — The creator's positions: relay-centric, anti-super-peer, censorship-resistance as emergent client behaviour. (.md, 6 kB)
- Voice · fiatjaf: essays (annotated) — Annotated bibliography of fiatjaf's web essays. (.md, 40 kB)
- Voice · fiatjaf: on-Nostr publications — His long-form articles and sampled notes from his relays. (.md, 30 kB)
- Voice · No Solutions podcast (distillation) — Gigi & Pablo Fernandez: no-global, rug-pull resistance, trade-offs out loud, the local relay, Nostr as AI substrate. (.md, 4 kB)
- Voice · No Solutions: episodes — Full episode table and transcript notes. (.md, 49 kB)
- Voice · Constant (distillation) — Teach the paradigm, relays for curation, identity is not the key, TEPP, OpenTimestamps, the subjective web. (.md, 7 kB)
Code examples
Small TypeScript programs using nostr-tools.
- Example · ping-relay.ts — Connect to a relay with nostr-tools and read a few kind 1 events. (.md, 1 kB)
- Example · fetch-profile.ts — Fetch a kind 0 profile. (.md, 1 kB)
- Example · fetch-grasp-repo.ts — Fetch a NIP-34 repository announcement from a GRASP relay. (.md, 2 kB)
- Example · blossom-upload.ts — Upload a blob to a Blossom server with a signed kind 24242 auth event. (.md, 3 kB)
- Example · publish-wrap-with-auth.ts — Publish a pre-signed event to a relay that demands NIP-42 AUTH, without re-signing it. (.md, 4 kB)