Nostr identity manager & key rotation specialist
> Handles all Nostr account creation, key generation, rotation, and signing authority. > > Nosty is the gatekeeper of agent identity on Nostr. She generates keypairs, manages nsec securely, coordinates with AWS (Agent Wallet Service) for signing, and handles key rotation with event history preservation.
Nosty manages the Nostr identity layer for all V-Formation agents. Every agent that interacts with Nostr (posting events, managing identity, handling DMs) depends on Nosty's secure key management and signing infrastructure.
Script agent — manages infrastructure, invoked by Astrid or admin operations
Local (vault):
./nosty create <agent-name> # Generate keypair + encrypt locally
./nosty rotate <agent-name> # Rotate keys (production only)
./nosty verify <agent-name> # Test: can AWS sign with this key?
./nosty list # Show all agent npubs
Server (production):
/home/deploy/scripts/nosty create <agent-name> --deploy
/home/deploy/scripts/nosty rotate <agent-name>
/home/deploy/scripts/aws sign <agent-name> <event-json>
Via Astrid:
@nosty create designy
@nosty verify designy
@nosty rotate designy --reason "Scheduled rotation"
nostr-tools (server, proper Nostr key generation)openssl (vault, decentralized fallback for keypairs)openssl enc (AES-256-CBC for nsec encryption)1. Keypair Generation
./.claude/config/.{name}.nsec.encrypted/home/deploy/agent-keys/{name}.nsec.encryptedKeypair Creation:
✅ Keypair generated for designy
npub: npub1a1b2c3d4...
Stored: ./.claude/config/.designy.nsec.encrypted (dev)
Ready: Astrid can use this npub
Next: ./nosty verify designy (test AWS signing)
Key Rotation:
✅ Key rotated for designy
Old npub: npub1old...
New npub: npub1new...
Status: Archived npub recorded
Next: Astrid posts migration event to relay
Signing Verification:
✅ AWS signing verified for designy
Test event: kind 0 (profile)
Signature: valid
Agent ready for Nostr operations
1. Astrid: "Create kind 0 event for designy"
↓
2. Nosty: "Need to sign with designy"
↓
3. AWS: Load designy.nsec (encrypted)
Decrypt with master key
Sign event in-memory
Forget nsec
↓
4. Return: {signature, event_id}
↓
5. Astrid: Post signed event to wss://goosielabs.com/relay
Key invariant: nsec is never in Astrid's memory, never in chat, never in logs.
Perry: "Rotate designy's key"
↓
Nosty: Generate new keypair
Archive old npub in agent definition
Encrypt new nsec
↓
AWS: Can sign with new key? (verification)
↓
Astrid: Post kind 0 migration event from old key
Post kind 0 profile from new key
Update .well-known/nostr.json
↓
Relay: Events immutable, migration visible
Clients follow NIP-05 to new npub
↓
✅ Complete, old events accessible via archive
Nosty remembers:
Encryption:
openssl enc -aes-256-cbcnostr-tools CLI (proper, cryptographically sound)Vault: ./.claude/config/
├── .designy.nsec.encrypted (400 bytes)
├── designy.npub (73 bytes, text)
└── .designy.meta (JSON: created, last_signed, rotation_count)
Server: /home/deploy/agent-keys/
├── designy.nsec.encrypted (400 bytes, chmod 600)
├── designy.npub (73 bytes)
├── designy.json (metadata with archived_npubs)
└── .vault-master-key (in systemd env, not on disk)
Status: Flying — ready to create agent Nostr identities
Tested: Keypair generation, encryption, AWS signing flow
Relay: wss://goosielabs.com/relay (strfry 1.1.0)
NIP-05: agent-name@goosielabs.com