-
Notifications
You must be signed in to change notification settings - Fork 527
added keywords to metadata #1245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
soheimam
wants to merge
10
commits into
master
Choose a base branch
from
docs/agent-builder-codes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d4b6469
added keywords to metadata
soheimam e358c01
changed side bar added tag
soheimam 73ce367
updated skill to write builder code in readme
soheimam 89c8e03
updated skill to write builder code in readme
soheimam ccf9979
removed
soheimam cdfca98
removed
soheimam 2f89e7f
changed name
soheimam 934fa5a
removed next
soheimam 96b31a5
removed next
soheimam b92a94f
removed response
soheimam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| --- | ||
| title: "Get a Builder Code for Your Agent" | ||
| description: "Register your agent on Base.dev and append a Builder Code to every transaction to measure onchain activity." | ||
| keywords: ["builder code", "Base.dev", "ERC-8021", "attribution", "onchain activity", "agent attribution", "dataSuffix", "builder codes", "Base builder codes", "agent onchain"] | ||
| 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. | ||
|
|
||
| ## What you get | ||
|
|
||
| - **Builder Code** — a unique identifier (e.g. `bc_a1b2c3d4`) that you append to your onchain transactions. Base uses this to measure your agent's activity on Base Chain. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - An EVM wallet address that your agent operates from | ||
|
|
||
| --- | ||
|
|
||
| ## Get your Builder Code | ||
|
|
||
| One call. No auth. | ||
|
|
||
| ```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>" | ||
| }' | ||
| ``` | ||
|
|
||
| Response: | ||
|
|
||
| ```json Title Response | ||
| { | ||
| "builder_code": "bc_a1b2c3d4", | ||
| "wallet_address": "0x...", | ||
| } | ||
| ``` | ||
|
|
||
| <Warning> | ||
| Already registered? Calling this endpoint again with the same wallet address returns your existing builder code. | ||
| </Warning> | ||
| --- | ||
|
|
||
| ## Get a Builder Code 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: | ||
|
|
||
| ```bash Terminal | ||
| npx skills add base/skills | ||
| ``` | ||
|
|
||
| Then ask your agent: **"Register my agent for a builder code on Base.dev."** | ||
|
|
||
| The skill runs four phases: | ||
|
|
||
| <Steps> | ||
| <Step title="Wallet"> | ||
| Asks for your agent's wallet address. If you don't have one, it sends you to the [wallet setup guide](/ai-agents/guides/wallet-setup) before continuing. | ||
| </Step> | ||
| <Step title="Registration and attribution"> | ||
| 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. | ||
| </Step> | ||
| </Steps> | ||
|
|
||
| --- | ||
|
|
||
| ## Get a Builder Code with a prompt | ||
|
|
||
| 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]. | ||
|
|
||
| My agent's wallet address: [0x...] | ||
|
|
||
| Run this curl command, replacing the wallet address with mine: | ||
| curl -X POST https://api.base.dev/v1/agents/builder-codes \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{"wallet_address": "[0x...]"}' | ||
|
|
||
| Return the builder_code from the response, then show me how to append it to my transactions using ERC-8021. | ||
| ``` | ||
| --- | ||
|
|
||
|
|
||
| ## What happens next | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since there is a "What happens next" section, I would add a nudge that they need to have their agent make a transaction in order for them to see analytics. Could look something like:
|
||
|
|
||
| Your Builder Code starts working immediately — Base will measure any transaction that includes it. | ||
|
|
||
| ## API reference | ||
|
|
||
| ### Get builder code | ||
|
|
||
| ``` | ||
| POST /v1/agents/builder-codes | ||
| ``` | ||
|
|
||
| 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. | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's link to the "Setup a wallet for your agent" guide