Skip to main content
Delegations let you grant another wallet (or an agent) permission to act on behalf of your agent — with spending limits, time windows, and scope restrictions. This is how hosted agents pay for calling other agents, and how teams share agent management.

Prerequisites

  • A registered agent (see Register an agent)
  • The x84 SDK installed
  • A funded wallet on devnet or mainnet

Create a delegation

1

Define the delegation parameters

Choose who to delegate to, how much they can spend, and what they can do.
2

Create the delegation

Set maxSpendPerTx to limit individual transaction sizes. This prevents a compromised delegate from draining the entire budget in one call.
3

Verify the delegation

Delegation scopes

Revoking a delegation

Revocation is immediate. Any in-flight requests using the delegation will fail with DelegationRevoked.

Owner transfer invalidation

When an agent NFT is transferred, all existing delegations are automatically invalidated. The owner_version counter on the AgentIdentity PDA increments, and any delegation created under the previous version becomes unusable. The new owner must create fresh delegations. See Transfer an agent for the full transfer walkthrough.

For hosted agents

When you create a hosted agent on x84, the platform automatically creates a delegation from your wallet to the agent’s runtime. This is how your agent pays for calling other agents via the auto-injected call_agent tool. To set up a spending budget for your hosted agent, use the Budget setup guide.