As AI agents increasingly operate in Web3 contexts — managing wallets, executing transactions, interpreting onchain data — they face a fundamental UX challenge: Ethereum addresses are 42-character hex strings that are meaningless to both humans and language models. ENS names solve this by providing a human-readable, machine-resolvable identity layer. Here's how to wire it up.
The Identity Problem for AI Agents
Suppose your AI agent receives a user message: "Send 0.1 ETH to vitalik.eth." The agent needs to resolve vitalik.eth to an actual Ethereum address before it can construct a transaction. Or the agent is summarizing onchain activity and wants to display vitalik.eth instead of 0xd8dA... in its response.
Without resolution infrastructure, your agent either has to ship a full Web3 library in its runtime (impractical for most LLM deployment environments) or rely on the user to always provide raw addresses. Neither is a good experience.
ENS as a Machine-Readable Identity Layer
ENS names are ideal for AI agent use because:
- They're unambiguous — a name either resolves or it doesn't
- They carry rich metadata (avatar, social handles, description) that agents can use for context
- They're stable — a user's ENS name persists even as they rotate wallets
- The resolution API is plain HTTP/JSON — no special runtime or library needed
Tool Definition for Claude
Here's how to define an ENS resolution tool for a Claude agent using the Anthropic SDK:
const tools = [
{
name: 'resolve_ens_name',
description: 'Resolve an ENS name to an Ethereum address and profile data. Use this whenever the user provides a .eth name or you need to look up wallet information for a Web3 identity.',
input_schema: {
type: 'object',
properties: {
name: {
type: 'string',
description: 'The ENS name to resolve, e.g. "vitalik.eth"',
},
},
required: ['name'],
},
},
]
async function handleToolCall(toolName: string, input: { name: string }) {
if (toolName === 'resolve_ens_name') {
const res = await fetch(`https://api.resolvio.xyz/ens/v2/profile/${input.name}`)
return await res.json()
}
}
Tool Definition for OpenAI Function Calling
const functions = [
{
name: 'resolve_ens_name',
description: 'Resolve an ENS name (.eth) to an Ethereum address and profile information.',
parameters: {
type: 'object',
properties: {
name: { type: 'string', description: 'ENS name to resolve, e.g. vitalik.eth' },
},
required: ['name'],
},
},
]
Reverse Resolution for Agent Summaries
When your agent reads onchain data (transactions, token transfers, governance votes), it encounters raw addresses. Use reverse resolution to make summaries human-readable:
// Before: "0xd8dA6BF... sent 100 USDC to 0xAb5801..."
// After: "vitalik.eth sent 100 USDC to balajis.eth"
async function enrichAddresses(addresses: string[]): Promise<Record<string, string>> {
const res = await fetch(
`https://api.resolvio.xyz/ens/v2/reverse/bulk?addresses=${addresses.join(',')}`
)
const data = await res.json()
return Object.fromEntries(
data.map((item: { address: string; displayName: string }) => [item.address, item.displayName])
)
}
MCP and AI Plugin Support
Resolvio publishes first-class support files for AI systems:
- MCP server manifest at
/.well-known/mcp.json— for Model Context Protocol clients - AI plugin manifest at
/.well-known/ai-plugin.json— for OpenAI plugin-style discovery - Plain-text LLM description at
/llms.txt— a concise description any language model can parse - Tool definitions in Markdown at
/Skill.md— copy-paste ready function definitions