15 Networks, 2 Chain Types: Building Multi-Chain AI Agent Infrastructure
Your AI agent can analyze markets, generate trading strategies, and even write smart contracts. But when it comes to actually executing trades across multiple blockchains, it hits a wall. Most AI agent frameworks lack the wallet infrastructure needed to interact with the diverse ecosystem of 18+ networks that power modern DeFi, from Ethereum and Solana mainnet to Layer 2s and specialized chains.
Why Multi-Chain Matters for AI Agents
The blockchain landscape isn't a single network anymore. Your AI agent might need to:
- Swap tokens on Jupiter (Solana) then bridge to Ethereum via LI.FI
- Monitor positions across Aave (Ethereum), Drift (Solana), and Hyperliquid (custom L1)
- Stake SOL on Jito, ETH on Lido, and trade prediction markets on Polymarket (Polygon)
- Pay for API calls using different tokens based on the cheapest gas fees
Each network has different wallet formats, transaction structures, and signing mechanisms. Building this infrastructure from scratch means months of integration work before your AI agent can execute its first trade.
The Multi-Chain Wallet Infrastructure Solution
WAIaaS solves this by providing a single REST API that abstracts away blockchain complexity. Your AI agent gets one session token that works across 2 chain types (EVM and Solana) spanning 18 networks, with 39 REST API endpoints handling everything from simple transfers to complex DeFi operations.
Here's how an AI agent checks balances across multiple chains:
# One API call, multiple networks
curl http://127.0.0.1:3100/v1/wallet/balance \
-H "Authorization: Bearer wai_sess_eyJhbGciOiJIUzI1NiJ9..."
# Returns balances from all configured networks:
# {
# "solana-mainnet": {"balance": "1.5", "symbol": "SOL"},
# "ethereum-mainnet": {"balance": "0.8", "symbol": "ETH"},
# "polygon-mainnet": {"balance": "100", "symbol": "MATIC"}
# }
Universal DeFi Access
Instead of integrating with 15+ protocols individually, your AI agent can access them through standardized action providers:
# Swap on Jupiter (Solana)
curl -X POST http://127.0.0.1:3100/v1/actions/jupiter-swap/swap \
-H "Authorization: Bearer wai_sess_<token>" \
-d '{
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amount": "1000000000"
}'
# Bridge to Ethereum via LI.FI
curl -X POST http://127.0.0.1:3100/v1/actions/lifi/bridge \
-H "Authorization: Bearer wai_sess_<token>" \
-d '{
"fromChain": "solana",
"toChain": "ethereum",
"fromToken": "USDC",
"toToken": "USDC",
"amount": "100"
}'
# Lend on Aave (Ethereum)
curl -X POST http://127.0.0.1:3100/v1/actions/aave-v3/supply \
-H "Authorization: Bearer wai_sess_<token>" \
-d '{
"asset": "USDC",
"amount": "50",
"onBehalfOf": "0x..."
}'
Policy-Based Security Across Chains
The 21 policy types work across all networks. Set a spending limit once, and it applies whether your agent is trading on Solana or Ethereum:
curl -X POST http://127.0.0.1:3100/v1/policies \
-H "X-Master-Password: my-secret-password" \
-d '{
"type": "SPENDING_LIMIT",
"rules": {
"instant_max_usd": 100,
"daily_limit_usd": 1000
}
}'
This policy automatically applies USD-equivalent limits across SOL transfers on Solana, ETH transactions on Ethereum, and MATIC operations on Polygon.
Claude MCP Integration
The 45 MCP tools work seamlessly across all supported networks. Your Claude agent can execute multi-chain strategies through natural language:
{
"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 respond to: "Check my portfolio across all chains, then rebalance 10% from Solana DeFi to Ethereum staking" by automatically calling the appropriate MCP tools for each network.
Quick Multi-Chain Setup
Step 1: Start WAIaaS with Docker
git clone https://github.com/minhoyoo-iotrust/WAIaaS.git
cd WAIaaS
docker compose up -d
Step 2: Create wallets for multiple chains
npm install -g @waiaas/cli
waiaas quickset --mode mainnet # Creates wallets for major networks
Step 3: Configure MCP for Claude
waiaas mcp setup --all # Auto-registers all wallets with Claude Desktop
Step 4: Fund wallets and test
Transfer small amounts to each wallet, then ask Claude: "What's my balance across all networks?"
Step 5: Set cross-chain policies
curl -X POST http://127.0.0.1:3100/v1/policies \
-H "X-Master-Password: $(cat ~/.waiaas/recovery.key)" \
-d '{
"type": "ALLOWED_NETWORKS",
"rules": {"networks": [
{"network": "ethereum-mainnet"},
{"network": "solana-mainnet"},
{"network": "polygon-mainnet"}
]}
}'
Your AI agent now has secure access to execute transactions across Ethereum, Solana, and Polygon with unified policies and monitoring.
Advanced Multi-Chain Strategies
Cross-Chain Arbitrage
import { WAIaaSClient } from '@waiaas/sdk';
const client = new WAIaaSClient({
baseUrl: 'http://127.0.0.1:3100',
sessionToken: process.env.WAIAAS_SESSION_TOKEN,
});
// Get USDC prices across chains
const solanaPrice = await client.executeAction('jupiter-swap', 'quote', {
inputMint: 'So11111111111111111111111111111111111111112', // SOL
outputMint: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', // USDC
amount: '1000000000' // 1 SOL
});
const ethereumPrice = await client.executeAction('zerox-swap', 'quote', {
sellToken: 'ETH',
buyToken: '0xA0b86a33E6441b9435B654D4c4e58C8e2C4b3c19', // USDC
sellAmount: '1000000000000000000' // 1 ETH
});
// Execute arbitrage if spread > threshold
if (priceDiff > ARBITRAGE_THRESHOLD) {
await client.executeAction('lifi', 'bridge', {
fromChain: 'solana',
toChain: 'ethereum',
amount: arbitrageAmount
});
}
DeFi Position Management
Your agent can monitor positions across protocols and rebalance based on yields:
# Check all DeFi positions across chains
curl http://127.0.0.1:3100/v1/defi/positions \
-H "Authorization: Bearer wai_sess_<token>"
# Returns unified view:
# {
# "aave-v3": {"supplied": {"USDC": "1000"}, "borrowed": {"DAI": "500"}},
# "lido-staking": {"staked": {"ETH": "2.5"}},
# "jito-staking": {"staked": {"SOL": "10"}}
# }
Building DeFi AI Agents: From Smart Contracts to Smarter Bots
Claude MCP Integration: Give Your AI Agent a Crypto Wallet
Policy Engine Deep Dive: 4-Tier Security for AI Agent Wallets
What's Next
Multi-chain infrastructure is just the foundation. Once your AI agent can operate across networks, explore advanced capabilities like ERC-4337 Account Abstraction for gasless transactions, x402 HTTP payments for API calls, and ERC-8004 onchain reputation systems. Get started with the full codebase at GitHub or explore the interactive API documentation at waiaas.ai.