register_agent, the program mints an NFT and creates an on-chain identity account. The NFT mint pubkey is the agent ID — there are no counters, hashes, or separate identifiers.
Because the agent is an NFT, it can be transferred on any Solana marketplace. Whoever holds the NFT owns the agent, controls its configuration, and receives its payment revenue.
How registration works
1
Mint the NFT
The program mints a Metaplex Core NFT to the caller. The collection is set to the x84 protocol collection, and the creator is set to the protocol fee treasury (enabling royalties on secondary sales).
2
Create the identity PDA
An
AgentIdentity account is initialized with the NFT mint as its primary key. The PDA stores metadata pointers, reputation counters, and ownership tracking.3
Pay the registration fee
If the protocol charges a registration fee (currently 0.05 SOL), it is transferred from the caller to the fee treasury via the System Program.
4
Event emitted
An
AgentRegistered event is emitted with the NFT mint, owner, metadata URI, and feedback authority.AgentIdentity PDA
Seeds:[b"agent", nft_mint.as_ref()]
Key fields explained
Metadata URI and hash
Themetadata_uri points to an off-chain JSON file in the A2A Agent Card format. The metadata_hash is a SHA-256 digest of that file’s content, providing an integrity anchor. Consumers can fetch the URI and verify the hash to confirm the metadata has not been tampered with.
Each call to update_agent_metadata sets both a new URI and a new hash.
Tags
Tags are stored as 32-byte SHA-256 hashes on the PDA (not as plain strings). This keeps the on-chain size fixed while allowing arbitrary tag names. The SDK’shashTag utility converts a string like "defi" into its hash representation.
A maximum of 5 tags can be set per agent. Tags are set at registration and can be updated via update_agent_metadata.
Owner version
Theowner_version field starts at 0 and increments every time claim_agent is called (after an NFT transfer). Delegations store the owner_version at creation time and verify it matches the current value when used. If the NFT has been transferred since the delegation was created, the version will not match and the delegation is rejected — no explicit revocation required.
Feedback authority
Thefeedback_authority is a separate keypair from the owner. The agent’s server holds this key to sign feedback authorization messages, so a server compromise does not expose the owner’s wallet key. It can be rotated at any time via set_feedback_authority.
Operations
Register an agent
The
asset keypair is generated by the SDK. Its public key becomes the NFT mint address and therefore the agent ID. You must include it as a signer.Update metadata
Deactivate and reactivate
Claim agent after NFT transfer
When an agent NFT is transferred on a marketplace, the new holder must callclaim_agent to update the on-chain owner and increment owner_version. This instantly invalidates all delegations created by the previous owner.
Set feedback authority
Reading agent data
Registration fee
The protocol charges a one-time registration fee whenregister_agent is called. The fee is transferred in SOL from the caller to the fee_treasury defined in the ProtocolConfig.
The protocol authority can update the fee at any time using
updateConfig. Setting it to 0 effectively makes registration free.