# AgentPay > The economic intelligence layer for agent spend. An agent reasons about cost — prices a plan before spending and routes to the cheapest tool that works — under a hard budget cap enforced before a dollar moves. 17 free tools to start: no API keys, no USDC, no wallet setup. Every call is session-tracked with a full receipt. AgentPay gives agents a wallet, a budget cap, and the awareness to spend it well. An agent can onboard with zero humans and zero funding in three calls: register, discover, call. Free tools cost $0 and need no funded wallet, yet every call still produces a receipt. Paid tools (and metered inference, coming) use x402: a 402 challenge, USDC settlement, retry with proof, verified on-chain. Chain-agnostic — USDC on Stellar or Base (CCTP-bridged 1:1). ## Onboarding (zero human, zero funding) 1. POST /v1/agent/register → { wallet, session_token, free_tools } (free) 2. GET /tools → list tools 3. POST /tools/{name}/call → { result, receipt } (free tools settle $0) Paid anchors (all $0.01, Bazaar-indexed): POST /v1/session/create (budget-capped session); pre_trade_check (one-call trade verdict — slippage at size, funding carry, OI crowding, security); verified_route (buyer-side trust oracle — sweeps the x402 marketplace, collapses sybils, returns one vetted, ready-to-pay provider). Price any multi-tool plan BEFORE spending: POST /v1/plan/estimate (free, no wallet). ## Gateway - Production: https://agentpay.tools - Chains: USDC on Stellar or Base (Base is the canonical paid chain; Stellar is supported and CCTP-bridged) - Tools: 20 (17 free) - Protocol: x402-v2 (HTTP 402 → pay → retry) - SDK: pip install agentpay-x402 — one-liner: `from agentpay import quickstart; s = quickstart(); print(s.call('token_price', {'symbol':'ETH'}).data['price_usd'])` (Base support: `pip install "agentpay-x402[base]"`) ## Tools - crypto_news (Free): Latest crypto news and community sentiment from r/CryptoCurrency for any token - defi_tvl (Free): DeFi protocol Total Value Locked from DeFiLlama. Returns top 10 or a specific protocol. - dune_query (Free): Run any Dune Analytics query and return live onchain results by query ID. Use fast_only=True for live bots — returns cached result instantly or raises immediately, never blocks. - fear_greed_index (Free): Crypto Fear & Greed Index (0=extreme fear, 100=extreme greed) with optional history - funding_rates (Free): Get perpetual futures funding rates across Binance, Bybit, and OKX - gas_tracker (Free): Get current Ethereum gas prices (slow, standard, fast) - market_snapshot (Free): Fed rate, inflation proxy, S&P 500, BTC, ETH, and gas in one call. Replaces three separate API integrations with a single normalized response — the only tool that gives you macro + crypto in one shot. - open_interest (Free): Get total open interest in perpetual futures for a given asset, including 1h and 24h change percentages, long/short ratio, and per-exchange breakdown. Pairs with funding_rates to complete the derivatives picture. - orderbook_depth (Free): Get real bid/ask depth and slippage estimates at $10k, $50k, and $250k notional for a trading pair. Returns best bid/ask, spread percentage, and how much slippage to expect at each trade size. - pre_trade_check ($0.01): One-call pre-trade sanity check: 'I want to long $X of SYMBOL — is now sane?' Combines live orderbook slippage at YOUR size, cross-exchange funding (carry cost), open-interest crowding, and optional contract security into a single ok/caution/avoid verdict with a per-factor breakdown. Replaces four API integrations and the judgment layer on top of them. Raw component data embedded so you can apply your own thresholds. - session_create ($0.01): Open a budget-capped agent session on AgentPay. Pay $0.01 USDC once — get a session_id, budget config, and gateway URL. Enforces a hard max_spend cap across all subsequent tool calls via the AgentPay SDK. The entry point for agents discovering AgentPay on Base Bazaar. - token_market_data (Free): Get market cap, 24h volume, ATH, and price change for any token. Note: does NOT return pool depth or slippage — for pre-trade liquidity estimates, use a dedicated orderbook tool. - token_price (Free): Get the current USD price of any cryptocurrency token - token_security (Free): Scan any token contract for honeypot, rug pull, and security risks - url_reader (Free): Convert any URL to clean, LLM-ready markdown. Strips ads, nav, and boilerplate — returns just the content. No API key needed. - verified_route ($0.01): Paid buyer-side trust oracle: 'I need X, budget $Y — which x402 tool is real?' Sweeps the WHOLE x402 marketplace across many queries (a single search shows only a slice), collapses sybil/factory clusters (one wallet stamping many fake-distinct listings → one entry), ranks the genuinely-used survivors by real unique-payer usage, and returns ONE vetted recommendation with a ready-to-pay x402 challenge. The credit-bureau check an agent cannot do itself in one query — pay $0.01 to avoid paying a scam or a dead stub. - wallet_balance (Free): Get the token balances for any Ethereum or Stellar wallet address - web_search (Free): Search the web and return the top 5 results with their full content as clean markdown. Better than DIY because zero setup and results include page content, not just links. - whale_activity (Free): Detect recent large wallet movements for a token (whale tracking) - yield_scanner (Free): Find best DeFi yield opportunities across protocols for a given token ## Integration POST /tools/{name}/call with {parameters, agent_address} On 402: free tools ($0.000) authorize without an on-chain tx; paid tools settle USDC on Stellar or Base, retry with X-Payment header. Response: data is in result["result"] ## Docs - README: https://agentpay.tools/ - MCP server: npx @romudille/agentpay-mcp - npm: https://www.npmjs.com/package/@romudille/agentpay-mcp - GitHub: https://github.com/romudille-bit/agentpay - Glama MCP: https://glama.ai/mcp/servers/romudille-bit/agentpay