Skip to main content
Skip to main content

GOAT SDK

web3agent bundles several GOAT SDK plugins that extend its capabilities with DeFi protocol interactions, token standards, and on-chain data. Unlike the orbs_ or lifi_ prefixes, GOAT tools use varied naming conventions depending on the plugin.

Most plugins require no configuration. Two optional plugins activate only when their API keys are present.

Bundled Plugins

Uniswap

Provides swap execution and liquidity pool interaction on Uniswap V2 and V3.

Key tools:

  • uniswap_get_quote — get a swap quote from Uniswap routing
  • uniswap_swap — execute a swap through Uniswap
  • uniswap_get_pool_info — fetch pool reserves, fee tier, and tick data

Supported chains: Ethereum, Base, Arbitrum, Optimism, Polygon (wherever Uniswap V3 is deployed)

// AI agent usage
uniswap_swap({
  tokenIn: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",  // USDC
  tokenOut: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
  amountIn: "1000000000", // 1000 USDC
  slippageTolerance: 0.5, // 0.5%
  chainId: 1,
})

Balancer

Balancer V2 pool interactions including weighted pools, stable pools, and boosted pools.

Key tools:

  • balancer_get_quote — get a swap quote from Balancer
  • balancer_swap — execute a swap through Balancer
  • balancer_get_pool — fetch pool composition and weights

ERC-20

Standard ERC-20 token operations. These tools work on any ERC-20 token on any supported chain.

Key tools:

  • erc20_get_balance — read token balance for an address
  • erc20_transfer — transfer tokens to another address
  • erc20_approve — approve a spender allowance
  • erc20_get_allowance — check current allowance
  • erc20_get_token_info — fetch name, symbol, decimals, total supply

Example: reading an ERC-20 balance

// Via MCP tool
erc20_get_balance({
  tokenAddress: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", // USDC on Base
  walletAddress: "0xYourAddress",
  chainId: 8453,
})

// Returns: { balance: "1500000000", formatted: "1500.0", symbol: "USDC" }

Example: approving a spender

erc20_approve({
  tokenAddress: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  spender: "0xSomeContractAddress",
  amount: "1000000000", // 1000 USDC
  chainId: 8453,
})

ERC-721

NFT operations for ERC-721 tokens.

Key tools:

  • erc721_get_owner — find the owner of a specific token ID
  • erc721_get_balance — count NFTs owned by an address
  • erc721_transfer — transfer an NFT to another address
  • erc721_get_token_uri — fetch the metadata URI for a token
erc721_get_owner({
  contractAddress: "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D", // BAYC
  tokenId: "1234",
  chainId: 1,
})
// Returns: { owner: "0x..." }

ENS

Ethereum Name Service resolution and reverse lookup.

Key tools:

  • ens_resolve — resolve an ENS name to an address
  • ens_reverse_lookup — find the primary ENS name for an address
  • ens_get_text_record — read ENS text records (avatar, url, email, etc.)

Example: resolving an ENS name

ens_resolve({
  name: "vitalik.eth",
})
// Returns: { address: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" }

Example: reverse lookup

ens_reverse_lookup({
  address: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
})
// Returns: { name: "vitalik.eth" }

ENS resolution works on Ethereum mainnet. The resolved address is chain-agnostic.

DexScreener

Real-time token price and market data from DexScreener's aggregated DEX feed.

Key tools:

  • dexscreener_get_token_info — price, volume, liquidity, and pair data for any token
  • dexscreener_search — search for tokens by name or symbol
  • dexscreener_get_trending — trending tokens by chain
dexscreener_get_token_info({
  tokenAddress: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  chainId: 8453,
})
// Returns: { priceUsd: "1.0001", volume24h: "45000000", liquidity: "12000000", ... }

DexScreener data is useful for price discovery on long-tail tokens that aren't in the canonical registry.

Optional Plugins

These plugins are inactive unless the corresponding API key is set.

0x Protocol

Aggregated swap routing via the 0x API. Requires ZEROX_API_KEY.

ZEROX_API_KEY=your_key npx web3agent

Key tools:

  • zerox_get_quote — get a swap quote from 0x aggregator
  • zerox_swap — execute a swap via 0x

The 0x plugin provides an alternative routing path to Uniswap and Orbs. It's useful when you want to compare quotes across aggregators.

CoinGecko

Token prices, market caps, and historical data from CoinGecko. Requires COINGECKO_API_KEY.

COINGECKO_API_KEY=your_key npx web3agent

Key tools:

  • coingecko_get_price — current price for one or more tokens
  • coingecko_get_market_data — market cap, volume, circulating supply
  • coingecko_get_historical_price — price at a specific date
  • coingecko_search — search tokens by name or symbol
coingecko_get_price({
  ids: ["ethereum", "bitcoin", "usd-coin"],
  vsCurrencies: ["usd", "eur"],
})
// Returns: { ethereum: { usd: 3142.50, eur: 2890.20 }, ... }

Without an API key, CoinGecko tools are not registered and won't appear in the tool list.

Write Operations

ERC-20 transfers, approvals, ERC-721 transfers, and swap executions are write operations. They go through the confirmation queue when CONFIRM_WRITES=true (the default). The AI agent receives a confirmation ID and must call transaction_confirm before the transaction executes.

Set CONFIRM_WRITES=false for autonomous operation:

CONFIRM_WRITES=false npx web3agent

Chain Support

GOAT plugins work on any chain that web3agent supports, provided the protocol is deployed there. Uniswap V3, for example, is not on every chain. If a protocol isn't deployed on the requested chain, the tool returns an error indicating the protocol is unavailable on that network.