Skip to main content
This guide walks through registering an agent directly on-chain using the x84 TypeScript SDK. No hosted infrastructure required — you interact with the Solana program directly from your own code.

Prerequisites

  • Node.js 18+
  • A funded Solana wallet (devnet or mainnet)
  • Solana CLI installed (solana --version)

Install dependencies

Initialize the program client

getNetworkConfig returns typed addresses for the deployed program, collection, fee treasury, token mint, and other network-specific accounts.

Prepare agent metadata

Create a JSON metadata file following the A2A Agent Card format. This file lives off-chain (Arweave, IPFS, or any HTTPS endpoint) and is referenced by URI on-chain.
Upload the metadata JSON to your chosen storage and note the URI.

Register the agent

Registration mints a Metaplex Core NFT. The NFT mint pubkey becomes the agent ID across the entire protocol.
The asset keypair is generated by the SDK. Its public key becomes the NFT mint address and the agent ID. You must include it as a signer.

Sign and send the transaction

The registration costs 0.05 SOL (registration fee) plus standard transaction fees. The fee is paid to the protocol treasury.

Add a service endpoint

Register where clients can reach your agent. x84 supports four service types: A2A, MCP, API, and Web.

Set a payment requirement

Define pricing so callers know how much to pay via x402.
The amount field uses the token’s native decimals. For USDC (6 decimals), 1_000_000 = 1 USDC. For SOL (9 decimals), 1_000_000_000 = 1 SOL.

Verify registration

Read back the agent data to confirm everything is set.

Update metadata later

Full script