Asset Resolution for AI Agents: From Symbols to Contract Addresses

Your AI agent can handle natural language like "swap 100 USDC for SOL" but struggles with the technical reality: blockchains need exact contract addresses, not human-friendly symbols. Asset resolution bridges this gap, automatically converting token symbols and names into the precise addresses your agent needs to execute transactions across different networks.

Modern AI agents excel at understanding user intent but hit a wall when that intent involves blockchain transactions. A user might say "stake some ETH" or "buy PEPE token," but the underlying smart contracts require exact addresses like 0xA0b86a33E6441b3D6B36b2C4e0e7A3a1b5c4b3d2. This translation layer—asset resolution—becomes critical for any AI agent operating in DeFi.

Why Asset Resolution Matters for AI Agents

The disconnect between human language and blockchain precision creates friction. Users think in terms of "Bitcoin" or "USDC," while smart contracts expect 42-character hexadecimal addresses on Ethereum or 44-character base58 strings on Solana. Without proper asset resolution, your AI agent either fails silently or, worse, interacts with the wrong token entirely.

Cross-chain complexity multiplies this challenge. USDC exists on Ethereum, Polygon, Arbitrum, and Solana—but with completely different contract addresses on each network. Your agent needs to resolve not just the symbol but the symbol within the correct network context.

How WAIaaS Handles Asset Resolution

WAIaaS provides built-in asset resolution through its REST API and MCP tools, handling the complexity behind a simple interface. The system maintains token registries for all supported networks and resolves symbols to addresses automatically.

Basic Asset Resolution via REST API

# Resolve USDC on Solana
curl http://127.0.0.1:3100/v1/assets/resolve \
  -H "Authorization: Bearer wai_sess_<token>" \
  -d '{"symbol": "USDC", "chain": "solana"}'

# Response
{
  "address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "symbol": "USDC",
  "name": "USD Coin",
  "decimals": 6,
  "chain": "solana",
  "network": "mainnet"
}

MCP Integration for Claude

With the MCP setup, Claude can resolve assets naturally within conversation:

{
  "mcpServers": {
    "waiaas": {
      "command": "npx",
      "args": ["-y", "@waiaas/mcp"],
      "env": {
        "WAIAAS_BASE_URL": "http://127.0.0.1:3100",
        "WAIAAS_SESSION_TOKEN": "wai_sess_<token>"
      }
    }
  }
}

Now Claude can handle requests like "What's the contract address for WETH on Polygon?" by calling the resolve-asset MCP tool automatically.

SDK Implementation

The TypeScript SDK abstracts asset resolution entirely:

import { WAIaaSClient } from '@waiaas/sdk';

const client = new WAIaaSClient({
  baseUrl: 'http://127.0.0.1:3100',
  sessionToken: process.env.WAIAAS_SESSION_TOKEN,
});

// Agent can work with symbols directly
const tx = await client.sendToken({
  to: 'recipient-address',
  amount: '100',
  tokenSymbol: 'USDC'  // WAIaaS resolves this automatically
});

Multi-Chain Asset Resolution

WAIaaS supports 2 chain types across 18 networks, each with its own token addressing scheme. The resolution system handles this complexity transparently.

Network-Specific Resolution

# Same symbol, different networks
curl http://127.0.0.1:3100/v1/assets/resolve \
  -d '{"symbol": "USDC", "chain": "evm", "network": "ethereum-mainnet"}'
# Returns: 0xA0b86a33E6441b3D6B36b2C4e0e7A3a1b5c4b3d2

curl http://127.0.0.1:3100/v1/assets/resolve \
  -d '{"symbol": "USDC", "chain": "solana", "network": "mainnet"}'
# Returns: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v

Fuzzy Matching and Aliases

The resolution system handles common variations and aliases:

Integration Patterns for AI Frameworks

LangChain Tools

from waiaas import WAIaaSClient
from langchain.tools import BaseTool

class ResolveAssetTool(BaseTool):
    name = "resolve_asset"
    description = "Resolve token symbol to contract address"
    
    async def _arun(self, symbol: str, chain: str):
        async with WAIaaSClient("http://localhost:3100", "wai_sess_xxx") as client:
            asset = await client.resolve_asset(symbol=symbol, chain=chain)
            return f"{symbol} address on {chain}: {asset.address}"

CrewAI Integration

from crewai import Agent, Task
from waiaas import WAIaaSClient

wallet_agent = Agent(
    role='DeFi Trading Agent',
    goal='Execute token swaps based on market analysis',
    tools=[resolve_asset_tool, execute_swap_tool],
    backstory='Expert at converting trading signals into blockchain transactions'
)

Claude MCP Direct Usage

After MCP setup, Claude automatically has access to the resolve-asset tool among 45 MCP tools:

User: "What's the contract address for LINK on Polygon?"
Claude: I'll look up the LINK token address on Polygon for you.

[Calls resolve-asset tool with symbol="LINK", chain="evm", network="polygon-mainnet"]

The LINK token address on Polygon is: 0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39

Error Handling and Edge Cases

Asset resolution can fail for various reasons. WAIaaS provides clear error handling:

try {
  const asset = await client.resolveAsset({
    symbol: 'UNKNOWNTOKEN',
    chain: 'solana'
  });
} catch (error) {
  if (error.code === 'ASSET_NOT_FOUND') {
    console.log('Token not found in registry');
  }
}

Common Edge Cases

  1. Ambiguous symbols: Multiple tokens with same symbol
  2. Network mismatches: Token doesn't exist on requested chain
  3. Deprecated tokens: Old contract addresses no longer valid
  4. Case sensitivity: "usdc" vs "USDC" vs "UsDbC"

WAIaaS handles these gracefully with detailed error messages and suggested alternatives.

Quick Start: Asset-Aware AI Agent

Here's how to build an AI agent that can resolve and work with blockchain assets:

  1. Install and start WAIaaS:
npm install -g @waiaas/cli
waiaas init
waiaas start
waiaas quickset --mode mainnet
  1. Set up MCP for Claude (or install SDK for custom agents):
waiaas mcp setup --all
  1. Test asset resolution in Claude:
User: "What's the WETH contract address on Arbitrum?"
Claude: [Uses resolve-asset tool] → Returns exact address
  1. Execute token operations:
User: "Swap 0.1 ETH for USDC on Arbitrum"
Claude: [Resolves symbols → Executes swap via Jupiter/0x providers]
  1. Monitor the transaction:
User: "What's the status of that swap?"
Claude: [Checks transaction status] → "Completed, received 185.42 USDC"

Advanced: Custom Resolution Logic

For specialized use cases, you can extend WAIaaS's resolution with custom logic:

# Add custom token to resolution registry
curl -X POST http://127.0.0.1:3100/v1/assets/custom \
  -H "X-Master-Password: <password>" \
  -d '{
    "symbol": "MYTOKEN",
    "address": "0x...",
    "name": "My Custom Token",
    "decimals": 18,
    "chain": "evm",
    "network": "ethereum-mainnet"
  }'

Asset resolution transforms AI agents from text processors into blockchain-capable entities. With proper symbol-to-address mapping, your agent can seamlessly bridge the gap between natural language requests and precise blockchain execution.

For deeper integration patterns, check out Building AI Trading Bots with WAIaaS MCP Integration and Policy-Based Security for AI Agent Wallets.

Ready to give your AI agent blockchain superpowers? Start with the WAIaaS GitHub repository or explore the full documentation at waiaas.ai. Your agent's first token swap is just a few commands away.