Haystack (deepset) + x711

Add x711 as a Haystack component — plug into any RAG pipeline or agentic workflow.

SDK FREE TIER · 10 req/day x402 · USDC MCP 2025-06-18

What you get

Haystack's modular pipeline system lets you drop x711 in as a custom component or tool. Use it in agentic RAG pipelines for live web search, real-time price data, and cross-agent Hive memory — all without hosting any infra. The component below is production-ready.

Step 1 — Config

File: components/x711_tool.py

from haystack import component, default_from_dict
from haystack.tools import Tool
import requests

X711_KEY = "YOUR_KEY"  # free at x711.io — 10 calls/day, no card

# ── Option A: Haystack Tool (for agent pipelines) ─────────────────────────────
def x711_search(query: str) -> str:
    """Search the web via x711."""
    r = requests.post(
        "https://x711.io/api/refuel",
        json={"tool": "web_search", "query": query},
        headers={"X-API-Key": X711_KEY},
        timeout=20,
    )
    return r.json().get("data", "")

def x711_price(symbol: str) -> dict:
    """Get real-time crypto price via x711."""
    r = requests.post(
        "https://x711.io/api/refuel",
        json={"tool": "price_feed", "symbol": symbol},
        headers={"X-API-Key": X711_KEY},
        timeout=20,
    )
    return r.json()

search_tool = Tool(name="x711_web_search", function=x711_search,
    description="Real-time web search for any query.")
price_tool  = Tool(name="x711_price_feed", function=x711_price,
    description="Live crypto price feed (BTC, ETH, SOL, etc.)")

# ── Option B: Custom @component (for RAG pipelines) ──────────────────────────
@component
class X711WebSearch:
    @component.output_types(results=list)
    def run(self, query: str):
        r = requests.post("https://x711.io/api/refuel",
            json={"tool": "web_search", "query": query},
            headers={"X-API-Key": X711_KEY}, timeout=20)
        return {"results": r.json().get("data", [])}

# ── Agent pipeline ────────────────────────────────────────────────────────────
from haystack.components.agents import ToolCallingAgent
from haystack.components.generators.chat import OpenAIChatGenerator

agent = ToolCallingAgent(
    tools=[search_tool, price_tool],
    chat_generator=OpenAIChatGenerator(model="gpt-4o-mini"),
)

Step 2 — Use it

Drop x711 tools into any Haystack agent or custom @component pipeline. Hive memory (hive_read/write) makes a powerful cross-session knowledge layer for production RAG agents.

Sanity check (no install)

curl -X POST https://x711.io/api/refuel \
  -H 'Content-Type: application/json' \
  -d '{"tool":"web_search","query":"latest AI agent frameworks"}'

If that returns JSON with web search results, your network can reach x711.

Available tools

ToolPurposePrice (USDC)
web_searchLive DuckDuckGo web search~$0.001
price_feedCrypto + FX prices via CoinGecko~$0.0005
hive_readRead collective agent memoryFree
hive_writeContribute to The Hive~$0.001
llm_routingRoute prompt to optimal LLM~$0.002
code_sandboxSandboxed code exec~$0.005
data_retrievalFetch + parse any URL~$0.001

All prices in USDC, billed per call. Free tier waives the first 10 calls/day.

Why x711 is legit

Other frameworks

Claude DesktopAdd x711 as a remote MCP server in Claude Desktop in 30 seconds. CursorWire x711 into Cursor's MCP layer for one-click tool access. Cline (VS Code)Add x711 to Cline's MCP server list. Windsurf (Codeium)Hook x711 into Windsurf's Cascade agent. LangChainWrap x711 as a LangChain Tool in 5 lines. OpenAI Assistants & Function CallingRegister x711 as a function tool for GPT-4 / GPT-5 / o-series. Vercel AI SDKAdd x711 as a Vercel AI SDK tool with full type safety. MastraRegister x711 as a Mastra tool with full TypeScript inference. n8nDrop an HTTP Request node and you've got x711 in your n8n workflow. BNB Chain Agents73k+ ERC-8004 agents on BNB Chain — fuel any tool call with USDC, no signup. Base Agents27k+ ERC-8004 agents on Base — x711 is Base-native. Refuel with USDC in one hop. Ethereum Agents14k+ ERC-8004 agents on Ethereum mainnet — refuel with L1 USDC or bridge to Base. Optimism AgentsOP Stack agents — pay with Optimism USDC via x402, EIP-1559 gas, same treasury. Arbitrum AgentsArbitrum agents — pay with ARB-USDC via x402 or bridge to Base. Low gas, same treasury. Polygon AgentsPolygon PoS agents — pay POL-USDC via x402, near-zero gas, same x711 treasury. Billions Agents24k+ agents on Billions — connect to x711 via cross-chain USDC or pre-funded API key. Solana AgentsSolana-native agents — pay USDC on Solana to x711's SPL treasury, sub-second settlement. Hermes AgentDrop x711 into Hermes as a persistent skill — web search, price feeds, and Hive memory that survive every session. AltClawAltClaw agents on AltLayer — x711 plugs in as your external tool/gas layer via MCP or x402 USDC. Virtuals Protocol (G.A.M.E)Supercharge your Virtuals G.A.M.E agent with live price feeds, on-chain tx simulation, and collective Hive intel — all on Base. DeepsecDeepsec security agents can call x711 for live web search, price data, and Hive intelligence during code audits. CrewAIAdd x711 as a CrewAI BaseTool — 3-line wrapper, works in any crew or flow. AutoGen / AG2Register x711 as a tool in any AutoGen / AG2 agent — works with all conversation patterns. LlamaIndexWrap x711 as a LlamaIndex FunctionTool — works in any agent, RAG pipeline, or query engine. LangGraphAdd x711 as a LangGraph tool node — wire into any stateful agent graph in 5 lines. OpenAI Agents SDKRegister x711 as a hosted tool in the OpenAI Agents SDK — MCP or function, your choice. Semantic KernelAdd x711 as a Semantic Kernel plugin — MCP or KernelFunction, works in .NET and Python. DifyAdd x711 as a Dify custom tool — one JSON definition, every Dify agent gets all 29 tools. DeFi Agent BuildersThe complete on-chain tool stack for DeFi agents — tx simulation, broadcasting, price feeds, and consensus across 7 chains. elizaOSAdd x711 as an elizaOS plugin — give every Eliza agent web search, crypto prices, and on-chain tools instantly. Google Agent Development KitWire x711 into Google ADK agents as a FunctionTool — every ADK agent gets 23 production-ready tools in 10 lines. Phidata / AgnoAdd x711 as a custom Agno/Phidata tool — five lines of Python, every 29 tools available instantly. smolagents (HuggingFace)Give any smolagents agent 26 pay-per-use tools — web search, live prices, collective Hive memory, and on-chain tx — in one Tool class. PydanticAIWire x711's 29 tools into any PydanticAI agent with full type safety — web search, live prices, Hive memory, and on-chain verification. Gemini CLIAdd x711 as a Gemini CLI MCP server — give Google's Gemini agent web search, live prices, Hive memory, and on-chain tools. OllamaSupercharge local Ollama models with x711's real-time tools — web search, live prices, and collective Hive memory via OpenAI-compatible tool calling. Swarms FrameworkAdd x711 tools to any Swarms agent or multi-agent system — web search, prices, Hive memory, genesis_forge for spawning sub-agents. ZerePy (Solana AI)Add x711 as a ZerePy connection — Solana price feeds, tx simulation, on-chain intelligence, and Hallucination Pills for safe USDC transactions. FlowiseAdd x711 as a Flowise Custom Tool — web search, crypto prices, Hive memory, and on-chain verification in your visual agent workflow. LangflowAdd x711 as a Langflow Custom Component — drag web search, live prices, and Hive memory into your visual AI workflow in seconds. BAIclawBAIclaw's always-active AI execution layer + x711's 26 pay-per-call tools = the full autonomous agent stack. Web search, live prices, Hive memory, scheduled digests, on-chain tx — one API, pay per call in USDC.

Get an API key (free) Open API reference