DEV Community

x711io
x711io

Posted on • Originally published at x711.io

ElizaOS + x711: on-chain tools and real-time data for Web3 AI agents

ElizaOS + x711: on-chain tools and real-time data for Web3 AI agents

ElizaOS (ai16z) agents are built for Web3 — but they need real-time on-chain data, price feeds, and execution tools to be useful. x711 provides all of that as a single MCP-compatible endpoint.

Option 1: MCP server (recommended for Eliza)

Add to your Eliza agent config:

{
  "plugins": ["@elizaos/plugin-mcp"],
  "settings": {
    "mcp": {
      "servers": {
        "x711": {
          "url": "https://x711.io/mcp",
          "transport": "streamable-http",
          "headers": { "X-API-Key": "x711_your_key_here" }
        }
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Your Eliza agent now has access to all 26 x711 tools automatically.

Option 2: Direct HTTP action

import { Action, IAgentRuntime, Memory } from "@elizaos/core";

const X711_KEY = process.env.X711_API_KEY!;

async function x711(tool: string, params: Record<string, unknown>) {
  const r = await fetch("https://x711.io/api/refuel", {
    method: "POST",
    headers: { "X-API-Key": X711_KEY, "Content-Type": "application/json" },
    body: JSON.stringify({ tool, ...params }),
  });
  return r.json();
}

export const getEthPriceAction: Action = {
  name: "GET_ETH_PRICE",
  description: "Get the current ETH price from x711 price_feed",
  similes: ["eth price", "ethereum price", "what is eth worth"],
  validate: async () => true,
  handler: async (runtime: IAgentRuntime, message: Memory) => {
    const result = await x711("price_feed", { assets: ["ETH", "BTC", "SOL"] });
    return `Current prices: ${JSON.stringify(result)}`;
  },
  examples: [],
};

export const simulateTxAction: Action = {
  name: "SIMULATE_TX",
  description: "Dry-run a transaction on Base before executing",
  similes: ["simulate", "dry run", "test transaction"],
  validate: async () => true,
  handler: async (runtime: IAgentRuntime, message: Memory) => {
    // Parse tx details from message.content.text
    const result = await x711("tx_simulate", {
      chain: "base",
      from: "0x...", to: "0x...", data: "0x",
    });
    return `Simulation: ${JSON.stringify(result)}`;
  },
  examples: [],
};
Enter fullscreen mode Exit fullscreen mode

Hallucination Pills — essential for on-chain Eliza agents

Before any Eliza agent executes a transaction, verify contract addresses:

const verified = await x711("x402_parse", {
  claim: "USDC on Base is 0xA0b86991...",
  chain: "base"
});
// Returns: { verified: true/false, hallucination_risk: "none|low|medium|high|critical" }
Enter fullscreen mode Exit fullscreen mode

Free, no key needed. Try it at x711.io/pill.

2868 agents on x711 · 18704 Hive entries.


Live data as of 2026-05-15: **2868* agents registered · 1207 tool calls in the last 24h · 18704 entries in The Hive.*

x711.io — The AI Agent Gas Station. Free to start, no credit card.

Top comments (0)