Skip to main content
Every instruction builder in the SDK is an async function that takes a program: X84Program as its first argument and returns an object containing the built TransactionInstruction along with any derived PDAs.
You are responsible for assembling the instruction into a transaction, adding signers, and sending it. This gives you full control over transaction composition, compute budgets, and signing flows.

Admin

initialize

Creates the ProtocolConfig PDA and Metaplex Core Collection NFT. This is a one-time setup instruction.

updateConfig

Update protocol parameters. Only non-null fields are modified.

Identity

registerAgent

Register a new agent. Mints a Metaplex Core NFT — the mint pubkey becomes the agent_id.

updateAgentMetadata

Update the metadata URI and hash for an agent. Supports delegation — pass a delegationPda if the caller is a delegate.

deactivateAgent

Deactivate an agent. The agent will be marked inactive and most operations will fail with AgentInactive.

reactivateAgent

Reactivate a previously deactivated agent.

claimAgent

Called by the new NFT holder after transfer. Increments owner_version, which invalidates all existing delegations.

setFeedbackAuthority

Change the feedback authority keypair for an agent.

Service

addService

Register a service endpoint for an agent. Each agent can have one service per ServiceType.

updateService

Update the endpoint or version for an existing service.

removeService

Close the service PDA. Rent is refunded to the caller.

Reputation

giveFeedback

Submit feedback for an agent. Requires an Ed25519 signature from the agent’s feedback authority to prevent spam.
The transaction must include both the Ed25519 verification instruction and the feedback instruction, in that order. The program verifies the Ed25519 instruction exists at index 0 in the transaction.
If you pass the feedbackAuthoritySecretKey (the secret key bytes), the SDK will automatically construct the Ed25519 verification instruction. Otherwise, you must provide the pre-computed signature in feedbackAuth and build the Ed25519 instruction yourself.

revokeFeedback

Revoke a previously submitted feedback entry. Only the original reviewer can revoke.

Validation

Validation is a 2-step process: the agent owner requests validation from a specific validator, then the validator submits their assessment.

validationRequest

Request a validator to assess the agent.

validationResponse

Validator submits their assessment. The requestHash must match the original request.

Delegation

DelegationBuilder

The DelegationBuilder provides a fluent API for constructing delegations with granular permissions and constraints.
Permission methods Constraint methods

createDelegation

Direct delegation creation without the builder, for cases where you want to specify all fields explicitly.

revokeDelegation

Revoke a delegation. Can be called by the delegator or the agent owner.

Payment

setPaymentRequirement

Set an x402 payment gate for a service. Each service type can have one payment requirement.

updatePaymentRequirement

Update amount, payTo, description, or active status. Null fields are left unchanged.