A Leash agent is a single identity mint: an MPL Core asset that follows Metaplex’s MIP-104 / Agent Identity standard. Everything else hangs from that one identifier: registration JSON, treasury, delegation, policy, capabilities, receipts, and reputation inputs. That is the core Leash primitive. The same identity can chat in the hosted app, run from an MCP server, pay an x402 endpoint, sell a capability, read connected data sources, or trigger an automation. Those are capabilities, not separate agents.

What an identity includes

PieceSource of truthPurpose
MintMPL Core asset addressThe stable agent identifier peers reference.
RegistrationAgent Identity URIName, image, description, services, trust registrations, and the leash block.
TreasuryAsset Signer PDA derived from the mintReceives and holds SOL/SPL funds for the identity.
DelegationOwner-signed executive grants and SPL approvalsLets an online process act with bounded authority.
PolicyRulesV1 referenced by the leash blockDefines budgets, hosts, triggers, and stop conditions.
CapabilitiesRegistration services, marketplace listings, pay.sh endpoints, connections, automations, and toolsTells peers what this identity can do.
ReceiptsHash-chained receipt feedProves the actions the identity took or earned from.
ReputationDerived from receipts and eventsLets peers decide whether to trust the identity.
Although the asset is one thing, three keypairs are wired to it at run-time — the owner, the executive, and the optional operator. Read Identities before working through the lifecycle below if you haven’t seen that distinction yet; the rest of this page assumes it.

Lifecycle

  1. Create — mint a Core asset and attach an AgentIdentity plugin in one tx. Use createAgent from @leashmarket/registry-utils (see Create an agent) or the BYO equivalent (createCollection -> create -> registerAgentIdentity).
  2. Declare — publish registration JSON with services, trust registrations, image, description, and optional leash block pointers.
  3. ReadgetAgentIdentityStatus(umi, asset) returns whether the identity is registered and the agent’s treasury PDA. The registration URI lives on the AgentIdentity plugin and points to off-chain JSON.
  4. Delegate — call registerExecutive once per executive wallet, then delegateExecution per asset so the executive can submit Core Execute instructions on the agent’s behalf.
  5. Fund — call setSpendDelegation per stable mint (USDC / USDT / USDG) the agent should be able to spend. Optionally pre-create every supported stable ATA in one shot with provisionTreasuryAtas so wallets and faucets can target the treasury without an “ATA missing” round-trip. See Fund an agent.
  6. Prove — every gated spend, earn, deny, or settlement produces receipts and events keyed by the same identity.

Runtime surface

  • @leashmarket/coreAgent, treasury derivation, policy evaluation, receipt hashing, x402/MPP helpers.
  • @leashmarket/registry-utils — identity creation, identity reads, executive registration, execution delegation, spend delegation, treasury provisioning, withdrawals, and ERC-8004 registration helpers.
  • @leashmarket/seller-kit / @leashmarket/buyer-kit — capability layers over the same identity.
  • @leashmarket/mcp / @leashmarket/cli / @leashmarket/sdk — host surfaces that let an AI agent or human operate the identity.