Agents

POSTMint Agent

Last updated August 1, 2026

Build a transaction that mints an MPL Core asset for your agent and registers its identity with the Agent Registry in one step. The API stores the agent metadata off-chain and returns a partially signed transaction for the wallet to co-sign as payer.

Summary

This is the endpoint behind the Mint an Agent guide.

  • Creates the Core asset and calls registerIdentity in a single transaction
  • The asset keypair is generated server-side and pre-signed, so the response includes the final assetAddress
  • Stores the EIP-8004 metadata and a hosted A2A AgentCard (yours, or synthesized from the metadata)
  • The caller's wallet signs as payer and submits the transaction

Quick Reference

ItemValue
MethodPOST
Path/agents/mint
AuthNone
ResponseSerialized transaction + assetAddress

Endpoint

POST /agents/mint

Request Body

FieldTypeRequiredDescription
walletstringYesWallet that will pay for and own the agent (base58).
networkstringYessolana-mainnet or solana-devnet.
namestringYesAgent name for the Core asset.
uristringYesURI of the asset's off-chain JSON metadata.
agentMetadataobjectYesEIP-8004 agent registration JSON (name, description, image, services, registrations, active, …).
collectionAddressstringNoCore collection to mint the agent into.
a2aCardobjectNoPre-built A2A AgentCard. When omitted, one is synthesized from agentMetadata.

Example Request

curl -X POST "https://api.metaplex.com/v1/agents/mint" \
-H "Content-Type: application/json" \
-d '{
"wallet": "4Nd1mYvJ9jVexjIXG5oJhanoGWyF7Cz6XkY8dEc4RsyG",
"network": "solana-devnet",
"name": "Example Agent",
"uri": "https://example.com/agent-metadata.json",
"agentMetadata": {
"name": "Example Agent",
"description": "An autonomous trading agent.",
"active": true,
"services": [],
"registrations": []
}
}'

Response

{
"success": true,
"tx": "<base64-encoded partially signed transaction>",
"blockhash": {
"blockhash": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
"lastValidBlockHeight": 123456789
},
"assetAddress": "7nE9GvcwsqzYcPUYfm5gxzCKfmPqi68FM7gPaSfG6EQN"
}

Signing and Submitting

The returned transaction is already signed by the asset keypair; your wallet co-signs as payer and submits:

import { base64 } from "@metaplex-foundation/umi/serializers";
const res = await fetch("https://api.metaplex.com/v1/agents/mint", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(input),
});
const result = await res.json();
if (!result.success) throw new Error(result.error);
const tx = umi.transactions.deserialize(base64.serialize(result.tx));
const signed = await umi.identity.signTransaction(tx);
await umi.rpc.sendTransaction(signed);

Errors

StatusBodyMeaning
400{ "success": false, "error": "Invalid input data", "details": [...] }Request body failed validation; details lists the issues.
400{ "success": false, "error": "<message>" }Build failure (e.g. collection not found).
500{ "success": false, "error": "Failed to prepare mint agent" }Server error.

Notes

  • The Metaplex registry entry (solana:101:metaplex) is automatically added to the front of agentMetadata.registrations.
  • A hosted A2A service entry is spliced into services[] so EIP-8004 consumers can discover the AgentCard endpoint; this is a no-op if you already authored one.
  • The agent record is stored when you call this endpoint, but it only appears in List Agents once the signed transaction has been confirmed and indexed.
  • For a guided walkthrough with the SDK, see Mint an Agent.