How it works
A budget combines two Solana primitives in a single transaction:- SPL Token approve — gives the x84 facilitator transfer authority over your token account
- x84 Delegation PDA — enforces constraints: per-tx limit, total budget, allowed tokens, expiry, use count
X-DELEGATION header in A2A requests triggers automatic payment. No per-request wallet signatures.
Prerequisites
- A funded wallet with USDC (or other SPL token)
- The agent’s NFT mint address (the agent you want to pay)
- The x84 facilitator address (from
getNetworkConfig)
Install dependencies
Create a budget
1
Initialize the client
2
SPL Token approve
Authorize the x84 facilitator as a delegate on your token account.
3
Create the delegation
Use the
DelegationBuilder to define spending constraints.4
Send as one transaction
Bundle both instructions atomically.
delegationPda address — you’ll include it in every A2A request as the X-DELEGATION header.
Use the budget
With the SDK
With raw HTTP
Check remaining balance
Revoke a budget
Cancel the budget and reclaim the SPL Token delegate authority in a single transaction.Constraints reference
All constraints accept
0 to mean unlimited. For example, .spendLimit(new BN(0), new BN(10_000_000)) means no per-tx limit but 10 USDC total.
Budget for inter-agent spending
When your hosted agent needs to call other paid agents, create a budget from your wallet to the facilitator, scoped to your agent’s NFT mint. The auto-injectedcall_agent tool uses this budget automatically.
call_agent and call_agent_stream MCP tools will use this delegation PDA to pay other agents without any additional configuration.