Programs

Agent Tools

Last updated June 2, 2026

The Agent Tools program manages executive delegation for agent assets, allowing asset owners to delegate execution permissions to executive profiles and revoke them.

Summary

The Agent Tools program (TLREGni9ZEyGC3vnPZtqUh95xQ8oPqJSvNjvB7FGK8S) provides three instructions for managing execution delegation: RegisterExecutiveV1 creates an executive profile, DelegateExecutionV1 grants that profile permission to execute on behalf of an agent asset, and RevokeExecutionV1 closes that delegation.

  • Three instructionsRegisterExecutiveV1 (one-time profile setup), DelegateExecutionV1 (per-asset delegation), and RevokeExecutionV1 (per-asset revocation)
  • ExecutiveProfileV1 — 40-byte PDA derived from ["executive_profile", <authority>], one per wallet
  • ExecutionDelegateRecordV1 — 104-byte PDA linking an executive profile to a specific agent asset
  • Owner-only delegation — only the asset owner can create delegation records; the program validates ownership on-chain
  • Owner or executive revocation — either the asset owner or the executive authority on the record can sign RevokeExecutionV1; an executive can step down without owner involvement
  • Arbitrary execution authority — an active execution delegate may cause the agent's Asset Signer PDA to sign any instruction passed through Core's Execute hook; see Security model

Program ID

The same program address is deployed on both Mainnet and Devnet.

NetworkAddress
MainnetTLREGni9ZEyGC3vnPZtqUh95xQ8oPqJSvNjvB7FGK8S
DevnetTLREGni9ZEyGC3vnPZtqUh95xQ8oPqJSvNjvB7FGK8S

Overview

The tools program provides three instructions:

  1. RegisterExecutiveV1 — Create an executive profile that can act as an executor for agent assets
  2. DelegateExecutionV1 — Grant an executive profile permission to execute on behalf of an agent asset
  3. RevokeExecutionV1 — Close a delegation record, ending that executive's ability to trigger future executions for the agent asset

An executive profile is registered once per authority. Delegation is per asset — an asset owner creates a delegation record linking their agent asset to a specific executive profile, and may revoke that record at any time.

Instruction: RegisterExecutiveV1

Creates an executive profile PDA for the given authority.

Accounts

Four accounts are required: the profile PDA to create, a payer, an optional authority, and the system program.

AccountWritableSignerOptionalDescription
executiveProfileYesNoNoPDA to be created (auto-derived from authority)
payerYesYesNoPays for account rent and fees
authorityNoYesYesThe authority for this executive profile (defaults to payer)
systemProgramNoNoNoSystem program

What It Does

  1. Derives a PDA from seeds ["executive_profile", <authority>]
  2. Validates the account is uninitialized
  3. Creates and initializes the ExecutiveProfileV1 account (40 bytes) storing the authority

Instruction: DelegateExecutionV1

Delegates execution permission for an agent asset to an executive profile.

Accounts

Seven accounts are required, including the executive profile, the agent asset, its identity PDA, and the delegation record PDA to create.

AccountWritableSignerOptionalDescription
executiveProfileNoNoNoThe registered executive profile
agentAssetNoNoNoThe MPL Core asset to delegate
agentIdentityNoNoNoThe agent identity PDA for the asset
executionDelegateRecordYesNoNoPDA to be created (auto-derived)
payerYesYesNoPays for account rent and fees
authorityNoYesYesMust be the asset owner (defaults to payer)
systemProgramNoNoNoSystem program

What It Does

  1. Validates the executive profile exists and is initialized
  2. Validates the agent asset is a valid MPL Core asset
  3. Validates the agent identity is registered for the asset
  4. Validates the signer is the asset owner
  5. Derives a PDA from seeds ["execution_delegate_record", <executive_profile>, <agent_asset>]
  6. Creates and initializes the ExecutionDelegateRecordV1 account (104 bytes)

Instruction: RevokeExecutionV1

Closes an ExecutionDelegateRecordV1, ending the executive's ability to trigger future Execute calls for the agent asset through the AgentIdentity path. Either the asset owner or the executive authority recorded on the delegation can revoke.

Accounts

Six accounts are required. The delegation record PDA is closed and its rent is refunded to destination.

AccountWritableSignerOptionalDescription
executionDelegateRecordYesNoNoThe delegation record PDA to close
agentAssetNoNoNoThe MPL Core asset whose delegation is being closed (must match the record)
destinationYesNoNoReceives reclaimed rent from the closed delegation record
payerYesYesNoPays for transaction fees (defaults to umi.payer)
authorityNoYesYesMust be the asset owner or the executive authority on the record (defaults to payer)
systemProgramNoNoNoSystem program

What It Does

  1. Validates the delegation record is initialized and owned by the Agent Tools program
  2. Reads the executive profile, executive authority, and agent asset from the record
  3. Validates the passed agentAsset matches the record and is a valid MPL Core asset
  4. Validates the PDA derivation of the delegation record
  5. Validates the signer is either the asset owner or the executive authority recorded on the delegation
  6. Closes the ExecutionDelegateRecordV1 account and refunds rent to destination

What It Does Not Do

RevokeExecutionV1 only revokes future execution through the AgentIdentity path. It does not unwind downstream state created by previous valid executions. See Security model for the full lifecycle semantics.

PDA Derivation

Both account types are PDAs derived from deterministic seeds. Use the SDK helpers to compute them.

AccountSeedsSize
ExecutiveProfileV1["executive_profile", <authority>]40 bytes
ExecutionDelegateRecordV1["execution_delegate_record", <executive_profile>, <agent_asset>]104 bytes
import {
findExecutiveProfileV1Pda,
findExecutionDelegateRecordV1Pda,
} from '@metaplex-foundation/mpl-agent-registry';
const profilePda = findExecutiveProfileV1Pda(umi, {
authority: authorityPublicKey,
});
const delegatePda = findExecutionDelegateRecordV1Pda(umi, {
executiveProfile: profilePda,
agentAsset: assetPublicKey,
});

Account: ExecutiveProfileV1

Stores the authority that owns this executive profile. 40 bytes, 8-byte aligned.

OffsetFieldTypeSizeDescription
0keyu81Account discriminator (1 = ExecutiveProfileV1)
1_padding[u8; 7]7Alignment padding
8authorityPubkey32The authority for this executive profile

Account: ExecutionDelegateRecordV1

Links an executive profile to an agent asset, recording who is authorized to execute on its behalf. 104 bytes, 8-byte aligned.

OffsetFieldTypeSizeDescription
0keyu81Account discriminator (2 = ExecutionDelegateRecordV1)
1bumpu81PDA bump seed
2_padding[u8; 6]6Alignment padding
8executiveProfilePubkey32The executive profile address
40authorityPubkey32The executive authority
72agentAssetPubkey32The agent asset address

Security Model

An active execution delegate has broad operational authority over whatever accounts the agent's Asset Signer PDA controls. Lifecycle semantics around delegation, revocation, and asset transfer are described below.

Execution Authority Is Arbitrary

An authorized execution delegate may cause the agent's Asset Signer PDA to sign any instruction passed through Core's Execute hook. This includes SOL and SPL Token transfers, CPI calls, SPL Token Approve, account-authority changes, and protocol interactions.

This is intentional. Execution delegation is not a narrow "method call" permission — it is broad operational authority over the agent's wallet and any accounts the Asset Signer controls. The Agent Tools program does not parse, introspect, gate, or restrict the instructions that an executive forwards through Execute.

Revocation Scope

RevokeExecutionV1 closes the ExecutionDelegateRecordV1, preventing that executive from triggering future Execute calls through the AgentIdentity path. Either the asset owner or the executive authority on the record may sign the revocation — an executive can step down from operating an agent without owner involvement, and the owner can revoke an executive without executive cooperation.

Revocation does not modify, reverse, or clean up durable downstream state created by previous valid executions.

Examples of downstream state that may survive revocation:

  • SPL Token approvals (Approve granted to a third-party delegate)
  • Token account authority changes
  • Escrow positions and protocol deposits
  • Open positions in lending, AMM, or perpetuals programs
  • Permissions or configuration stored in other programs
  • Any other state created by arbitrary CPI

Cleaning up downstream state requires separate instructions to those programs — for example, calling SPL Token's Revoke on a token account whose delegate was set during a previous execution.

Delegates Are Agent Runtime Configuration

Execution delegates are part of the agent's operational state, not ephemeral approvals tied to the current owner wallet. A hosted provider, service operator, or agent container hot wallet is commonly authorized as an executive so the agent can continue operating as the asset moves between owners (for example, between wallets the same operator controls). Asset transfer does not automatically invalidate ExecutionDelegateRecordV1 accounts.

Recipients of an agent asset

When you receive an agent asset from another party, treat existing execution delegates as part of the agent's received runtime configuration. Before funding the agent's Asset Signer PDA, enumerate active delegation records and revoke any executives you do not intend to authorize.

Funding the Asset Signer PDA

The agent's Asset Signer PDA is commonly used as the agent's treasury or operational account. If an active execution delegate exists, that delegate may move assets controlled by the Asset Signer PDA. Before funding the Asset Signer PDA — especially after receiving or transferring an agent asset — confirm which executives are authorized and whether they are trusted.

See the Clean Up an SPL Approval example on the Run an Agent guide for a worked cleanup of downstream state.

Errors

The program returns these errors when validation fails during registration, delegation, or revocation.

CodeNameDescription
0InvalidSystemProgramSystem program account is incorrect
1InvalidInstructionDataInstruction data is malformed
2InvalidAccountDataInvalid account data
3InvalidMplCoreProgramMPL Core program account is incorrect
4InvalidCoreAssetAsset is not a valid MPL Core asset
5ExecutiveProfileMustBeUninitializedExecutive profile already exists
6InvalidExecutionDelegateRecordDerivationDelegation record PDA derivation mismatch
7ExecutionDelegateRecordMustBeUninitializedDelegation record already exists
8InvalidAgentIdentityAgent identity account is invalid
9AgentIdentityNotRegisteredAsset does not have a registered identity
10AssetOwnerMustBeTheOneToDelegateExecutionOnly the asset owner can delegate execution
11InvalidExecutiveProfileDerivationExecutive profile PDA derivation mismatch
12ExecutionDelegateRecordMustBeInitializedDelegation record does not exist or has already been closed
13UnauthorizedRevokeAuthority is neither the asset owner nor the executive authority on the record
14ExecutiveProfileMustBeInitializedExecutive profile account is not initialized

Notes

  • RevokeExecutionV1 is an on-chain action on the Agent Tools program. It stops future Execute calls through the AgentIdentity path but does not unwind downstream state in other programs.
  • Either the asset owner or the executive authority on the record can sign RevokeExecutionV1. DelegateExecutionV1 remains owner-only.
  • Asset transfer does not close ExecutionDelegateRecordV1 accounts. Recipients should review and revoke executives according to their trust assumptions.
  • Asset owners always retain the direct Core Execute path documented in Execute Asset Signing. Cleaning up downstream state (for example, an SPL Approve) can be done by the owner without an executive.
  • The Freeze Execute plugin can freeze the Execute lifecycle event entirely as an additional safeguard; it operates at the Core layer and is independent of the Agent Tools delegation record.

Maintained by Metaplex · Last verified June 2026 · View source on GitHub