ERC-8004 agent registration with Syenite

ERC-8004 gives AI agents an on-chain identity: a registry contract stores agent metadata and assigns a unique agent ID. Syenite supports registration so your MCP server appears as a verified agent on Base, Ethereum, Arbitrum, and BNB Chain. This guide walks through building and submitting the registration transaction.

What you get

After registering, your agent has a public agent ID (NFT-style) on the chain you chose. Syenite exposes that ID via /.well-known/agent-registration.json. Clients and other agents can discover your MCP endpoint, x402 support, and services from that URL. The Syenite landing page can show an "ERC-8004 Agent" link when AGENT_ID (or AGENT_ID_BASE) is set.

Demo: run the registration script

Syenite ships a script that builds and sends the registration transaction. You need a wallet with native gas on the target chain and AGENT_PRIVATE_KEY in .env.

Step 1: Install and configure

From the mcp directory, ensure dependencies are installed. Create or edit .env and set:

AGENT_PRIVATE_KEY=0x...

Use a dedicated wallet for the agent. Do not commit this key.

Step 2: Dry run (no tx sent)

Build the registration payload and see what would be sent. Default chain is Base.

$ npm run register-agent -- --dry-run
$ npm run register-agent -- --chain=ethereum --dry-run

The script loads agentRegistrationJson() from the server (name, description, MCP endpoint, x402 support), encodes it as a data URI, and shows the register(agentURI) call. No transaction is submitted.

Step 3: Submit the transaction

Remove --dry-run to send the transaction to the ERC-8004 registry (0x8004A169FB4a3325136EB29fA0ceB6D2e539a432).

$ npm run register-agent -- --chain=base

After the tx confirms, look up your agent ID on the block explorer (e.g. Basescan) under the registry contract or your address's NFT transfers. The script prints the URL.

Step 4: Set agent ID and redeploy

Put the numeric agent ID in .env as AGENT_ID (or AGENT_ID_BASE for Base). Redeploy Syenite so /.well-known/agent-registration.json includes your registration. The landing page can then link to your agent on the explorer.

Discovery

GET https://syenite.ai/.well-known/agent-registration.json returns the EIP-8004 registration document: type, name, description, image, services (MCP and web endpoints), x402Support: true, and registrations (agentId and agentRegistry per chain). Clients that support ERC-8004 use this to resolve your agent.

Gas

Registration is a single contract call. Use gas.estimate with operations: ["contract_register"] to see current cost on each chain. See Wallet balances and gas estimates.

Related

Why agentic DeFi (ERC-8004 and AgentKit). x402 and agent payments (Syenite declares x402 support in the same registration). Quick start for MCP setup.