How permissions flow from human to agent.
Delegation is the cryptographic authorization from a human to their agent. It defines what the agent can do, where it can do it, and for how long.
Your agent cannot act without your explicit, signed permission. You create a delegation event — a NOSTR message signed with your private key — that grants specific powers to your agent.
Permissions flow through a cryptographic chain. Each link is verified independently.
| Who | Keypair | Signs |
|---|---|---|
| Human | Your NOSTR keys | 38250 delegation, 38251 revocation |
| Agent | Derived from leaf_secret | 38101 proof, 38102 auth, 38103 login |
| Enterprise | Enterprise NOSTR keys | 38200 enrollment authorization |
This is the NOSTR event you sign to authorize your agent. It specifies exactly what your agent can do.
{
"kind": 38250,
"pubkey": "<your_npub_hex>",
"tags": [["p", "<agent_npub_hex>"]],
"content": "{
\"agent_npub\": \"npub1abc...\",
\"scopes\": {
\"amazon.com\": [\"read\", \"write\"],
\"acme.com\": [\"read:orders\"]
},
\"expires_at\": \"2027-03-01T00:00:00Z\",
\"delegation_id\": \"del_abc123\"
}",
"sig": "<your_signature>"
}
Level 1: Where — Which enterprises can your agent access?
Your agent can only authenticate to enterprises explicitly listed in the scopes. No wildcards. No defaults.
Level 2: What — What actions at each enterprise?
| Scope | Meaning |
|---|---|
read |
View data only |
write |
Create and modify data |
transact |
Make purchases or financial actions |
admin |
Administrative functions |
full |
All permissions |
Enterprises map these standard scopes to their internal permission systems.
Instantly kill your agent's access. One event, immediate effect.
{
"kind": 38251,
"pubkey": "<your_npub_hex>",
"tags": [["d", "del_abc123"]],
"content": "",
"sig": "<your_signature>"
}
delegation_id in the #d tagBefore trusting your agent, enterprises verify the complete delegation chain.
{"kinds": [38250], "#p": ["<agent_npub>"]}expires_at is in the futuredelegation_id matches the proof eventexpires_at or when a revocation is detected.
Delegations expire. Subscriptions renew monthly. Your agent's identity persists.
expires_at and new delegation_idThe subscription preimage is incorporated into your agent's identity at creation. The Lightning payment isn't just a fee — it's cryptographically fused into your agent's DID.
| Kind | Name | Signed By |
|---|---|---|
38200 |
Enrollment Authorization | Enterprise |
38250 |
Delegation Grant | Human |
38251 |
Revocation | Human |
38101 |
Proof Event | Agent |
38102 |
Auth Complete | Agent |
38103 |
Login Complete | Agent |