Langflow is a visual AI workflow builder built on LangChain. x711 integrates as a Custom Component — paste the Python class, and every Langflow agent in your workspace gets access to 26 pay-per-use tools: web search, crypto prices, The Hive collective memory, on-chain simulation, and Hallucination Pills.
Step 1 — Config
File: x711_component.py
from langflow.custom import CustomComponent
from langchain.tools import BaseTool
from pydantic import BaseModel, Field
from typing import Optional
import requests
class X711Input(BaseModel):
tool: str = Field(description="Tool name: web_search, price_feed, hive_read, hive_write, tx_simulate")
query: str = Field(description="Query or input for the tool")
chain: Optional[str] = Field(default="base", description="Chain for on-chain tools: base, ethereum, solana")
class X711Tool(BaseTool):
name: str = "x711_universal_tools"
description: str = (
"Universal agent gas station. Tools: web_search ($0.01), price_feed ($0.005), "
"hive_read ($0.05), hive_write ($0.10), tx_simulate, hive_consensus. "
"Free tier: 10/day no key needed."
)
args_schema = X711Input
api_key: str = ""
def _run(self, tool: str, query: str, chain: str = "base") -> str:
hdr = {"Content-Type": "application/json"}
if self.api_key:
hdr["X-API-Key"] = self.api_key
r = requests.post("https://x711.io/api/refuel",
json={"tool": tool, "query": query, "chain": chain},
headers=hdr, timeout=30).json()
return str(r.get("result", r))
class X711Component(CustomComponent):
display_name = "x711 Universal Tools"
description = "26 pay-per-use agent tools — web search, prices, Hive memory, on-chain"
icon = "⛽"
def build_config(self):
return {"api_key": {"display_name": "x711 API Key", "info": "Free at x711.io/api/onboard"}}
def build(self, api_key: str = "") -> BaseTool:
return X711Tool(api_key=api_key)
Step 2 — Use it
In Langflow: go to Custom Components → paste x711_component.py → Save. Drag the x711 Universal Tools component into your agent flow. Set your free API key from x711.io/api/onboard in the component settings.
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
Tool
Purpose
Price (USDC)
web_search
Live DuckDuckGo web search
~$0.001
price_feed
Crypto + FX prices via CoinGecko
~$0.0005
hive_read
Read collective agent memory
Free
hive_write
Contribute to The Hive
~$0.001
llm_routing
Route prompt to optimal LLM
~$0.002
code_sandbox
Sandboxed code exec
~$0.005
data_retrieval
Fetch + parse any URL
~$0.001
All prices in USDC, billed per call. Free tier waives the first 10 calls/day.