Decentralized AI tool marketplace: P2P orchestrator discovers, pays, and tracks reputation.
AgentMesh is a decentralized marketplace and coordination layer for AI tool providers. It lets anyone publish MCP (Model Context Protocol) tools on-chain, and a shared orchestrator discovers, routes tasks to, and pays these tools automatically — all over an encrypted peer-to-peer mesh with no central server.
The problem it solves: today's AI agents are siloed. If you have a "research tool" and a "trading tool," they can't discover each other, negotiate, or pay each other without a centralized platform taking a cut. AgentMesh makes tool discovery, execution, and payment fully decentralized — tool providers operate like independent freelancers on an open marketplace using crypto-native infrastructure.
Here's how it works end-to-end: A user asks "Find the best ETH yield opportunity under 5% risk." The Orchestrator (powered by Qwen 2.5 7B on 0G decentralized compute) breaks this into subtasks and routes them to specialized MCP tool providers discovered from the on-chain registry. The Researcher agent scans live DeFi Llama data, the Risk Analyst scores protocols using audit histories, and the Executor can swap via Uniswap's Trading API or create automated workflows via KeeperHub. Each tool call triggers an x402 micropayment in USDC — tools get paid the instant they return results. Reputation scores are recorded on-chain after every successful task, building a trust layer that informs future routing decisions. The entire conversation — goal, plan, results, payments — is stored to 0G decentralized storage with a content hash for auditability.
The dashboard provides a real-time view into the mesh: a chat interface for natural language goals, a live P2P network graph showing connected nodes, an activity feed of agent coordination events, and a registry explorer where anyone can browse or publish new MCP tools. It's the "App Store for AI Tools" — but decentralized, permissionless, and crypto-native.
AgentMesh is a monorepo built with TypeScript/Bun for the orchestrator and agents, Go for the P2P networking layer, and Next.js 15 + React 19 for the frontend dashboard.
P2P Mesh (Gensyn AXL): Each agent runs as a Gensyn AXL node with a unique Ed25519 identity and IPv6 overlay address on an encrypted Yggdrasil network. The orchestrator routes MCP requests to peers by public key — no DNS, no central server, fully end-to-end encrypted. We wrote a custom Go TCP listener/dialer that bridges AXL's P2P transport to standard HTTP MCP endpoints, plus Python MCP routers that translate between A2A (Agent-to-Agent) protocol and MCP tool calls.
LLM Reasoning (0G Compute): The orchestrator's brain is Qwen 2.5 7B running on 0G's decentralized compute network via an OpenAI-compatible endpoint. It plans subtasks, assigns tools, and synthesizes results. Only the orchestrator has LLM access — tool providers are lightweight "dumb" functions that do one job well, keeping costs minimal.
On-Chain Registry (0G Chain): Two Solidity contracts deployed on 0G Chain testnet (chain ID 16602): AgentRegistry.sol handles provider registration with ENS names, MCP endpoint URLs, and tool capability metadata. ReputationTracker.sol records successful task completions and maintains trust scores. The frontend reads directly from these contracts to populate the marketplace.
Payments (x402 Protocol): Every tool call includes a micropayment. When a tool provider returns HTTP 402, the orchestrator's x402 client automatically signs a USDC payment on Base Sepolia and retries. Tools earn per invocation with zero settlement delay. We have on-chain receipts proving real payments between agents.
Identity (ENS): Each agent has an ENS subname under agent-mesh.eth (e.g., orchestrator.agent-mesh.eth, researcher.agent-mesh.eth) with text records pointing to their MCP endpoints and AXL public keys.
External Integrations: The Researcher agent pulls live yield data from DeFi Llama's public API. The Executor integrates Uniswap's Trading API for real-time swap quotes (tested: 1 ETH = 2,229 USDC) and KeeperHub's MCP server for creating automated on-chain workflows. These aren't mocked — they return real mainnet data.
Hacky bits worth noting: We built a self-service "Publish" page that auto-detects MCP tools from any URL — paste your server endpoint, it introspects the available tools via MCP's tools/list, and registers them on-chain in one click. We also built a demo MCP server (deployed on Vercel) that serves as a reference implementation for anyone wanting to join the mesh. The AXL node's Go code includes a custom TCP helper layer that multiplexes MCP, A2A, and topology protocols over a single P2P connection — this was tricky to get right with Yggdrasil's overlay addressing.
Tech stack summary: TypeScript + Bun 1.3 (runtime), Next.js 15 + React 19 + Tailwind v4 (frontend), Gensyn AXL + Go (P2P mesh), 0G Compute + Chain + Storage (decentralized infra), x402 (payments), ENS (identity), Uniswap Trading API + KeeperHub MCP (execution), DeFi Llama (data), Hardhat + Solidity (contracts).

