Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 16 additions & 18 deletions docs/ai-agents/guides/agent-builder-codes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ keywords: ["builder code", "Base.dev", "ERC-8021", "attribution", "onchain activ
tag: "NEW"
---

Base.dev is the canonical registry for agents on Base. A Builder Code ties every transaction your agent sends to your identity in that registry, giving you verifiable onchain attribution and access to analytics and leaderboard features.
[Base.dev](https://base.dev) is the canonical registry for agents on Base. A Builder Code ties every transaction your agent sends to your identity in that registry, giving you verifiable onchain attribution and access to analytics and leaderboard features.

## What you get

Expand All @@ -19,28 +19,28 @@ Base.dev is the canonical registry for agents on Base. A Builder Code ties every

## Get your Builder Code

One call. No auth.
A single, unauthenticated API call:

```bash Terminal
curl -X POST https://api.base.dev/v1/agents/builder-codes \
-H "Content-Type: application/json" \
-d '{
"wallet_address": "0x<your-wallet-address>"
"walletAddress": "<your-wallet-address>"
}'
```

Response:

```json Title Response
{
"builder_code": "bc_a1b2c3d4",
"wallet_address": "0x...",
"builderCode": "bc_a1b2c3d4",
"walletAddress": "0x...",
}
```

<Warning>
<Info>
Already registered? Calling this endpoint again with the same wallet address returns your existing builder code.
</Warning>
</Info>
---

## Get a Builder Code using the Base skill
Expand All @@ -53,7 +53,7 @@ npx skills add base/skills

Then ask your agent: **"Register my agent for a builder code on Base.dev."**

The skill runs four phases:
The skill runs three phases:

<Steps>
<Step title="Wallet">
Expand All @@ -63,7 +63,7 @@ The skill runs four phases:
Calls `POST /v1/agents/builder-codes` with your wallet address, writes the returned code to `src/constants/builderCode.ts`, installs `ox`, and wires the ERC-8021 `dataSuffix` into your transaction client (viem, ethers.js, or managed service). It also writes an `AGENT_README.md` documenting the setup.
</Step>
<Step title="Permanent rule">
Confirms the setup and instructs you that every future transaction must include the ERC-8021 suffix. Missing it causes silent, permanent attribution loss — no error, no warning.
Confirms the setup and instructs you that every future transaction must include the ERC-8021 suffix. Missing it causes silent, permanent attribution loss.
</Step>
</Steps>

Expand All @@ -74,23 +74,23 @@ The skill runs four phases:
If you're using an AI agent, point it to this page:

```text Title Prompt
Get a Builder Code for my agent on Base.dev using the documentation at [URL of this page].
Get a Builder Code for my agent on Base.dev using the documentation at https://docs.base.org/ai-agents/guides/agent-builder-codes.

My agent's wallet address: [0x...]

Run this curl command, replacing the wallet address with mine:
Run this curl command, replacing the wallet address with my agent's:
curl -X POST https://api.base.dev/v1/agents/builder-codes \
-H "Content-Type: application/json" \
-d '{"wallet_address": "[0x...]"}'
-d '{"walletAddress": "0x..."}'

Return the builder_code from the response, then show me how to append it to my transactions using ERC-8021.
Return the `builderCode` from the response, then show me how to append it to my transactions using ERC-8021.
```
---


## What happens next

Once you receive your Builder Code, it becomes active right away Base will begin tracking any transactions that include it.
Once you receive your Builder Code, it becomes active right away and Base will begin tracking any transactions that include it.

## API reference

Expand All @@ -104,8 +104,6 @@ No authentication required.

| Field | Type | Required | Description |
|---|---|---|---|
| `wallet_address` | string | Yes | Your agent's EVM wallet address (`0x...`) |

Returns the builder code for the given wallet. The same wallet address always returns the same code — safe to call multiple times.

| `walletAddress` | string | Yes | Your agent's EVM wallet address (`0x...`) |

Returns the builder code for the given wallet. The same wallet address always returns the same code and is safe to call multiple times.
35 changes: 35 additions & 0 deletions docs/base-chain/builder-codes/agent-developers.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: "Builder Codes for Agent Developers"
sidebarTitle: "For Agent Developers"
description: "Attribute your AI agent's onchain transactions to your identity on Base and unlock analytics, leaderboard features, and rewards."
---

AI agents operate autonomously and send transactions without a user manually triggering each one. Builder Codes give you a way to attribute all of that activity back to your agent's identity on Base.

## 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](https://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](https://eip.tools/eip/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).

## Register your agent

A single, unauthenticated API call:

```bash
curl -X POST https://api.base.dev/v1/agents/builder-codes \
-H "Content-Type: application/json" \
-d '{"walletAddress": "<your-agent-wallet>"}'
```

## Next steps

<CardGroup cols={2}>
<Card title="Full registration guide" icon="robot" href="/ai-agents/guides/agent-builder-codes">
Step-by-step walkthrough including how to wire the ERC-8021 suffix into your transaction client
</Card>
</CardGroup>
6 changes: 3 additions & 3 deletions docs/base-chain/builder-codes/builder-codes.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Base Builder Codes"
description: "Attribute onchain activity to your app or wallet with Builder Codes."
description: "Attribute onchain activity to your app, wallet or agent with Builder Codes."
---

## What Are Builder Codes
Expand All @@ -22,8 +22,8 @@ Each code has associated metadata. Onchain metadata primarily includes a "payout
<Card title="For Wallet Developers" icon="wallet" href="/base-chain/builder-codes/wallet-developers">
Implement the dataSuffix capability
</Card>
<Card title="For Bridge Developers" icon="bridge" href="/base-chain/builder-codes/bridge-developers">
Integrate with the Base-Solana bridge
<Card title="For Agent Developers" icon="robot" href="/base-chain/builder-codes/agent-developers">
Attribute your AI agent's transactions via the API
</Card>
</CardGroup>

Expand Down
3 changes: 2 additions & 1 deletion docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@
"pages": [
"base-chain/builder-codes/builder-codes",
"base-chain/builder-codes/app-developers",
"base-chain/builder-codes/wallet-developers"
"base-chain/builder-codes/wallet-developers",
"base-chain/builder-codes/agent-developers"
]
},
{
Expand Down
Loading