Description
๐ค HashA2A โ The Agent-to-Agent Intelligence Layer
!Python
!Hedera
!FastAPI
!A2A
!MCP
!License
!Tests
> HashA2A is a decentralized agent-to-agent data marketplace running on Hedera mainnet. AI agents buy verified multi-oracle intelligence via HBAR (HIP-991) or USDC (x402/AP2) micropayments.
What it does
- Multi-oracle prices โ 36 assets across 5 sources (Pyth, CoinGecko, Binance, DeFiLlama, ForexAPI). Median with IQR confidence intervals.
- Prediction markets โ 5 providers (Polymarket, Kalshi, PredictIt, Manifold, Hyperliquid). Cross-validated probabilities.
- Arbitrage scanning โ Real-time cross-oracle spread detection across all assets, ranked by opportunity.
- Deep research โ Web search + news + social signals + prediction markets + AI analysis (LangChain + GPT-5-nano).
- Enterprise plugin โ Hedera Agent Kit bridge with 6 tools: account balance, transfers, topic management, account info.
- Server URL:
https://hasha2a.com/mcp - Auth: HBAR (HIP-991 auto-fees) or USDC (x402/Circle Gateway, gasless)
- Transport: Streamable HTTP (remote) or stdio via
mcp-remote - Install:
npx hasha2a-mcp-client add - 19 MCP tools, 5 oracle sources (36 assets), 5 prediction market providers
- 115 tests passing, mainnet live on Hedera
- HIP-991 fee collection, HIP-1261 simple fees
- x402 6-rule verification: layout, amount, fee payer, signature, nonce, asset
- Docs: github.com/ymiydev-prog/HashA2A
- Agent Card: hasha2a.com/.well-known/agent.json
- OpenAPI: hasha2a.com/openapi.json
- Install Script: raw.githubusercontent.com/…/install-mcp.sh
Built for
AI agents, trading bots, DeFi protocols, and enterprise teams that need verified, cross-validated market data with on-chain payment rails.
Connect
Trust
Links
—
Features
| Feature | Description |
|———|————-|
| ๐ฎ OracleHub v2 | 36 assets ร 5 sources โ Pyth, CoinGecko, DeFiLlama, Binance, ForexAPI. Median with IQR confidence intervals |
| ๐ Arbitrage Engine | Real-time cross-oracle spread detection across all 36 assets |
| ๐ A2A Protocol | Full Google A2A compliance โ JSON-RPC 2.0, SSE streaming, task lifecycle, context passing, AP2 mandates |
| ๐ ๏ธ MCP Server | 18 Model Context Protocol tools โ available via Smithery registry or one-command install |
| ๐ง AI Analysis | LangChain + OpenAI (GPT-5-nano) for deep market analysis |
| ๐ Deep Research | Web search + news + social signals + prediction markets + AI |
| ๐ณ x402 Triple Rail | USDC on Base + HBAR/HTS on Hedera + Circle Gateway (gasless USDC via Agent Wallet, 6/6 verification rules: layout, amount, fee payer safety, signature, nonce, asset) |
| ๐ JWT Auth | Ephemeral tokens (60s-3600s TTL) with scope-based authorization |
| ๐ฏ Prediction Markets | Polymarket, Kalshi, PredictIt, Manifold, Hyperliquid โ cross-validated probabilities |
| โญ Quality Evaluation | Auto-score every provider response โ latency, completeness, accuracy, outlier detection |
| ๐ข Enterprise Plugin | Isolated hedera-agent-kit bridge โ 6 additional MCP tools for account/topic/tx management |
| ๐ Dashboards | Live oracle prices, spread history, A2A tasks, wallet balance/transactions |
| ๐ Reverse Auctions | Providers bid on requests โ agents get the best price/quality |
| ๐ฅฉ Staking & Slashing | Provider reputation with stake-based slashing for bad data |
| ๐ Health Checks | Live API health indicators (green/red) per provider โ auto-detects outages |
| ๐ณ Docker | One-command deployment with docker-compose โ mainnet live |
Quick Start
One command โ any agent, any machine
npx hasha2a-mcp-client addOr via shell script (no Node.js needed)
curl -fsSL https://raw.githubusercontent.com/ymiydev-prog/HashA2A/main/scripts/install-mcp.sh | bashOr run the server locally
docker compose up -d
curl http://localhost:8080/api/v1/agent/health
Architecture
Agent Client (Claude, LangChain, Google A2A, MCP)
โ
โโโ MCP โโโโโ http://localhost:8080/mcp (19 tools)
โโโ A2A โโโโโ http://localhost:8080/api/v1/a2a/rpc
โโโ SSE โโโโโ http://localhost:8080/api/v1/a2a/rpc/stream
โโโ REST โโโโโ http://localhost:8080/api/v1/...
โโโ Agent Card โโ http://localhost:8080/.well-known/agent.json
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ HashA2A Core โ
โ โ
โ OracleHub โโโ Pyth ยท CoinGecko ยท DeFiLlama โ
โ Binance ยท ForexAPI (36 assets) โ
โ Arbitrage โโโ Spread detection + ranking โ
โ QualityEval โโ Latency ยท completeness ยท accuracy โ
โ Research โโโ Web + News + AI Analysis โ
โ TaskManager โโ A2A lifecycle + artifacts โ
โ ContextManager โโ Context IDs + summaries โ
โ PaymentEngine โโ HIP-991 + x402 + AP2 โ
โ AuthService โโ JWT + Mandates โ
โ AuctionEngine โโ Reverse auctions for best price โ
โ StakingManager โโ Provider stake + slashing โ
โ ConsensusLogger โโ HCS audit trail โ
โ x402Handler โโ 6-rule verification โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโดโโโโโโโ
โ Plugin โ
โ Bridge โ
โ (isolated โ
โ venv for โ
โagent-kit) โ
โโโโโโโโโโโโโโโโ
MCP โ Model Context Protocol
Installation
npm (recommended) โ auto-detects Claude Desktop, Cursor, Windsurf:
npx hasha2a-mcp-client add
Or with a remote server URL
npx hasha2a-mcp-client add --url https://hasha2a.com/mcp
Shell script โ no Node.js needed:
curl -fsSL https://raw.githubusercontent.com/ymiydev-prog/HashA2A/main/scripts/install-mcp.sh | bash
via Smithery: Published at smithery.ai โ search “HashA2A”.
Manual โ add to your MCP client config:
{
"mcpServers": {
"hasha2a": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://hasha2a.com/mcp"]
}
}
}
Tools (19)
#### Oracle & Data
| Tool | Description |
|——|————-|
| get_price | Multi-oracle price (Pyth+CoinGecko+Binance+DeFiLlama) |
| list_assets | List all 36 supported assets with metadata |
| getassetprofile | Detailed info per asset โ sources, change_24h, volume |
| scan_arbitrage | Cross-oracle arbitrage opportunities across all assets |
| verified_feed | Cross-validated price feed with confidence intervals |
#### Prediction Markets & Research
| Tool | Description |
|——|————-|
| list_providers | List prediction market providers |
| getmarketdata | Request data from a provider |
| check_request | Poll request result |
| getagentprofile | View agent identity |
| aggregatemarketdata | Multi-provider intelligence |
| analyze_market | AI analysis of market data |
| deep_research | Full web+news+AI research |
#### Enterprise Plugin (Hedera Agent Kit)
| Tool | Description |
|——|————-|
| kit_setup | Setup isolated hedera-agent-kit environment |
| kitaccountbalance | Get HBAR balance of any account |
| kittransferhbar | Transfer HBAR to another account |
| kitcreatetopic | Create an HCS topic |
| kitsubmitmessage | Submit message to HCS topic |
| kittopicmessages | Get messages from HCS topic (Mirror Node) |
| kitgetaccount_info | Get detailed account information |
AI Agent SKILL
HashA2A provides a universal SKILL file that teaches any AI agent how to use the platform โ endpoints, tools, pricing, payment rails, and workflows โ without pasting documentation.
Installation
Via skills.sh (any agent โ Claude Code, Gemini CLI, Codex CLI):
npx skills add ymiydev-prog/HashA2A --skill hasha2a -g -y
Via GitHub (manual):
git clone https://github.com/ymiydev-prog/HashA2A.git ~/.claude/skills/hasha2a
Source: skills/hasha2a/SKILL.md + skills/hasha2a/references/core.md
AI Prompts
Copy-paste ready prompts at docs/ai-prompts.md โ 15 prompts covering all 19 MCP tools, REST API, payment flows, and Hedera operations.
IDE Setup
ChatGPT (Developer Mode)
1. Open Developer Mode in ChatGPT
2. Go to Custom MCP Connector
3. Add the HashA2A MCP URL: http://localhost:8080/mcp
4. Or use GPT Actions: add OpenAPI spec at /openapi.json
Claude.ai (claude.ai Pro/Team)
1. Go to Settings โ Capabilities โ Add Connector
2. Set URL to http://localhost:8080/mcp
3. Alternatively, upload the SKILL at claude.ai/customize/skills:
– Download: skills.zip
– Upload the zip at claude.ai/customize/skills
– Add localhost:8080 to domain allowlist at claude.ai/settings/capabilities
Claude Code (Terminal)
Via npm package (auto-detects Claude Code)
npx hasha2a-mcp-client addVia SKILL
npx skills add ymiydev-prog/HashA2A --skill hasha2a -g -y
Cursor
npx hasha2a-mcp-client add
Or manually add to .cursor/mcp.json:
{ "mcpServers": { "hasha2a": { "command": "npx", "args": ["-y", "mcp-remote", "https://hasha2a.com/mcp"] } } }
Windsurf
npx hasha2a-mcp-client add
Or manually add to .windsurf/mcp_config.json
Gemini CLI
npx skills add ymiydev-prog/HashA2A --skill hasha2a -g -y
Codex CLI
npx skills add ymiydev-prog/HashA2A --skill hasha2a -g -y
Or clone to ~/.claude/skills/hasha2a (Codex shares the Claude skills directory)
Visual Studio Code (VS Code)
Add to .vscode/mcp.json or VS Code MCP settings:
{ "servers": { "hasha2a": { "command": "npx", "args": ["-y", "mcp-remote", "https://hasha2a.com/mcp"] } } }
Pricing
USDC prices are fixed. HBAR prices update in real-time from Binance + CoinGecko fallback.
| Product | USDC | HBAR (live) |
|———|——|————-|
| Price Feed (single asset, multi-oracle) | $0.25 | โ 2.76 HBAR |
| Arbitrage Scan (all 36 assets) | $0.50 | โ 5.52 HBAR |
| Arbitrage Verify (single pair) | $0.10 | โ 1.10 HBAR |
| Deep Research (web + news + AI) | $0.50 | โ 5.52 HBAR |
| Prediction Market (per provider) | $0.15 | โ 1.66 HBAR |
| Aggregate Intelligence (all sources) | $1.00 | โ 11.05 HBAR |
> All transactions use HIP-1261 Simple Fees: transaction_fee is a MAX cap (0.05 HBAR basic, 0.1 HBAR for HIP-991). See docs/hip-1261-simple-fees.md.
Oracle Sources โ 36 Assets, 5 Sources
| Source | Assets | Cost | Type |
|——–|——–|——|——|
| Pyth Hermes | BTC, ETH, SOL, XAU, XAG, USD/JPY + equities (7) | Free | First-party institutions |
| CoinGecko | 17 crypto assets | Free | CEX/DEX aggregation |
| DeFiLlama | BTC, ETH, SOL (Chainlink via DeFiLlama) | Free | Chainlink data feed |
| Binance | BTC, ETH, SOL, BNB, XRP, ADA + more | Free | Centralized exchange |
| ForexAPI | EUR/USD, GBP/USD, AUD/USD, CAD/USD, CHF/USD, CNH/USD | Free | Open exchange rates |
Asset Coverage
| Category | Count | Examples |
|———-|——-|———|
| Crypto | 21 | BTC, ETH, SOL, HBAR, BNB, XRP, ADA, DOGE, AVAX, DOT, LINK, UNI, MATIC, LTC, AAVE, ATOM, ARB, APT, OP, SUI, PEPE |
| Equities | 7 | AAPL, MSFT, NVDA, GOOGL, AMZN, TSLA, META |
| Commodities | 2 | XAU (Gold), XAG (Silver) |
| Forex | 6 | EUR/USD, GBP/USD, AUD/USD, CAD/USD, CHF/USD, CNH/USD |
x402 Hedera Rail โ 6-Rule Verification
HashA2A implements the exact scheme for Hedera native payments (HIP-1261 compliant):
| # | Rule | What it checks |
|—|——|—————-|
| 1 | Transaction layout | feePayer matches transactionID.accountID |
| 2 | Amount exactness | Net amount to payTo matches expected |
| 3 | Fee payer safety | Fee payer is not a net sender |
| 4 | Signature validity | Ed25519 signatures in sigMap verify bodyBytes (via pynacl) |
| 5 | Nonce (replay) | accountID:transactionValidStart cache (1h TTL) |
| 6 | Asset/token | tokenTransfers validation for HTS tokens |
Replayable fixture (no secrets): python scripts/x402flowfixture.py
Full docs: docs/hiero-sdk-compatibility.md
A2A Protocol Compliance
HashA2A implements the Agent-to-Agent (A2A) protocol governed by the Linux Foundation:
Agent Card
Served at /.well-known/agent.json:
JSON-RPC 2.0 Methods
| Method | RPC Endpoint | Description |
|——–|————-|————-|
| message/send | /api/v1/a2a/rpc | Create and process a task |
| message/stream | /api/v1/a2a/rpc/stream | Create task with SSE real-time updates |
| tasks/get | /api/v1/a2a/rpc | Get task state and result |
| tasks/list | /api/v1/a2a/rpc | List tasks with filter |
| tasks/cancel | /api/v1/a2a/rpc | Cancel a running task |
Task Lifecycle
submitted โ working โ input-required โ completed
โ failed / canceled / rejected
Context Passing
contextId groups multiple interactions under the same workflowContextSummary passes antecedents without sharing full memoryfork_context() creates branching conversations with inherited historyTesting
All tests (115 passing)
PYTHONPATH=src python -m pytest tests/ -vSmoke tests only (no credentials needed)
PYTHONPATH=src python -m pytest tests/ -m smoke -vE2E tests (requires .env)
PYTHONPATH=src python -m pytest tests/ -m e2e -v
API Endpoints
Feeds & Data
| Method | Path | Description |
|——–|——|————-|
| POST | /api/v1/feeds/prices | Multi-oracle price feed |
| POST | /api/v1/feeds/arbitrage | Cross-oracle arbitrage scan |
| GET | /api/v1/feeds/pricing | Real-time pricing (USDC + HBAR) |
| GET | /api/v1/feeds/x402/manifest | x402 payment manifest |
| POST | /api/v1/feeds/x402/hedera/verify | Verify HBAR/HTS payment |
A2A Tasks
| Method | Path | Description |
|——–|——|————-|
| POST | /api/v1/a2a/rpc | JSON-RPC 2.0 (message/send, tasks/get, etc.) |
| POST | /api/v1/a2a/rpc/stream | SSE streaming RPC |
| POST | /api/v1/tasks | Create task (REST) |
| GET | /api/v1/tasks/{id} | Get task |
| GET | /api/v1/tasks | List tasks |
| POST | /api/v1/tasks/{id}/complete | Complete task with artifact |
| POST | /api/v1/tasks/{id}/artifacts | Upload artifact |
| GET | /api/v1/tasks/{id}/artifacts | List artifacts |
| POST | /api/v1/tasks/context | Create context |
| GET | /api/v1/tasks/context/{id}/summary | Context summary |
| POST | /api/v1/tasks/context/{id}/fork | Fork context |
Auth
| Method | Path | Description |
|——–|——|————-|
| POST | /api/v1/auth/token | Request ephemeral JWT |
| POST | /api/v1/auth/verify | Verify Bearer token |
| POST | /api/v1/auth/mandates | Create AP2 mandate |
| POST | /api/v1/auth/mandates/{id}/authorize | Authorize spending |
Prediction Markets
| Method | Path | Description |
|——–|——|————-|
| POST | /api/v1/requests | Buy prediction data |
| POST | /api/v1/requests/aggregate | Multi-provider aggregation |
| POST | /api/v1/research | Deep research |
Agent Discovery
| Path | Description |
|——|————-|
| /.well-known/agent.json | A2A Agent Card |
| /.well-known/x402.json | x402 payment manifest |
| /llms.txt | LLM-readable docs |
| /mcp/ | MCP server info (GET) + Streamable HTTP (POST) |
Dashboards
| Path | Description |
|——|————-|
| / | Landing page with live BTC price |
| /dashboard | Main admin dashboard โ provider cards, wallet, health status |
| /dashboard/oracles | Oracle prices + spread history charts |
| /dashboard/tasks | A2A task management dashboard |
| /dashboard/wallet | Wallet balance, USD equivalent, transactions |
| /dashboard/health | Provider health check API (JSON) |
Quick Start (Local Dev)
Docker (recommended)
docker compose up -d
curl http://localhost:8080/api/v1/agent/healthOr Python directly
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env # configure your credentials
python runner.pyOr with custom port
PORT=8082 python runner.py
Tech Stack
Deployment
HashA2A runs on Hedera mainnet via Docker. The MCP server is discoverable through:
smithery.ai โ search “HashA2A”curl -fsSL https://raw.githubusercontent.com/ymiydev-prog/HashA2A/main/scripts/install-mcp.sh | bashDocumentation
| Doc | Description |
|—–|————-|
| skills/hasha2a/SKILL.md | Universal SKILL for AI agents (Claude Code, Gemini, Codex, etc.) |
| skills/hasha2a/references/core.md | Tools, endpoints, pricing, assets, payment rails reference |
| docs/ai-prompts.md | 15 copy-paste prompts for agents |
| docs/hip-1261-simple-fees.md | HIP-1261 transaction_fee max-cap explained |
| docs/hiero-sdk-compatibility.md | hiero-sdk-python 0.2.0 vs 0.2.6 migration |
| docs/client-examples.md | Integration examples (cURL, Python, LangChain) |
|