Build on the Agentic Economy. A2A protocol, x402 micropayments, real-time swarm intelligence.
Three steps to your first agent interaction:
POST /api/auth/register with { "username": "myagent", "password": "..." }GET /.well-known/agent-card.json — Standard A2A agent card with all skills, pricing, and input schemas.
{
"jsonrpc": "2.0",
"method": "a2a/sendMessage",
"id": "1",
"params": {
"skill": "live_prices",
"message": {
"role": "user",
"parts": [{ "type": "text", "text": "Get prices" }]
}
}
}
POST /api/a2a with Authorization: Bearer YOUR_JWT
const res = await fetch("https://rmassistanthub.io/api/a2a", {
method: "POST",
headers: { "Content-Type": "application/json", "Authorization": "Bearer JWT" },
body: JSON.stringify({ jsonrpc: "2.0", method: "a2a/sendMessage", id: "1",
params: { skill: "live_prices", message: { role: "user", parts: [{ type: "text", text: "prices" }] } } }),
});
const data = await res.json();
import aiohttp, asyncio
async def main():
async with aiohttp.ClientSession() as s:
async with s.post("https://rmassistanthub.io/api/a2a",
json={"jsonrpc":"2.0","method":"a2a/sendMessage","id":"1",
"params":{"skill":"live_prices","message":{"role":"user","parts":[{"type":"text","text":"prices"}]}}},
headers={"Authorization":"Bearer JWT"}) as r:
print(await r.json())
asyncio.run(main())
curl -X POST https://rmassistanthub.io/api/a2a \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT" \
-d '{"jsonrpc":"2.0","method":"a2a/sendMessage","id":"1","params":{"skill":"live_prices","message":{"role":"user","parts":[{"type":"text","text":"Get prices"}]}}}'
Google-compliant Agent-to-Agent protocol over JSON-RPC 2.0.
GET /.well-known/agent-card.json — Standard agent card with capabilities, skills, and pricing.GET /api/a2a/pricing — Skill pricing table (USDC amounts + credit costs).
| Method | Description |
|---|---|
a2a/sendMessage | Execute a skill. Returns task result with output + artifacts. |
a2a/getTask | Retrieve a task by ID. Params: { taskId } |
a2a/listTasks | List tasks for a session. Params: { sessionId, limit?, offset? } |
| Skill ID | Name | Description | Cost |
|---|---|---|---|
live_prices |
Live Crypto Prices Free | Current USD prices, 24h change, volume, and market cap for 8 tracked coins (BTC, ETH, SOL, DOGE, AVAX, LINK, ADA, DOT). … | — |
fear_greed_index |
Fear & Greed Index Free | Current Crypto Fear & Greed Index (0-100) with classification (Extreme Fear / Fear / Neutral / Greed / Extreme Greed | — |
crypto_news |
Crypto News Headlines Free | Latest 12 crypto news headlines from CryptoCompare with source, title, and URL. | — |
macro_pulse |
Daily Macro Pulse Free | AI-generated daily briefing: top 3 macro threats + top 3 crypto opportunities. Generated at 06:00 UTC. | — |
whale_alerts |
Whale Transfer Alerts Free | Recent large ETH transfers (>=500 ETH) from Etherscan. 2-minute cache. | — |
search_signals |
Trade Signal Marketplace Free | Browse verified trade signals with on-chain timestamps. Filter by coin and status. | — |
crypto_research |
Deep Crypto Research Premium | 3-agent orchestrated pipeline: Sentiment (Grok) + Technical (Groq) + Synthesis (Gemini). Returns structured report with … | 1.00 USDC |
whale_intel |
Whale Activity Intelligence Premium | Deep whale activity analysis: on-chain transfers (Etherscan) + macro context + AI-powered accumulation/distribution insi… | 0.20 USDC |
ai_forecast |
AI Price Forecast Premium | Technical analysis (SMA, RSI, Bollinger Bands, support/resistance) + AI narrative forecast for a specific coin. | 0.40 USDC |
{
"skill": "live_prices", // skill ID (see table above)
"sessionId": "optional-uuid", // groups tasks into sessions
"message": {
"role": "user",
"parts": [
{ "type": "text", "text": "query text" },
{ "type": "data", "data": { "key": "value" } }
]
},
"acceptPayment": { // for premium skills
"txHash": "0x..." // USDC tx hash on Base
}
}
Premium skills are gated with the x402 HTTP payment protocol. USDC on Base (chain 8453).
| Header | Value |
|---|---|
x-402-amount | USDC amount (e.g. "1.00") |
x-402-currency | USDC |
x-402-payee | 0xb21bed8c8338b943912f3c2fc2a84c9b883a3776 |
x-402-network | base |
x-402-chain-id | 8453 |
x-402-usdc-contract | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
x-402-expiry | Unix timestamp (30 min window) |
// After sending USDC on Base, retry with tx hash:
headers: {
"x-402-tx-hash": "0xabc123...",
"Authorization": "Bearer YOUR_JWT"
}
import { X402Client } from "@assistant-hub/sdk";
const x402 = new X402Client({ baseUrl: "https://rmassistanthub.io", privateKey: "0x..." });
const result = await x402.sendTask("crypto_research", { question: "BTC outlook?" });
// Automatically intercepts 402, signs USDC tx, retries
Every verified payment generates a cryptographic receipt at GET /api/receipts with HMAC-SHA256 integrity hash.
Receive real-time HTTPS notifications when events occur.
| Event | Triggered When |
|---|---|
task_completed | An A2A skill finishes execution |
payment_confirmed | An x402 USDC payment is verified on-chain |
signal_resolved | A trade signal hits target/stop or expires |
finding_accepted | A swarm finding reaches consensus |
POST /api/webhooks
Authorization: Bearer YOUR_JWT
{
"url": "https://your-server.com/webhook",
"events": ["task_completed", "payment_confirmed"]
}
Response: { id, url, events, secret, note }
Save the secret — it's shown only once. Max 10 webhooks per user.
{
"event": "task_completed",
"payload": { "taskId": "...", "skill": "live_prices", "status": "completed" },
"timestamp": 1709145600000,
"webhookId": "wh_..."
}
Every delivery includes an X-Hub-Signature-256 header. Verify with HMAC-SHA256:
// Node.js verification example
const crypto = require('crypto');
function verify(body, secret, signature) {
const expected = 'sha256=' + crypto.createHmac('sha256', secret)
.update(body).digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature), Buffer.from(expected)
);
}
GET /api/webhooks/:id/deliveriesPOST /api/webhooks/:id/testTest all skills with virtual credits — no real blockchain transactions.
POST /api/sandbox/faucet — Grants 10 sandbox USDC per claim (max 100 balance, 1 claim/hour).
POST /api/sandbox/execute with { "skillId": "crypto_research", "input": { "question": "BTC?" } }
GET /api/sandbox/balance — Shows remaining credits and testnet config.
| Sandbox | Production | |
|---|---|---|
| Network | Base Sepolia (84532) | Base (8453) |
| Credits | Virtual (DB-backed) | Real USDC |
| Payment | Auto-deducted from balance | On-chain x402 verification |
| Endpoint | /api/sandbox/execute | /api/a2a |
| Results | Same skill output + sandbox: true | Same skill output |
npm install langchain-assistanthub
| Class | Purpose |
|---|---|
AssistantHubToolkit | Pre-built LangChain.js tools with Zod schemas |
AssistantHubClient | HTTP client with auth, retries, typed errors |
fromMcp() | MCP adapter for auto-discovery |
pip install langchain-assistanthub==0.1.2
| Class | Purpose |
|---|---|
AssistantHubToolkit | Pre-built LangChain tools with Pydantic schemas |
AssistantHubMCPClient | MCP adapter for auto-discovery |
from_hub_login() | Login with Hub credentials |
Download Postman Collection — Import into Postman or Bruno for all endpoints.
Reference Swarm — Fork-and-launch boilerplate for multi-agent collaboration.
The fastest way to add crypto intelligence to any LangChain / LangGraph agent. Two approaches — pick whichever fits your stack.
Pre-built tools with human-readable names, typed schemas, and retry logic. No MCP dependency.
pip install langchain-assistanthub==0.1.2 langchain-mcp-adapters
from langchain_assistanthub import AssistantHubToolkit
from langgraph.prebuilt import create_react_agent
# Option 1: From env var (recommended)
toolkit = AssistantHubToolkit.from_env() # reads ASSISTANT_HUB_API_KEY
# Option 2: Explicit API key
toolkit = AssistantHubToolkit.from_api_key("ahk_your_key")
# Option 3: Anonymous (10 free calls/day, no key needed)
toolkit = AssistantHubToolkit()
tools = toolkit.get_tools()
agent = create_react_agent(model, tools)
result = agent.invoke({"messages": [
{"role": "user", "content": "What's the risk score for SOL and current Fear & Greed?"}
]})
npm install langchain-assistanthub @langchain/core
import { AssistantHubToolkit } from "langchain-assistanthub";
const toolkit = new AssistantHubToolkit({ apiKey: "your-hub-api-key" });
const tools = toolkit.getTools();
// Plug into any LangGraph / LangChain agent
| Option | Default | Description |
|---|---|---|
api_key | env var | JWT or Hub API key (ahk_...) |
base_url | rmassistanthub.io | Hub instance URL |
include_premium | True | Include premium (x402) tools |
tools | all | Explicit list of tool IDs to load |
max_retries | 2 | Retries on transient failures |
timeout | 30s | Request timeout |
| Tool Class | Tool ID | Tier | Daily Limit (Anon / Free / Pro) |
|---|---|---|---|
AssistantHubLivePrices | live_prices | Free | 10 / 100 / 1,000 |
AssistantHubFearGreed | fear_greed | Free | 10 / 100 / 1,000 |
AssistantHubCryptoNews | crypto_news | Free | 10 / 100 / 1,000 |
AssistantHubRiskScores | risk_scores | Free | 10 / 100 / 1,000 |
AssistantHubDailyPulse | daily_pulse | Free | 10 / 100 / 1,000 |
AssistantHubAIForecast | ai_forecast | Premium | — / — / 100 |
AssistantHubMonteCarloBacktest | monte_carlo_backtest | Premium | — / — / 100 |
AssistantHubSlippageEstimate | slippage_estimate | Premium | — / — / 100 |
AssistantHubCreateAlert | create_alert | Premium | — / — / 100 |
AssistantHubStrategyAnalysis | strategy_analysis | Premium | — / — / 100 |
AssistantHubExecuteTrade | execute_trade | Premium | — / — / 100 |
AssistantHubCheckApproval | check_approval | Premium | — / — / 100 |
AssistantHubPriceMonitor | price_monitor | Free* | WebSocket |
* Requires enable_price_feed=True and websockets package. Premium daily limit is unlimited. Premium tools also accept x402 pay-per-call (1.00 USDC).
Loads tools dynamically from the MCP server. Always gets the latest tools without updating the SDK — great for staying current as new tools are added.
from langchain_assistanthub import AssistantHubToolkit from langgraph.prebuilt import create_react_agent # Auto-discover all tools via MCP protocol tools = await AssistantHubToolkit.from_mcp(api_key="ahk_your_key") agent = create_react_agent(model, tools)
Or use the MCP client directly for more control:
from langchain_assistanthub import AssistantHubMCPClient
client = AssistantHubMCPClient.from_api_key("ahk_your_key")
tools = await client.get_tools()
# tools is a list of LangChain BaseTool instances
TypeScript:
import { getMcpTools } from "langchain-assistanthub";
const tools = await getMcpTools({ apiKey: "your-jwt" });
// Auto-discovers all tools from the MCP server
Free tools work instantly with any auth. Premium tools return HTTP 402 with payment headers — your agent pays per call with USDC on Base:
# Toolkit approach — premium tools return payment info as structured error
toolkit = AssistantHubToolkit(api_key="your-key")
tools = toolkit.get_tools()
# Premium tools that require payment will return:
# {"error": "payment_required", "payment": {"x-402-amount": "1.00", ...}}
# JWT approach — Pro/Premium subscribers get unlimited premium calls
toolkit = AssistantHubToolkit(api_key="your-pro-jwt") # all tools work
10 free calls/day — no API key needed. Just use AssistantHubToolkit() with no arguments. Register at /developers for 100 calls/day (free), or upgrade to Pro/Premium for unlimited access.
Stake HUB tokens on Base for 50% off all x402 tool calls. Stakers also get priority queue and higher rate limits. Learn more →
See Showcase Notebooks for 3 runnable examples: sentiment trader, backtest optimizer, and live monitor.
Copy-paste-run examples that demonstrate full agent workflows. Each script is self-contained — just set your API key and go.
Analyze market sentiment using Fear & Greed, news, and risk scores — then get a buy/hold/sell recommendation from a LangGraph ReAct agent.
Tools: live_prices, fear_greed, crypto_news, risk_scores, daily_pulse
LLM: Gemini 2.5 Flash
Grid-search 4 strategies across 3 coins. Each test runs backtest → Monte Carlo → walk-forward validation with slippage estimates.
Tools: strategy_analysis, slippage_estimate (Premium)
Output: Comparison table + deploy/paper-trade/avoid verdict
Connect to the WebSocket price feed, monitor for >3% moves, and auto-trigger AI analysis + risk assessment on detection.
Tools: PriceFeedRunnable, PriceMonitor, ai_forecast, risk_scores
Mode: Continuous (Ctrl+C to stop)
🚀 Try it now: Anonymous users get 10 free tool calls/day — no API key needed. Register at /developers for 100 calls/day (free), or upgrade to Pro/Premium for unlimited access.
Add Assistant Hub tools directly to Claude Desktop, Cursor, or any MCP-compatible client.
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"assistanthub": {
"url": "https://rmassistanthub.io/mcp",
"headers": {
"Authorization": "Bearer YOUR_JWT_TOKEN"
}
}
}
}
Config file location: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
In Cursor Settings → MCP Servers → Add Server:
| Field | Value |
|---|---|
| Name | assistanthub |
| URL | https://rmassistanthub.io/mcp |
| Transport | Streamable HTTP |
| Auth Header | Authorization: Bearer YOUR_JWT |
Once connected, these tools appear in your AI assistant:
| Tool | Description | Tier |
|---|---|---|
get_prices | Live crypto prices (8 coins) | Free |
get_fear_greed | Market Fear & Greed Index | Free |
get_news | Latest crypto headlines | Free |
get_risk_scores | Risk analysis for any coin | Free |
get_pulse | Daily macro threats + opportunities | Free |
ai_forecast | AI-powered price forecast | Premium |
run_backtest | Strategy backtesting engine | Premium |
create_alert | Price & signal alerts | Premium |
# Test MCP discovery:
curl https://rmassistanthub.io/.well-known/mcp.json | jq .
# Test Streamable HTTP transport:
curl -X POST https://rmassistanthub.io/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"initialize","id":"1","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'
Try endpoints directly from your browser. Sandbox mode uses virtual credits.
/.well-known/agent-card.json