Skip to main content

Overview

The Agentic API is the x402-paid surface for Brickken agentic methods. It covers ERC-8004 identity, reputation, and agent-owned ERC-20 operations on Base, plus ERC-8226 RAMS mandates on Ethereum Sepolia. Every agentic operation is a two-step flow:
  1. Prepare the unsigned transaction. Half of the operation charge is collected here.
  2. Send the operation. The remaining x402 USDC charge is collected here.
You always sign the blockchain transaction yourself. There are two execution modes for the send step:
  • client-signed (default). You sign the prepared transaction with your own private key and submit the signed payload; Brickken broadcasts it.
  • client-broadcast. You sign and broadcast the transaction yourself, then confirm it with txHash.
Never send a private key to the Brickken API. Blockchain signing belongs in your client, the Brickken CLI, or an MCP session you control.

Base URLs

Networks

The Agentic API runs on Base, with Base Sepolia for tests. The x402 payment rail is operation-aligned: you pay on the same chain the operation runs on.

Authentication Flow

For x402, omit x-api-key.
  1. Prepare. Call a semantic facade such as POST /x402/agent/register, or POST /prepare-transactions with an eligible method. The response returns txId, transactions, and an x402Requirements quote, and may return a payment challenge for its half of the operation price.
  2. Send. Call POST /send-transactions. The API responds 402 Payment Required with a PAYMENT-REQUIRED header describing the exact chain, asset, transfer method, amount, recipient, and timeout.
  3. Sign the x402 payment locally with the payer’s private key, and retry the send with X-PAYMENT.
  4. Brickken verifies the payment and processes the operation. The settlement is returned in the PAYMENT-RESPONSE header.
For an agent facade, a 400 before a txId is request validation, not an insufficient x402 balance. x402 payment begins only when send-transactions returns 402 Payment Required.
Always read the chain, asset, transfer method, amount, recipient, and timeout from PAYMENT-REQUIRED; do not hardcode them client-side. On Base Sepolia the payment rail uses EIP-3009, whose signed authorization carries the transfer, so no separate ERC-20 approve transaction is required. On Base mainnet, follow the advertised token’s transfer method.
The payment is reserved when you pay and only settled after the operation confirms on-chain. If the operation reverts or its authorization expires before confirmation, the reservation is released.

Base Sepolia Testing

Use chainId: "84532" (eip155:84532). The Base Sepolia x402 payment asset is Circle USDC:
It has 6 decimals and uses the EIP-3009 transfer method (EIP-712 name USDC, version 2, authorization window 300s). Fund the payer with the exact asset advertised by PAYMENT-REQUIRED before signing. The Base Sepolia ERC-8004 registries are:
  • Identity: 0x8004A818BFB912233c491871b3d84c89A494BD9e
  • Reputation: 0x8004B663056A597Dffe9eCcC1965A193B7388713

Discovery

Production (https://api.brickken.com) is the public x402scan target. Sandbox exposes the same discovery routes for QA.

Prepare and Send

The semantic /x402/... routes prepare unsigned transactions and do not submit transactions on-chain by themselves. Preparing is a paid call: it collects half of the operation price, unless you send a valid x-api-key instead.

Preparing an operation

Pass signerAddress as the wallet that will sign the prepared transaction.
image is required for agentRegister and must be a publicly reachable HTTPS logo URL. Do not use local paths or omit the field.
The prepare response returns a single txId, exactly one transaction { to, data, value }, and x402Requirements. Submit those to send-transactions and complete the x402 payment; Brickken signs and broadcasts:

Client-signed

Prepare with your own signerAddress, sign the returned transaction locally, then send the signed payload:
send-transactions x402 batches must contain only x402-eligible prepared transactions, and all transactions in the batch must be on the same chain.

Polling

Poll status with GET /get-transaction-status by txId or operation hash. A response of status: "pending" means the operation was broadcast but not yet confirmed; do not pay or resubmit the same txId again. Brickken’s reconciliation settles after confirmation or releases the payment on revert or authorization expiry.

Endpoint Groups

Facade requests use the same body fields as the matching backend method, except method is optional and ignored because the path fixes it.

Agent Identity

Register, maintain, and transfer ownership of ERC-8004 agent identities.

Reputation

Give, revoke, and respond to ERC-8004 feedback.

Agent Tokens

Create and operate agent-owned ERC-20 tokens.

RAMS Mandates

Delegate compliance-gated, scoped, capped authority to AI-agent wallets with ERC-8226.

Pricing

Review execution-mode-aware prepare and send prices.
Advanced clients can also call POST /prepare-transactions directly and pass method explicitly. newTokenizedAgent remains a legacy alias for agent registration, but it is not published in x402scan discovery. The ten RAMS methods (ramsGrantMandate, ramsRevokeMandate, ramsExtendMandate, ramsSetOperator, ramsExecute, ramsSetExecutorAction, ramsFreezeAgent, ramsUnfreezeAgent, ramsGrantPrincipal, and ramsRevokePrincipal) are also eligible through /prepare-transactions. Their semantic facades live under /x402/rams/*.
RAMS facades are client-signed; see RAMS Mandates.

Common Fields

Response Shape

The prepare response includes txId, transactions, and optional info. For agentRegister, save info.agentUuid for later set-uri, set-metadata, and transfer-ownership calls.
x402 payments and on-chain transactions are non-refundable. Confirm chain, signer/recipient, token address, and expected USDC price before paying. See Pricing for the published mainnet table.