BAIclaw'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.
BAIclaw is an always-active AI execution layer built for real-time productivity, development automation, and content operations. Every BAIclaw agent that needs live data, scheduled email digests, shared memory, on-chain verification, or code execution is one x711 API call away from having it. x711 provides 26 pay-per-call tools: web_search ($0.01) for real-time context your agents can't hallucinate, email_send ($0.05) for scheduled summaries and digests, hive_read/write ($0.05/$0.10) for persistent collective memory across agent runs, llm_routing for intelligent model dispatch, code_sandbox for safe execution, and tx_simulate/broadcast for on-chain actions on 7 chains. Free tier: 10 calls/day per tool, no credit card, no subscription. Register a BAIclaw agent in 7 seconds: POST /api/onboard. Pay per call in USDC on Base via x402 — fully autonomous, no human in the loop.
Step 1 — Config
File: baiclaw_agent.py
import requests
X711_KEY = "x711_your_key" # free: POST https://x711.io/api/onboard
BASE = "https://x711.io/api/refuel"
HDR = {"Content-Type": "application/json", "X-API-Key": X711_KEY}
def web_search(query: str) -> str:
"""Real-time web search — no hallucinations."""
r = requests.post(BASE, json={"tool": "web_search", "query": query}, headers=HDR)
return r.json().get("result", "")
def send_digest(to: str, subject: str, body: str) -> bool:
"""Scheduled summaries and digests via email_send."""
r = requests.post(BASE, json={"tool": "email_send", "to": to, "subject": subject, "body": body}, headers=HDR)
return r.json().get("ok", False)
def hive_remember(content: str, namespace: str = "/baiclaw/memory") -> dict:
"""Write to The Hive — persistent memory across all agent runs."""
r = requests.post(BASE, json={"tool": "hive_write", "content": content, "namespace": namespace}, headers=HDR)
return r.json()
def hive_recall(query: str, namespace: str = "/baiclaw/memory") -> list:
"""Recall from The Hive — collective memory, shared across agents."""
r = requests.post(BASE, json={"tool": "hive_read", "query": query, "namespace": namespace}, headers=HDR)
return r.json().get("entries", [])
def price_feed(token: str) -> float:
"""Live price — 500+ tokens, no API key for this one."""
r = requests.post(BASE, json={"tool": "price_feed", "token": token}, headers=HDR)
return r.json().get("price_usd", 0)
def run_code(code: str, language: str = "python") -> str:
"""Sandboxed code execution for BAIclaw dev tasks."""
r = requests.post(BASE, json={"tool": "code_sandbox", "code": code, "language": language}, headers=HDR)
return r.json().get("output", "")
# Example: daily digest agent
if __name__ == "__main__":
news = web_search("AI agent news today")
eth = price_feed("ETH")
hive_remember(f"digest:{news[:200]}")
send_digest("you@example.com", "BAIclaw Daily Brief", f"ETH: ${eth}\n\n{news}")
print("Digest sent.")
Step 2 — Use it
1. Get your free key: POST https://x711.io/api/onboard (returns api_key in 200ms). 2. Set X711_KEY in your BAIclaw agent config. 3. Call any of the 29 tools via POST https://x711.io/api/refuel with {tool, ...params}. Free tier: 10 calls/day per tool, no card. Top up with USDC on Base for always-on operation. MCP install (one line): add {"x711":{"url":"https://x711.io/mcp"}} to your MCP config and all 29 tools appear automatically in any MCP-compatible BAIclaw runtime.
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.