register_agent
Register an ENS name as an ERC-8004 agent identity on Ethereum mainnet. Returns a ready-to-sign transaction.
Default route binds the agent to the name itself (ERC-8217 via Adapter8004): whoever holds the name controls the agent, OpenSea shows the agent identity on the name's page, and the agent transfers with the name when sold. Alternative "direct" route mints the agent NFT to your wallet instead.
The agentURI defaults to a NameWhisper-hosted registration file generated live from the name's ENS records — set your agent-context and agent-endpoint records (set_ens_records) and the file updates automatically.
IMPORTANT: after this transaction confirms, read the new agentId from the receipt (topic 1 of the Registered/AgentBound event) and call set_ens_records with the agentRegistration shorthand to write the ENSIP-25 binding record. The identity is not verifiable until that record is on-chain.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ENS name to register as an agent (e.g. "myagent.eth"). You must own it. | |
| route | No | adapter (default): bind the agent to the name via ERC-8217 — control and marketplace visibility follow the name. direct: mint the agent NFT to your wallet, independent of the name. | adapter |
| agentURI | No | Override the agent registration file URI. Defaults to NameWhisper's hosted file, which is built live from the name's ENS records (agent-context, endpoints) so it stays current automatically. | |
| walletAddress | No | Wallet that will sign the transaction. For the adapter route this MUST be the name's current token holder. Auto-filled from ERC-8128 auth when omitted. |