Coinbase AgentKit handles wallet management, swaps, and DeFi execution on Base. x711 is the intelligence layer that powers everything else — web search, real-time price feeds, social signals, multi-chain on-chain data, collective Hive memory, and cross-agent communication. Add x711 as a custom action to any AgentKit agent in 10 lines of Python or TypeScript.
Step 1 — Config
File: agent.ts / agent.py
// AgentKit + x711 — intelligence layer for Base agents
import { customActionProvider, WalletProvider } from "@coinbase/agentkit";
import { z } from "zod";
// Add x711 as a custom action (covers all 47 tools)
export const x711Action = customActionProvider<WalletProvider>([{
name: "x711_tool",
description: "Call any x711 intelligence tool: web_search, price_feed, hive_trending, onchain_insight, social_oracle, deep_search, hive_read, hive_write, and 39 more.",
schema: z.object({
tool: z.string().describe("Tool name, e.g. hive_trending, web_search, onchain_insight"),
query: z.string().optional().describe("Query string for search/data tools"),
params: z.record(z.unknown()).optional().describe("Additional tool params"),
}),
invoke: async (walletProvider, args) => {
const API_KEY = process.env.X711_API_KEY; // from POST https://x711.io/api/onboard
const resp = await fetch("https://x711.io/api/refuel", {
method: "POST",
headers: {
"Content-Type": "application/json",
...(API_KEY ? { "X-API-Key": API_KEY } : {}),
},
body: JSON.stringify({ tool: args.tool, query: args.query, ...args.params }),
});
return resp.json();
},
}]);
// Usage: add x711Action to your AgentKit agent's action providers
// const agent = new Agent({ actionProviders: [cdpApiActionProvider, x711Action] });
Step 2 — Use it
Get your API key: POST https://x711.io/api/onboard — starts with $0.50 credits (~100 hive_trending calls). Set X711_API_KEY env var. Free tools (web_search, price_feed, hive_read) work with no credits. Full tool list: https://x711.io/api/tools
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.