> ## Documentation Index
> Fetch the complete documentation index at: https://celonames.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Set ERC-8004 Agent Records

> Link your AI agent's ERC-8004 registration to your .celo.eth name by adding agent records in the Celonames app.

If you run an AI agent registered in the ERC-8004 Identity Registry on Celo, you can link it to your Celoname. You do this by adding a few text records to your name in the [Celonames app](https://names.celo.org). Anyone can then look up your name and confirm that the agent is yours.

## Before you start

You need:

* A `.celo.eth` name, and the wallet that owns it. To get one, see [How to Register](https://celonames.mintlify.site/user/register.md).
* Your agent's ID in the ERC-8004 Identity Registry on Celo. This is the number you got when you registered the agent. You can look it up on [8004scan](https://www.8004scan.io), where each Celo agent has a page at `https://www.8004scan.io/agents/celo/<agentId>`.
* A little CELO for the transaction fee.

## Build your record key

The record that links your name to your agent is called `agent-registration`. Its key has two parts in square brackets: the registry and your agent ID.

For the ERC-8004 Identity Registry on Celo mainnet, copy this key and replace `<agentId>` with your agent's ID:

```
agent-registration[0x0001000002a4ec148004a169fb4a3325136eb29fa0ceb6d2e539a432][<agentId>]
```

Only the agent ID changes. The first part, `0x0001000002a4ec148004a169fb4a3325136eb29fa0ceb6d2e539a432`, is the same for every agent on Celo mainnet. It encodes the Celo chain and the registry contract address.

For example, if your agent ID is `9687`, the key is:

```
agent-registration[0x0001000002a4ec148004a169fb4a3325136eb29fa0ceb6d2e539a432][9687]
```

> [!WARNING]
>
> Don't add spaces, and keep both pairs of square brackets. A key with a typo still saves, but it won't link to your agent.

## Add the records

**1. Connect the wallet that owns the name**

Go to [names.celo.org](https://names.celo.org) and connect the wallet that owns your Celoname. Only the owner can edit its records.

**2. Open your name's profile**

Click **My Names** and select your name. You can also go straight to `https://names.celo.org/name/<yourname>.celo.eth`.

**3. Edit your records**

Click **+ Edit Profile**. The records editor opens with sections for General, Social, Addresses, Website and Custom.

**4. Add the agent-registration record**

Scroll past **Website** to the **Custom** section, or select **Custom** in the editor's menu. Click **+ Add custom record**. A row with a **Key** field and a **Value** field appears.

* **Key**: paste the key you built above, with your agent ID.
* **Value**: type `1`.

The value has to be non-empty, and `1` is the standard choice.

**5. Add agent-context and endpoints (optional)**

These records tell people and other agents what your agent does and where to reach it. Click **+ Add another** for each one.

| Key | Value |
| - | - |
| `agent-context` | A short description of your agent and how to use it |
| `agent-endpoint[mcp]` | The URL of your agent's MCP server, for example `https://agent.example.com/mcp` |
| `agent-endpoint[web]` | Your agent's website, for example `https://agent.example.com` |

Endpoint values must be full URLs.

**6. Save and confirm the transaction**

Click **Update**. If your wallet is on another network, the app asks you to switch to Celo. Confirm the transaction in your wallet.

> [!TIP]
>
> When the transaction confirms, the app shows **Records updated successfully!**

## Check that it worked

Open your name's profile. Your agent records appear under **Custom records** on the **Records** tab, and in the **Custom** section when you click **+ Edit Profile**. They can take a minute to show up after the transaction confirms.

The records also resolve through ENS on Ethereum, like any other text record. A developer can confirm the link with the `verifyAgent` example in [AI Agent Identity](https://celonames.mintlify.site/developer/ai-agents-ensip25.md#build-an-agent-identity-on-celo).

For a live example, look at `abapay.eth`. It links Celo agent `9687` with the key `agent-registration[0x0001000002a4ec148004a169fb4a3325136eb29fa0ceb6d2e539a432][9687]` set to `1`, and it also has `agent-context`, `agent-endpoint[web]` and `agent-endpoint[mcp]`.

## Troubleshooting

> [accordion] I don't see + Edit Profile
>
> The button only appears when the connected wallet owns the name. Connect the owner wallet, or check the **Ownership** tab to see which address owns it.

> [accordion] The Update button is greyed out
>
> Every custom record needs a value. Fill in or remove any row with an empty value.

> [accordion] 'This key is reserved, use its own field'
>
> You typed a key that has its own field in the editor, such as `url` or `description`. Use that field instead. Agent keys like `agent-registration[...]`, `agent-context` and `agent-endpoint[mcp]` are never reserved.

> [accordion] My agent is on Celo Sepolia
>
> Testnet agents use a different registry, so the key starts with `agent-registration[0x0001000003aa044c148004a818bfb912233c491871b3d84c89a494bd9e]` followed by `[<agentId>]`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.