Autonomous trust, discovery, and Hedera x402 micropayment network for AI agents.
Overview & Problem Statement
As artificial intelligence rapidly transitions from isolated conversational chatbots into autonomous, goal-oriented agentic systems, the software landscape faces a critical architectural bottleneck: the Specialization Dilemma. No individual AI agent can master real-time legal research, deterministic data analysis, secure code generation, and executive document synthesis without suffering from context-window bloat, prohibitive inference costs, and severe hallucination risks.
To achieve real-world utility, complex workflows require multi-agent collaboration where specialized agents delegate and subcontract sub-tasks to each other. However, today’s Web2 infrastructure is built for human eyes with monthly SaaS subscriptions and credit cards. When autonomous AI agents need to hire other AI agents programmatically, there is no standardized machine-readable discovery layer, no Sybil-resistant publisher governance, and no mechanism for instantaneous, low-latency machine-to-machine micropayments.
The AgentHire Solution
AgentHire is an autonomous Agent-to-Agent (A2A) trust, procurement, and micropayment network that establishes a decentralized coordination and economic layer for artificial intelligence. It functions as an autonomous marketplace and execution mesh where AI agents can discover, evaluate, negotiate with, and hire specialist worker agents in real time, settling bounties peer-to-peer on-chain.
Key Architectural Pillars:
At the entry tier, a Master Orchestrator Agent ingests user prompts, attached spreadsheets, or technical documentation. The Orchestrator conducts deep intent reasoning to decompose tasks, evaluates candidate agent capabilities, verifies domain relevance, and dynamically routes the workload to dedicated specialist workers:
Research Agent: Autonomous web intelligence, cryptographic evidence gathering, and deep thinking.
Coding Agent: Algorithmic function engineering, API implementation, and software architecture.
Data Analyst Agent: Tabular spreadsheet computation, statistical distributions, anomaly detection, and numerical metrics.
Report Generation Agent: Structured executive reports with verifiable citations and roadmap synthesis.
Document Summarizer Agent: High-impact executive briefs and actionable takeaways from lengthy files.
AgentHire implements the open HTTP x402 Payment Required standard natively on the Hedera Hashgraph network. When an agent is invoked, contract terms are autonomously negotiated and settled using pure native Hedera SDKs (@hiero-ledger/sdk). Transactions are executed as direct TransferTransaction calls transferring exact tinybars (100,000 tinybars = 0.001 HBAR) with 2-second consensus finality. By avoiding Solidity and EVM smart contracts, AgentHire eliminates gas price volatility, contract re-entrancy risks, and execution latency, enabling friction-free machine-speed commerce.
AgentHire demonstrates true autonomous recursive commerce. When a mission requires multi-domain expertise—such as conducting deep technical research and compiling the findings into an executive report—the primary specialist (Research Agent) acts as an autonomous general contractor. It receives funds from the Master Orchestrator, completes its intelligence phase, and autonomously hires and pays the downstream specialist (Report Generation Agent) on Hedera testnet in a secondary x402 transaction before synthesizing the final deliverable. Both transactions settle independently and generate verifiable on-chain consensus receipts.
AgentHire empowers users with a strict Task Spending Ceiling. The Orchestrator evaluates candidate agent price quotes against the user's defined tinybar budget. If a multi-agent cascade exceeds the cap, the system intelligently prunes subcontracts or reroutes workloads to maintain strict fiscal compliance, ensuring autonomous agents never exceed authorized spending policies.
In an open agent marketplace, malicious actors can easily deploy thousands of low-quality clone bots to manipulate ratings. AgentHire prevents Sybil attacks by requiring developers to complete a World ID Proof of Human zero-knowledge verification using IDKit v4 before publishing monetized agents. A cryptographically unique nullifier hash is verified on the backend, binding the listing to a verified human creator while preserving complete user privacy.
Every published agent is assigned a verifiable on-chain domain identity via the Ethereum Name Service (ENS). Using custom ENS text records (agenthire.endpoint and agenthire.hedera), the network binds the agent’s Ethereum name to its live webhook endpoint and its Hedera settlement account. This enables seamless cross-chain identity resolution between Ethereum namespaces and Hedera micropayment rails.
Every task execution, log entry, and payment is recorded on the native Hedera network. Users and operators have full visibility through an interactive On-Chain Transaction Explorer (/transactions) and a Wallet & Earnings Ledger (/analytics), providing verifiable HashScan explorer links, consensus timestamps, and real-time financial auditing.
Architecture & Core Technologies
I built AgentHire as a high-performance monorepo powered by Turborepo and pnpm, structured across three specialized workspaces:
@agenthire/api: A low-latency Fastify backend service executing agent reasoning, cryptographic verification, and on-chain settlement.
@agenthire/web: A modern Next.js 16 (App Router) interface with Server-Sent Events (SSE) streaming real-time agent thinking and HashScan consensus links.
@agenthire/shared: Shared TypeScript type definitions, cryptographic schemas, and Bayesian math algorithms.
To target the "No Solidity Allowed" and "AI Agents That Pay: x402 on Hedera" tracks, I intentionally bypassed EVM and Solidity smart contracts completely. Instead, I built direct native Hedera consensus integration using @hiero-ledger/sdk:
Live Micropayments via HTTP x402: I implemented an autonomous client-merchant negotiation protocol. In live-settlement.ts, when an agent is hired, the payer client (0.0.11331589) constructs a native TransferTransaction, deducting tinybars from the payer and crediting the merchant (0.0.11330954) with specific transaction memos. This achieves sub-3 second finality with near-zero network fees ($0.0001 per transaction).
Autonomous Cascading Subcontracting: I architected a recursive payment loop in agent-orchestrator.ts. When a task requires both research and report generation, the Master Orchestrator triggers Transaction 1 to hire the Research Agent. Mid-execution, the Research Agent acts as an autonomous payer, hiring the Report Generation Agent via Transaction 2. Both transactions settle independently on Hedera testnet and are recorded in my local SQLite transaction store, immediately populating the live /transactions explorer.
Hedera Consensus Service (HCS): Audit logs and task completion proofs are anchored as immutable topic messages to HCS Topic 0.0.11331471, providing verifiable sequence-level provenance.
To protect the marketplace against clone-bot spam and Sybil attacks without compromising developer privacy, I integrated World ID IDKit v4 on the /publish portal:
When a developer monetizes an agent, my Fastify API generates a cryptographic challenge with relying party credentials (WLD_RP_ID & WLD_RP_SIGNING_KEY).
The developer scans the zero-knowledge QR code via the World App simulator in staging mode.
The server validates the ZK-proof, nullifier hash, and action signature, storing the verified human nullifier in SQLite to guarantee that one human publisher cannot flood the registry with duplicate agents.
I used viem to bind agents to Ethereum Name Service (ENS) domains on Sepolia:
Agents are registered under human-readable names (e.g. nexus-agent.eth).
I query ENS resolver text records (agenthire.endpoint and agenthire.hedera) via high-reliability RPC gateways (Tenderly).
This creates a trustless bridge where an Ethereum ENS identity directly routes webhook calls and maps to native Hedera payment addresses.
LLM Reasoning: Powered by Groq's high-speed inference engine running Llama-3.3-70b and GPT-OSS models to classify intent, detect nonsensical inputs or gibberish, and perform real-time deliverable synthesis.
Proof-of-Competence Procurement (PoCP): Located in apps/api/src/agents/pocp.ts, my procurement engine uses Bayesian reliability priors (Beta distributions) and predictive loss minimization to evaluate candidate agents. It can dispatch a 500ms paid synthetic micro-challenge before committing the user's full budget.
Notable & "Hacky" Engineering Details
True In-Flight SSE Cascading: Next.js streaming typically struggles with multi-stage backend awaits. I implemented an asynchronous event multiplexer using Fastify raw hijacked response sockets that streams Groq reasoning tokens, Hedera transaction consensus events, and markdown deliverables through a single unified SSE connection without buffering or blocking.
Dual-Chain Identity Mapping: Binding ENS text records (EVM) directly to native Hedera account IDs (0.0.x) enables a hybrid identity layer where agents retain their Web3 identity on Ethereum while transacting with micro-cent finality on Hedera.

