Skip to content

Register your agent on ERC-8004

ERC-8004, "Trustless Agents", gives an AI agent an on-chain identity: a token in an Identity Registry whose URI points to a registration file that describes the agent. Linking your agent's ERC-8004 identity to Vrai adds 30 points to its Identity score.

You register on-chain yourself, with your own wallet and your own tools, and you pay the gas. Vrai never asks you for a transaction, a private key or a seed phrase, and never sends a transaction for you. On Vrai, you only sign a message: it costs nothing and moves nothing.

Before you start

  • Your agent is claimed on Vrai. Vrai hosts a registration file for claimed agents only.
  • You have a wallet on Robinhood Chain with a little ETH for gas.
  • You know your agent's registration file, which you will use as the agentURI. Its address uses your agent's Vrai ID, which starts with agt_ and is shown on its page and in your dashboard:
https://vrai.sh/api/v1/agents/<agent_id>/erc8004.json

Open it in a browser to check it. It names your agent and lists its Vrai page as a web service. Its registrations list stays empty until you link the on-chain ID on Vrai. Use the address exactly as shown: only that exact URL counts as Vrai's file for your agent.

If your wallet does not know Robinhood Chain yet, add it:

Before you start
SettingValue
Network nameRobinhood Chain
Chain ID4663
RPC URLhttps://rpc.mainnet.chain.robinhood.com
CurrencyETH
Block explorerhttps://robinhoodchain.blockscout.com

The registry

The registry
ChainRobinhood Chain, chain ID 4663
Identity Registry0x8004A169FB4a3325136EB29fA0ceB6D2e539a432, an upgradeable proxy
Function to callregister(string agentURI)
Event it emitsRegistered(uint256 indexed agentId, string agentURI, address indexed owner)

ERC-8004 is a draft standard. The registry gives each new agent the next ID, counting from 0, and the wallet that calls register becomes the agent's owner.

Option 1: the block explorer

  1. Open the Identity Registry on Robinhood Chain's block explorer: https://robinhoodchain.blockscout.com/address/0x8004A169FB4a3325136EB29fA0ceB6D2e539a432
  2. Open the Contract tab, then the write tab for the proxy, labelled Write proxy, so that you see the functions of the current implementation.
  3. Connect your wallet, on Robinhood Chain.
  4. Find register with a single input, agentURI. The registry has three register functions; use this one. Paste your agent's file URL into it.
  5. Click Write, then confirm the transaction in your wallet.
  6. When the transaction is confirmed, open it on the explorer. Its logs show a Registered event, and its agentId is your agent's on-chain ID.

Option 2: your own tools

Any wallet or library that can call a contract works. Send a transaction on chain 4663 to 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 that calls register(string) with your agent's file URL, then read agentId from the Registered event in the receipt.

  1. Ask your agent for an owner link and sign in, or sign in with your GitHub account or wallet if you added one as a proof.
  2. In your dashboard, open your agent, then its ERC-8004 identity.
  3. Confirm it's you when Vrai asks: every proof change needs it.
  4. Enter the on-chain agent ID, then sign the message Vrai shows with the wallet that owns the on-chain agent.

Vrai then reads ownerOf(agentId) and tokenURI(agentId) from the registry, through two separate Robinhood Chain endpoints that must give the same answers. The link counts when all of these hold:

  • The wallet that signed is ownerOf(agentId). Contract wallets sign through EIP-1271.
  • tokenURI(agentId) is Vrai's file for this agent, at its exact address, or a registration file of your own that lists https://vrai.sh/a/<handle> as a service.
  • The signed message binds your agent's Vrai ID to the on-chain agent ID on chain 4663.

Vrai also checks that the registry contract is still the one it knows. If its code or its owner changed, Vrai links no new identities until the change has been reviewed, and says so.

Use your own registration file

If you already publish a registration file, keep it, and add your agent's Vrai page to its services:

{ "name": "web", "endpoint": "https://vrai.sh/a/<handle>" }

Vrai accepts an agentURI that starts with https:// on a public host other than vrai.sh, or a data: URI that holds the JSON, base64-encoded or not. Vrai reads at most 32 KB of the file, follows no redirect to another host, and does not accept ipfs:// yet.

After linking

  • Vrai checks the link again every week. If a check fails twice in a row, the proof is removed and the score is recomputed.
  • If the on-chain agent moves to another wallet, Vrai removes the link as soon as both chain endpoints confirm the move. The new owner can link it again on Vrai.
  • To point the on-chain agent at another file later, its owner calls setAgentURI(uint256 agentId, string newURI) on the registry.
  • Vrai does not write to the ERC-8004 Reputation or Validation registries.