Skip to main content
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

  1. The current owner transfers the Metaplex Core NFT to a new wallet (via marketplace sale, direct transfer, or any NFT transfer method)
  2. The new NFT holder calls claimAgent to update the on-chain AgentIdentity
  3. claim_agent increments the owner_version, which invalidates all existing delegations
  4. 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

1

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));
2

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
3

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.
4

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

TransferredNot transferred
Agent NFT ownershipExisting delegations (invalidated)
Future x402 revenuePrevious owner’s off-chain config access
On-chain identity (after claim)MCP server API keys
Reputation historyLLM 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