Getting Started

Register an Agent

Last updated March 11, 2026

Register an agent on Solana by binding an identity record to an MPL Core asset.

What You'll Learn

This guide shows you how to register an agent with:

  • An identity record linked to an MPL Core asset
  • A PDA (Program Derived Address) that makes the agent discoverable on-chain
  • An AgentIdentity plugin with lifecycle hooks for Transfer, Update, and Execute

Prerequisites

You need an MPL Core asset before registering. If you don't already have one, see Create an NFT. You can learn more about the identity program in the MPL Agent Registry docs.

Register an Agent

When you register an agent, the registry program creates a PDA derived from the asset's public key. This makes agents discoverable — anyone can derive the PDA from an asset address and check if it has a registered identity.

import { createUmi } from '@metaplex-foundation/umi-bundle-defaults';
import { mplAgentIdentity } from '@metaplex-foundation/mpl-agent-registry';
import { registerIdentityV1 } from '@metaplex-foundation/mpl-agent-registry';
const umi = createUmi('https://api.mainnet-beta.solana.com')
.use(mplAgentIdentity());
await registerIdentityV1(umi, {
asset: assetPublicKey,
collection: collectionPublicKey,
agentRegistrationUri: 'https://example.com/agent-registration.json',
}).sendAndConfirm(umi);

Parameters

ParameterDescription
assetThe MPL Core asset to register
collectionThe asset's collection (optional)
agentRegistrationUriURI pointing to off-chain agent registration metadata
payerPays for rent and fees (defaults to umi.payer)
authorityCollection authority (defaults to payer)

Agent Registration Document

The agentRegistrationUri should point to a JSON document that describes the agent's identity, services, and metadata. This follows the ERC-8004 agent registration standard adapted for Solana. You need to upload the JSON and any associated image so that they are accessible from everywhere. We recommend using a web3 storage provider like Arweave. If you want to upload by code you can follow this guide.

{
"type": "agent-registration-v1",
"name": "Plexpert",
"description": "An informational agent providing help related to Metaplex protocols and tools.",
"image": "https://arweave.net/agent-avatar-tx-hash",
"services": [
{
"name": "web",
"endpoint": "https://metaplex.com/agent/<ASSET_PUBKEY>"
},
{
"name": "A2A",
"endpoint": "https://metaplex.com/agent/<ASSET_PUBKEY>/agent-card.json",
"version": "0.3.0"
},
{
"name": "MCP",
"endpoint": "https://metaplex.com/agent/<ASSET_PUBKEY>/mcp",
"version": "2025-06-18"
}
],
"active": true,
"registrations": [
{
"agentId": "AgentAssetPublicKey111111111111111111111111111",
"agentRegistry": "solana:mainnet:1DREGFgysWYxLnRnKQnwrxnJQeSMk2HmGaC6whw2B2p"
}
],
"supportedTrust": [
"reputation",
"crypto-economic"
]
}

Fields

FieldRequiredDescription
typeYesSchema identifier. Use agent-registration-v1.
nameYesHuman-readable agent name
descriptionYesNatural language description of the agent — what it does, how it works, and how to interact with it
imageYesAvatar or logo URI
servicesNoArray of service endpoints the agent exposes (see below)
activeNoWhether the agent is currently active (true/false)
registrationsNoArray of on-chain registrations linking back to this agent's identity
supportedTrustNoTrust models the agent supports (e.g. reputation, crypto-economic, tee-attestation)

Services

Each entry in the services array describes a way to interact with the agent:

FieldRequiredDescription
nameYesService type — e.g. web, A2A, MCP, OASF, DID, email
endpointYesURL or identifier where the service can be reached
versionNoProtocol version
skillsNoArray of skills the agent exposes through this service
domainsNoArray of domains the agent operates in

Registrations

Each entry in the registrations array links back to an on-chain identity record:

FieldRequiredDescription
agentIdYesThe agent's on-chain asset public key
agentRegistryYesRegistry address in {namespace}:{chainId}:{programId} format

Verify Registration

import { fetchAsset } from '@metaplex-foundation/mpl-core';
const assetData = await fetchAsset(umi, assetPublicKey);
// Check the AgentIdentity plugin
const agentIdentity = assetData.agentIdentities?.[0];
console.log(agentIdentity?.uri); // your registration URI
console.log(agentIdentity?.lifecycleChecks?.transfer); // truthy
console.log(agentIdentity?.lifecycleChecks?.update); // truthy
console.log(agentIdentity?.lifecycleChecks?.execute); // truthy

Full Example

import { generateSigner } from '@metaplex-foundation/umi';
import { create, createCollection } from '@metaplex-foundation/mpl-core';
import { registerIdentityV1 } from '@metaplex-foundation/mpl-agent-registry';
// 1. Create an asset (if it doesn't already exist)
const asset = generateSigner(umi);
await create(umi, {
asset,
name: 'My Agent',
uri: 'https://example.com/agent.json',
collection,
}).sendAndConfirm(umi);
// 2. Register identity
await registerIdentityV1(umi, {
asset: asset.publicKey,
collection: collection.publicKey,
agentRegistrationUri: 'https://example.com/agent-registration.json',
}).sendAndConfirm(umi);
Previous
Overview