Agents on other chains

Session keys that may call other chains within limits every XE node enforces, and each agent's own account on each chain.

An AI agent never needs your main key to act on another chain. You give it a session key (a delegated key) whose grant carries a remote section: which chains, contracts, functions and amounts it may use. Every XE node checks each dispatch the key signs against that section and refuses anything outside it.

With section version 2, the agent also gets its own account on each listed chain, separate from yours. It can't touch your account there, or another agent's.

See an agent's own wallets on Base and Arbitrum · Limits, and an inbox for the rest

Status: on testnet, with Base, Arbitrum and Optimism Sepolia. Agent wallets on Solana come in the next release.

#Agent accounts

text
agent_salt(key) = sha256("xe/agent-ica/v1" ‖ key)        // key: the agent's 32-byte ed25519 public keyagent ICA       = router.getLocalInterchainAccount(22599, owner = account, router = account, ism = XE ISM, agent_salt)
  • The agent can use only its own salt. It never reaches the owner's default account (salt 0) or another agent's.
  • The owner reaches all of them: an owner-signed dispatch may name any salt, so funds can always be moved back.
  • Agent accounts use Hyperlane's typed routers with a user salt. On these testnets that's interchainAccountRouterV3 (version 12.2.0): see Interchain accounts.
  • Revoking the key on XE (delegate_revoke) stops every chain from the next block.

Compute an agent's address before anything is sent, so you can fund it:

typescript
import { agentIcaAddress } from "@xe-network/protocol/interop"; const address = agentIcaAddress({  xeDomain: 22599,  account, // the owner's XE account  key: agentKey, // the agent's public key  chain: {    domain: 84532,    router: "0x24fA135973A25778cB55149BcB8EDecaf4560036",    format: "typed",    implementation: "0x6F4E91E373C44184A39a10EFb578B9298CF7AE40",    ism: "0xD5Ade28E6dE5d1fE2eEa0364B30da65F4b40856E",  },});

#The limits

LimitFieldNotes
Chainsdestinations[].domain, router, ismThe router must support a user salt: 7.1.10, 11.3.1 or 12.2.0
Contracts and functionstargets[].address, targets[].selectorsSelectors on the deny-list are refused: token moves, executors, multicall, Hyperlane entry points
Native value per callmax_valueIn wei
ERC-20 transfer per call and per daytokens[].max_per_transfer, tokens[].budget, window (86,400 s)Amounts are read from the calldata
Who may receivetokens[].payeestransfer only
ERC-20 approve per calltokens[].spenders[].max_approvalCounted in the daily budget; never unlimited
Messages per daymax_dispatches
Relayer feemax_relayer_fee, relayersXE paid to the relayer per message
Expiryexpires_atAt most the grant's own

Everything not listed is refused: the section is default deny.

#Granting from a site: XE Connect

A site asks the person's wallet for a session key. Two capabilities matter:

  • xe:delegate@1: the wallet can grant session keys the nodes limit.
  • xe:delegateRemote@1: the wallet can parse a remote section strictly and show xe-core's review of it before the person signs.
typescript
import { connect, grantSessionKey } from "@xe-network/connect";import { remoteSectionToWire } from "@xe-network/protocol/signer"; const { granted } = await connect(config, { request: ["xe:delegate@1", "xe:delegateRemote@1"] });if (granted.includes("xe:delegateRemote@1")) {  await grantSessionKey(config, {    network,    key: agentKey,    limits: { ...xeLimits, remote: remoteSectionToWire(section, { u64: "string" }) },  });}

A request with remote to a wallet without xe:delegateRemote@1 is refused before the wallet is asked (4200 remote-grant), so a section is never silently dropped. Both are capabilities, not permissions: a wallet that has them grants them without a choice in the dialog, and the grant itself is reviewed on its own screen.

#Granting from code

typescript
import { delegateGrant } from "@xe-network/protocol/signer"; const in7Days = BigInt(Date.now() + 7 * 864e5) * 1_000_000n; // nanosecondsconst grant = delegateGrant({  key: agentKey,  permissions: [], // calls on other chains only; add "send" for XE payments  expiresAt: in7Days,  remote: {    version: 2,    expiresAt: in7Days,    window: 86_400n,    maxDispatches: 20,    maxRelayerFee: 250_000n,    relayers: ["9a34a351b3a1e2c47b5b7f2408cfc6212458a431c843e0345b5b95beb5a4b1a1"],    destinations: [{      domain: 84532,      router: "24fa135973a25778cb55149bcb8edecaf4560036",      routerVersion: "12.2.0",      ism: "d5ade28e6de5d1fe2eea0364b30da65f4b40856e",      maxCalls: 2,      maxValue: 0n,      tokens: [{        address: "036cbd53842c5426634e7929541ec2318f3dcf7e", // USDC on Base Sepolia        maxPerTransfer: 300_000n, // 0.30 USDC        budget: 1_000_000n, // 1 USDC a day      }],    }],  },});// the owner signs { op: "delegate_set", grant } as the account's next block

In the XE Web Wallet the same grant is made from Connected apps & agents, then the agent's card, then Change limits, then "Calls on other chains".

#The agent's side: XE MCP

ToolScopeWhat
xe_icasxe.readThe agent's own accounts per chain, their balances, and the limits with what's left today
xe_ica_callxe.requestchain plus transfer {token, to, amount} or calls [{to, value?, data?}]. Within the limits, it's signed by the delegated key and dispatched, after a dry run with the node. Outside them, nothing is sent
xe_remote_limitsxe.readThe raw grant
xe_remote_checkxe.readA dry run: POST /policy/check on the node

A call outside the limits comes back as approval_required with the exact dispatch:

  • Hosted (https://mcp.xe.marketized.io/mcp): the request goes to the person's approval inbox. Follow it with xe_approval_status.
  • Local (stdio or 127.0.0.1): the result carries open, a link to the person's Web Wallet that shows the calls and lets them sign.

Either way the person signs from their own account. The body names the agent's salt, so the calls still run from the agent's account. After a revoke, xe_ica_call refuses and asks nothing.

#Agent wallets

The local MCP host can also hold the agent's own keys, its agent wallets (xe_wallets, xe_wallet_create). An agent wallet is an XE account of its own. A person can delegate a key on their account to it, and its spending is capped by a local policy. Agent wallets also have EVM wallets for XE Pay (xe_evm_wallets) and, through xe-signer, a Solana wallet (xe_solana_wallet). See Wallets and signing.

#Refusals

Every refusal has a code, the same from consensus, from POST /policy/check and from the signers:

CodeMeaning
salt_not_allowedNot the agent's own account
destination_not_allowed, router_not_allowedThe chain or router isn't in the section
target_not_allowed, selector_not_allowedThe contract or function isn't allowed
value_over_capNative value above max_value
transfer_over_cap, token_budget_exceededAbove the per-transfer cap or the daily budget
payee_not_allowed, spender_not_allowedThe recipient or spender isn't listed
approval_unlimited, approval_over_capAn unlimited approval, or one above its cap
token_call_not_allowedA token function other than transfer or approve
dispatch_limitToo many messages in the window
remote_expiredThe section has expired

A revoked key gets the grant's own refusal (delegate: … was revoked).