84532), where the x402 asset is Circle USDC.
Set up the client
apiKey here. A relayed send rejects one, and configuring both would take brickken-relayed off the table — the SDK would raise RelayedRequiresPaymentError before any request left the process.
brickken-relayed is already the default for agent.* and agentToken.*. Brickken’s relayer signs, broadcasts, and pays the native gas; your signer only authorizes the x402 payment. Omit signerAddress — passing one in relayed mode raises ValidationError.1. Preview the cost
Preparing is free in relayed mode. Do it first and read the quote before committing to anything.image is required and must be a publicly reachable HTTPS URL. serviceName / serviceEndpoint are the flat form of a single service — pass services: [{ name, endpoint, version }] instead when you have more than one.
2. Register the agent
Same call, withexecute: true. This prepares, pays the x402 charge, and sends.
3. Update the agent’s profile
4. Deploy the agent’s token
waitForReceipt: true polls the chain after the send and recovers the deployed contract address. It needs the rpcUrl configured in step 0.
agentWallet as well as signerAddress — Brickken supplies both.
5. Operate the token
Amounts here are human-readable and scaled bydecimals.
Agent-token amounts are
HumanAmount. RAMS caps are RawBaseUnits and are not scaled. The types keep the two apart so the distinction cannot be crossed by accident.6. Reputation
Signing it yourself instead
PassexecutionMode: 'client-signed' and a signerAddress to sign the prepared transaction locally. You then need native gas on Base Sepolia as well as USDC for the payment, and the price is split evenly across prepare and send rather than being free at prepare.
Funding and failure
Fund the wallet behind your signer with the exact asset quoted inx402Requirements — on Base Sepolia that is Circle USDC, six decimals. Read the amount from the live quote rather than a table.
Payments
Cap what an autonomous agent can spend.
RAMS mandates
Give the agent delegated, capped spending authority.