Self-Hosted RPC Proxy: Why Your AI Agent Shouldn't Hit Public Endpoints

RPC proxy management becomes critical when your AI agent is hitting rate limits, burning through API credits, or leaking transaction patterns to public endpoints. Most developers start with Infura or Alchemy, but quickly discover they're paying premium prices for basic infrastructure while sacrificing privacy and control.

Why RPC Proxies Matter for AI Agents

AI agents make hundreds of blockchain queries per hour — checking balances, simulating transactions, monitoring gas prices, and validating smart contract states. Unlike human users who might check their wallet a few times per day, autonomous agents are constantly polling the network.

Public RPC endpoints throttle requests, charge per call, and log every query. Your trading strategies, wallet addresses, and transaction patterns become visible to third parties. For production agents managing real funds, this creates both cost and security concerns.

WAIaaS Built-in RPC Proxy

WAIaaS includes a self-hosted RPC proxy that sits between your AI agent and blockchain networks. Instead of your agent hitting external endpoints directly, it routes all requests through your local WAIaaS instance, which then forwards them to your configured RPC providers.

Here's how to check your RPC proxy configuration:

curl http://127.0.0.1:3100/v1/rpc-proxy-url \
  -H "Authorization: Bearer wai_sess_<your-token>"

The proxy automatically handles:

Setting Up Your RPC Infrastructure

WAIaaS supports 2 chain types (EVM and Solana) across 18 networks. For each network you plan to use, configure at least one RPC endpoint in your environment variables:

# Ethereum mainnet
WAIAAS_RPC_EVM_ETHEREUM_MAINNET=https://eth-mainnet.g.alchemy.com/v2/your-key

# Solana mainnet  
WAIAAS_RPC_SOLANA_MAINNET=https://api.mainnet-beta.solana.com

# Base mainnet
WAIAAS_RPC_EVM_BASE_MAINNET=https://base-mainnet.g.alchemy.com/v2/your-key

# Polygon
WAIAAS_RPC_EVM_POLYGON_MAINNET=https://polygon-rpc.com

For production setups, configure multiple RPC providers per network for redundancy:

# Multiple providers for Ethereum (comma-separated)
WAIAAS_RPC_EVM_ETHEREUM_MAINNET=https://eth.llamarpc.com,https://rpc.ankr.com/eth,https://ethereum.publicnode.com

Docker Deployment with RPC Configuration

The Docker deployment makes RPC proxy setup straightforward. Create an .env file with your RPC endpoints:

# .env file
WAIAAS_RPC_SOLANA_MAINNET=https://api.mainnet-beta.solana.com
WAIAAS_RPC_EVM_ETHEREUM_MAINNET=https://eth-mainnet.g.alchemy.com/v2/your-key
WAIAAS_RPC_EVM_BASE_MAINNET=https://base-mainnet.g.alchemy.com/v2/your-key
WAIAAS_RPC_EVM_ARBITRUM_MAINNET=https://arb1.arbitrum.io/rpc

Then start WAIaaS with Docker Compose:

services:
  daemon:
    image: ghcr.io/minhoyoo-iotrust/waiaas:latest
    container_name: waiaas-daemon
    ports:
      - "127.0.0.1:3100:3100"
    volumes:
      - waiaas-data:/data
    environment:
      - WAIAAS_DATA_DIR=/data
      - WAIAAS_DAEMON_HOSTNAME=0.0.0.0
    env_file:
      - path: .env
        required: false
    restart: unless-stopped

volumes:
  waiaas-data:
    driver: local

Why Self-Hosted Beats Managed Services

Cost Control: Instead of paying per API call, you pay your RPC provider's flat rate (or run your own nodes). For high-frequency agents, this can reduce costs by 10x.

Privacy: Your transaction patterns stay local. No third party sees which tokens you're querying, which contracts you're analyzing, or when you're preparing transactions.

Reliability: Configure multiple RPC providers with automatic failover. If one goes down, your agent keeps running.

Customization: Built-in caching, custom retry logic, and request filtering. You control how your agent interacts with the blockchain.

No Vendor Lock-in: Switch RPC providers without changing your agent code. The proxy abstracts away provider-specific quirks.

Integration with AI Agent Frameworks

The RPC proxy works seamlessly with WAIaaS's 45 MCP tools for Claude Desktop and other AI frameworks. When your AI agent calls blockchain functions, it automatically routes through your local proxy:

# Configure MCP to use your WAIaaS instance
{
  "mcpServers": {
    "waiaas": {
      "command": "npx",
      "args": ["-y", "@waiaas/mcp"],
      "env": {
        "WAIAAS_BASE_URL": "http://127.0.0.1:3100",
        "WAIAAS_SESSION_TOKEN": "wai_sess_<your-token>"
      }
    }
  }
}

Your AI agent's blockchain queries — balance checks, transaction simulations, DeFi position monitoring — all route through your self-hosted infrastructure.

Quick Start: Self-Hosted RPC Proxy

  1. Clone and configure:
git clone https://github.com/minhoyoo-iotrust/WAIaaS.git
cd WAIaaS
echo "WAIAAS_RPC_SOLANA_MAINNET=https://api.mainnet-beta.solana.com" > .env
  1. Start with Docker:
docker compose up -d
  1. Create a wallet and session:
npm install -g @waiaas/cli
waiaas quickset --mode mainnet
  1. Test the RPC proxy:
curl http://127.0.0.1:3100/v1/rpc-proxy-url \
  -H "Authorization: Bearer wai_sess_<your-token>"
  1. Set up MCP integration:
waiaas mcp setup --all

Your AI agent now has a self-hosted RPC proxy handling all blockchain interactions, with full control over providers, caching, and failover logic.

For deeper integration patterns and advanced configurations, check out the GitHub repository at https://github.com/minhoyoo-iotrust/WAIaaS and explore the full documentation at https://waiaas.ai.

What's Next

Ready to eliminate RPC bottlenecks and reclaim control of your AI agent's blockchain infrastructure? The self-hosted approach gives you the privacy, reliability, and cost control that production agents demand.