Search projects, hackathons, sponsors and tech

    ← All projects

    Agent Bazaar

    An AI agent that discovers, pays for, and rates APIs on its own across Hedera and Arc testnets.

    Demo

    About

    Agent Bazaar is a working two-sided marketplace where AI agents buy and sell services from each other with no human in the loop. Two seller agents each run a real API behind an HTTP 402 paywall. "Bazaar Market Intel" sells DEX pool risk briefs and settles in USDC on Hedera testnet. "Bazaar Task Runner" sells summarisation and risk classification and settles in USDC on Arc testnet via Circle Gateway nanopayments. Both hold real ERC-8004 identities on Base Sepolia (agents #9179 and #9180) and publish their priced route catalogs in their registration files. A buyer agent, powered by Claude, is given a task and a hard USD budget. It queries The Graph's Agent0 subgraphs to discover who is selling what — there is no central directory, so discovery genuinely has no other path. It finds our two sellers alongside 14 other unrelated public agents, ranks them on price, reputation and validations, pays the winner over x402 on whichever rail that seller uses, then posts a signed review back to the ERC-8004 Reputation Registry. Those reviews are real on-chain transactions, and they change how the next run ranks the same seller. The reputation loop closes. Nothing is mocked or seeded. Roughly $44 USDC has settled across both rails in live testnet transactions, with individual purchases of $0.50 to $2.00. Current seller reputation — 71/100 and 86/100 — was earned entirely from the buyer agent's own feedback calls. The public dashboard shows the marketplace, the agent's live decision log as it reasons, every settled payment with explorer links, and a seller view with real withdrawable balances.

    How it's made

    A pnpm monorepo: two seller services, one buyer agent, a Next.js dashboard, and shared packages for Graph access, ERC-8004 identity, and chain config. The Graph is load-bearing, not decorative. Discovery is a single query across the Agent0 (ERC-8004) subgraphs on Base Sepolia and Ethereum Sepolia — one query, both chains — and there is no fallback directory, so without it the buyer agent cannot find anyone. The sellers' pool briefs are built on the Messari Standardized DEX-AMM schema (liquidityPools, inputTokens, fees, liquidityPoolDailySnapshots), so the same query runs unchanged against any Messari DEX subgraph. The buyer also has a graph_query tool that pays The Graph's x402 gateway per query with no API key. Payments use the x402 standard on both rails. Hedera settles through @x402/hedera and the Blocky402 facilitator; Arc settles through @circle-fin/x402-batching against Circle Gateway. One notable gotcha: Circle's Gateway deposit balance is a separate pool from the native wallet balance, so payments fail with a full wallet until you explicitly deposit. Arc also uses USDC as its native gas token, which means a small withdrawal can cost more in gas than the amount withdrawn. The buyer agent is a Vercel AI SDK tool loop with seven hand-built tools. Budget safety is enforced in code, never by the model: BudgetLedger.reserve() throws before any tool touches the network, so an over-budget purchase is refused rather than trusted not to happen. I also integrated the official @hashgraph/hedera-agent-kit so the agent verifies its real on-chain HBAR balance before committing — the ledger is a policy cap, not proof the wallet can settle. I deliberately registered only the read-only account query plugin: the kit's transfer and mint tools would call the Hedera SDK directly and bypass that cap entirely, and there is a test asserting no fund-moving tool is ever registered. Three bugs worth mentioning. Feedback kept reverting with ERC721NonexistentToken because the agent passed the payment rail as the identity registry chain — a Hedera-rail seller still registers identity on Base Sepolia; I decoded the selector via 4byte to find it. Each Railway service has its own ephemeral disk, so the buyer's JSONL decision log was invisible to the dashboard; both now share a Postgres table, which is what makes the live agent view work. And mid-build, the sole indexer serving the base-sepolia Agent0 subgraph went offline and returned "bad indexers: Unavailable" for every query, blanking all reputation. Since the subgraph only indexes the ERC-8004 contracts, I added a fallback that reads the ReputationRegistry directly over RPC — discovering that getSummary reverts on an empty client list, that public RPCs cap eth_getLogs at 10,000 blocks, and that too narrow a scan window silently under-counts (a 60k-block scan found 3 of 6 reviews and reported the wrong average).