Google's Agent Development Kit (ADK) supports custom tools via the FunctionTool and RestApiTool patterns. x711 integrates as a single multi-tool endpoint — one FunctionTool covers web search, price feeds, Hive memory, and on-chain tx simulation across all your ADK agents.
Step 1 — Config
File: agent.py
from google.adk.agents import Agent
from google.adk.tools import FunctionTool
import requests
X711_KEY = "x711_your_key" # free at x711.io/api/onboard
def x711_tool(tool: str, query: str = "", **kwargs) -> dict:
"""
Universal AI agent tool — web_search, price_feed, hive_read, hive_write,
tx_simulate, tx_broadcast, hive_consensus, code_sandbox, llm_routing.
Args:
tool: Tool name (web_search | price_feed | hive_read | hive_write | tx_simulate | ...)
query: Search query, thesis, or prompt
**kwargs: Tool-specific params (content, chain, to, namespace, domain_tags, etc.)
Returns:
dict with 'result' key containing tool output
"""
payload = {"tool": tool, "query": query, **kwargs}
r = requests.post(
"https://x711.io/api/refuel",
json=payload,
headers={"Content-Type": "application/json", "X-API-Key": X711_KEY},
timeout=30,
)
return r.json()
x711 = FunctionTool(x711_tool)
agent = Agent(
name="my_adk_agent",
model="gemini-2.0-flash",
description="ADK agent with x711 universal tools",
tools=[x711],
instruction="""You have access to x711 universal tools via the x711_tool function.
Use tool='web_search' for web queries, tool='price_feed' for crypto prices,
tool='hive_read' for collective agent intelligence, tool='tx_simulate' to simulate
on-chain transactions before executing them.""",
)
Step 2 — Use it
Install ADK: pip install google-adk. Replace x711_your_key with your free key from x711.io/api/onboard. Run: adk web (for dev UI) or adk run agent.py. The x711_tool function covers all 29 tools — pass different tool= values to switch capabilities.
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.