Overview
The OpenAgents CLI exposes offline Nostr utilities. You can:- generate and derive NIP-06 keypairs and BIP39 seeds
- encode/decode NIP-19 entities and NIP-21 nostr: URIs
- sign, verify, hash, serialize, and validate NIP-01 events
- encrypt/decrypt payloads (NIP-04 / NIP-44)
- create/validate delegation and auth helpers (NIP-26 / NIP-42 / NIP-98)
- encrypt/decrypt private keys (NIP-49)
- parse and verify NIP-05 identifiers
- inspect proof-of-work (NIP-13)
nostr namespace of the OpenAgents CLI.
Nostr in OpenAgents
Nostr is the protocol layer for decentralized coordination in OpenAgents. It provides cryptographic identity and a relay-based pub/sub fabric for agent workflows like job requests, results, and capability discovery. Autopilot Desktop currently connects to Codex for run execution, while Nostr is already wired into protocol and market components for marketplace and relay flows. This page documents the offline CLI surface (no relay connections or WebSocket subscriptions). For the broader protocol design, see:Protocol snapshot (OpenAgents view)
- NIP-01: base events, relays, subscriptions
- NIP-42: relay auth to prevent anonymous spam
- NIP-44: encrypted payloads for sensitive data
- NIP-89: provider capability discovery
- NIP-90: job request/result flow (kinds 5050/6050/7000)
- NIP-57: Lightning payments tied to events
- NIP-34: Git collaboration (GitAfter)
- NIP-SA: proposed agent lifecycle events (profiles, ticks, trajectories)
CLI entrypoints
The CLI ships two binaries that behave the same:openagentsoa
oa. If you are running from source:
Command map
oa nostr new|derive|seed|pubkey|encode|decodeoa nostr event sign|verify|hash|validate|serialize|kindoa nostr nip19 encode|decodeoa nostr uri encode|decode|stripoa nostr nip04 encrypt|decryptoa nostr nip44 encrypt|decryptoa nostr nip26 create|verify|validateoa nostr nip42 auth|validateoa nostr nip49 encrypt|decryptoa nostr nip98 create|validate|decodeoa nostr nip05 parse|well-known|verifyoa nostr pow difficulty|check|nonce
Key generation and identity (NIP-06)
Create a new mnemonic + keypair
--words 12|24(default: 12)--account <n>(derivation path:m/44'/1237'/<account>'/0/0)--agent <n>(maps toaccount = agent + 1)--passphrase "..."(optional BIP39 passphrase)--no-mnemonic(hide mnemonic in output)--json(structured output)
Derive from an existing mnemonic
--mnemonic "..."or--stdin(required)--account <n>--agent <n>(maps toaccount = agent + 1)--passphrase "..."--show-mnemonic--json
Derive public key from a secret
Bech32 encoding/decoding (NIP-19)
Encode npub/nsec
--public or only --private.
Decode npub/nsec
--npub or only --nsec.
Encode other NIP-19 entities
npub, nsec, note, nprofile, nevent, naddr.
Decode any NIP-19 entity
nostr: URI helpers (NIP-21)
Events (NIP-01)
Sign an event
Verify an event
Hash/serialize/validate
Classify event kind
Encryption (NIP-04 / NIP-44)
NIP-04 (AES-CBC) encrypted DMs:--pubkey or --npub.
Delegation (NIP-26)
Relay auth events (NIP-42)
Private key encryption (NIP-49)
HTTP auth events (NIP-98)
NIP-05 helpers
.well-known/nostr.json. Provide the response JSON:
Proof-of-work (NIP-13)
Output format
With--json, output is stable and machine-readable.
Example from nostr new:
nostr seed:
Security notes
- Mnemonics and
nsecvalues are full private keys. Store them securely. --no-mnemonicis recommended when recording logs or terminals.- BIP39 passphrases change derived keys; keep them with the mnemonic.
- The CLI is offline-only; it does not contact relays or external services.
NIP-06 compliance
The CLI derives keys according to NIP-06:- BIP39 mnemonic
- Derivation path:
m/44'/1237'/<account>'/0/0
npub/nsec are bech32 encodings per NIP-19.