Wrap x711 as a LangChain Tool in 5 lines.
x711's REST API plays nicely with LangChain's Tool abstraction. The example below creates a reusable web_search tool that any agent (ReAct, OpenAI Functions, LangGraph) can call.
File: your_agent.py
from langchain_core.tools import tool
import requests
@tool
def x711_search(query: str) -> str:
"""Search the web via x711 (free tier, no key needed)."""
r = requests.post(
"https://x711.io/api/refuel",
json={"tool": "web_search", "query": query},
timeout=20,
)
r.raise_for_status()
return r.json()["data"]
# Use with any agent — ReAct, LangGraph, OpenAI Functions
tools = [x711_search]
10 calls/day free with no setup. For higher volume, POST to /api/onboard to get an API key, then send X-API-Key header.
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.
| 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.
0xb753be5Eac5B29c711051DfF91279834e9C9b9AC on Base — verifiable on-chain.