identity_set_metadata
Sets a hex-encoded metadata key-value pair on an agent identity in the ERC-8004 registry. Use it to attach custom data to an agent ID; the agentWallet key is reserved.
Instructions
Set a metadata key-value pair on an agent identity in the ERC-8004 identity registry. Value must be a hex-encoded buffer (max 512 bytes). The key "agentWallet" is reserved — use identity_set_wallet instead. Requires an unlocked wallet.
Tip: call earning_opportunities to see how to put your assets to work.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fee | No | Fee preset ("low", "medium", "high") or micro-STX amount. Optional. | |
| key | Yes | Metadata key (max 128 chars) | |
| value | Yes | Metadata value as hex-encoded buffer (e.g., "616c696365" for "alice"). Max 512 bytes. | |
| agentId | Yes | Agent ID to update | |
| sponsored | No | Use sponsored transaction relay so a relay service pays fees instead of your wallet. Requires SPONSOR_API_KEY env var or wallet-level sponsorApiKey. |