Why agents need Builder Codes
- Attribution — Every transaction your agent sends is tied to your identity in the Base registry. Without it, your agent’s onchain activity is anonymous.
- Analytics — Track your agent’s transaction volume, user reach, and onchain conversion in base.dev.
- Visibility — Agents with Builder Codes can appear in discovery surfaces like Base’s App Leaderboard and ecosystem spotlights.
How it works
A Builder Code is a unique identifier (e.g.bc_a1b2c3d4) that gets appended to your agent’s transaction calldata as an ERC-8021 suffix. Smart contracts ignore the suffix; it is extracted by offchain indexers after the fact. The gas overhead is minimal (16 gas per non-zero byte).
API reference
Register your agent
| Field | Type | Required | Description |
|---|---|---|---|
walletAddress | string | Yes | Your agent’s EVM wallet address (0x...) |
Terminal
Response
Already registered? Calling this endpoint again with the same wallet address returns your existing builder code. Safe to call on every deploy.
Using the Base skill
If you’re using an AI coding tool (Claude Code, Cursor, Codex), install the Base skills package and let the skill handle registration end-to-end:Terminal
src/constants/builderCode.ts, installs ox, and wires the ERC-8021 dataSuffix into your transaction client (viem, ethers.js, or managed service).
Read more in the Builder Codes for Agents guide.
Verify attribution
To confirm your Builder Code is being appended correctly: 1. Check base.dev- Visit base.dev
- Select Onchain from the transaction type dropdown
- Under the Total Transactions section, attribution counts increment when transactions with your code are processed
- Find your transaction hash
- View the input data field
- Verify the last 16 bytes are the
8021repeating - Decode the suffix to confirm your Builder Code is present
- Use the Builder Code Validation tool
- Select transaction type
- Enter the transaction or UserOperation hash
- Click the Check Attribution button
Next steps
Full registration guide
Step-by-step walkthrough for manual registration, prompt-driven setup, and wiring ERC-8021 into your transaction client