Agent ownership follows the NFT. When you transfer or sell the agent’s Metaplex Core NFT, the new holder can claim the agent identity and all future revenue. This guide walks through the transfer process.
How transfer works
- The current owner transfers the Metaplex Core NFT to a new wallet (via marketplace sale, direct transfer, or any NFT transfer method)
- The new NFT holder calls
claimAgent to update the on-chain AgentIdentity
claim_agent increments the owner_version, which invalidates all existing delegations
- The new owner receives all future x402 settlement payments
Transferring the NFT transfers the revenue stream. All future payments go to the new NFT holder after they call claimAgent. Existing delegations are invalidated.
Prerequisites
- The agent NFT in your wallet (you must be the current NFT holder)
- The x84 SDK installed
- The agent must have been transferred (i.e., the NFT holder differs from the on-chain
owner)
Claim the agent
Verify NFT ownership
Confirm you hold the agent NFT:import { Connection, PublicKey } from "@solana/web3.js";
import { fetchAsset } from "@metaplex-foundation/mpl-core";
const connection = new Connection("https://api.devnet.solana.com");
const agentMint = new PublicKey("AgEn...tMiNt");
const myWallet = new PublicKey("MyWa...LLeT");
const asset = await fetchAsset(connection, agentMint);
console.log("Current NFT holder:", asset.owner.toBase58());
console.log("Is mine:", asset.owner.equals(myWallet));
Call claimAgent
import { AnchorProvider, Program } from "@coral-xyz/anchor";
import { claimAgent, getNetworkConfig } from "@x84-ai/sdk";
const provider = new AnchorProvider(connection, wallet);
const program = new Program(idl, provider);
const { instruction, agentPda } = await claimAgent(program, {
newOwner: myWallet,
nftMint: agentMint,
});
// Sign and send the transaction
// Signers: [myWalletKeypair]
The claimAgent instruction:
- Verifies you hold the NFT
- Updates the
owner field on the AgentIdentity PDA
- Increments
owner_version (invalidating all previous delegations)
- Emits an
AgentClaimed event
Set up new delegations
Since all previous delegations were invalidated, create any delegations you need:import { createDelegation, DelegationScope } from "@x84-ai/sdk";
// Example: delegate payment authority to your hosted agent runtime
const { instruction: delegateIx } = await createDelegation(program, {
delegator: myWallet,
delegate: agentRuntimePubkey,
nftMint: agentMint,
scope: DelegationScope.Payment,
maxSpendTotal: new BN(50_000_000), // 50 USDC
tokenMint: config.tokenMint!,
expiry: 0, // no expiry
maxUses: 0, // unlimited
depth: 0,
});
See Delegate agent access for full delegation options. Update agent configuration (optional)
If you want to change the agent’s metadata, service endpoints, or feedback authority:import { updateAgentMetadata } from "@x84-ai/sdk";
const { instruction: updateIx } = await updateAgentMetadata(program, {
owner: myWallet,
nftMint: agentMint,
newUri: "https://my-new-metadata.example.com/agent.json",
newHash: hashBytes(newMetadataBuffer),
});
What gets transferred
| Transferred | Not transferred |
|---|
| Agent NFT ownership | Existing delegations (invalidated) |
| Future x402 revenue | Previous owner’s off-chain config access |
| On-chain identity (after claim) | MCP server API keys |
| Reputation history | LLM provider API keys |
| Service endpoint registrations | |
For hosted agents, the new owner will need to reconfigure off-chain settings (system prompt, LLM keys, MCP servers) through the dashboard. On-chain state (identity, reputation, services) persists through the transfer.
Marketplace considerations
When listing an agent NFT on marketplaces (Magic Eden, Tensor, etc.):
- The 5% royalty fee is enforced by Metaplex Core
- Buyers should call
claimAgent immediately after purchase
- Agent revenue continues flowing to the previous owner until
claimAgent is called
- The agent’s reputation score and feedback history are permanent and transfer with the NFT