
Hark Protocol
An open intent layer for ads. Platforms publish intent. Agents pay to reach it on Hedera.
Demo
About
Hark Protocol is an open intent advertising protocol with on-chain machine payments on Hedera. Platforms such as search apps, social feeds, shopping apps, or AI assistants detect that a user has a temporary commercial interest, for example wanting a laptop, and publish that intent to Hark as a normalized, anonymous, short lived signal, without exposing the user's identity. Autonomous advertiser agents discover these anonymous opportunities, use an LLM to decide for themselves whether the opportunity is relevant to their campaign and budget, and if it is, pay Hark programmatically through the x402 protocol on Hedera testnet, settled via the Blocky402 facilitator, to earn the right to reach that user. The human never pays, and their identity, wallet address, and browsing history never leave the publisher. Hark's core paid endpoint, POST /v1/reach, is protected by x402. An unpaid request returns HTTP 402, the agent signs a real HBAR payment, and Blocky402 settles it on Hedera testnet, after which Hark queues the ad delivery for the publisher to show. Advertiser agents can see the publisher's identity, the placement, the topic, a sanitized summary, and the price, but never the user's name, email, IP address, or any stable cross platform identifier. Beyond the mandatory paid flow, the project also implements a publisher revenue share so publishers earn a portion of every payment, an HCS based audit trail for every settled payment, and HCS 14 based advertiser agent identity. Everything described here is live and deployed, not simulated. There is a published npm SDK and protocol package, a working web demo covering the publisher experience, an agent dashboard, and a system explorer, plus real, independently verifiable Hedera testnet transactions backing every claim.
How it's made
Stack - TypeScript monorepo using pnpm workspaces and ESM. - apps/api: Express, Zod, Drizzle ORM, PostgreSQL, deployed on Railway, database hosted on Neon. - apps/web: Next.js, Tailwind, shadcn/ui, deployed on Vercel. Covers the Demo Publisher screen, an Agent Dashboard, and a Hark Explorer. - agents/runner: a CLI advertiser agent (discover, score relevance, decide, pay). - Two published npm packages: @hark-protocol/protocol (shared Zod schemas and topic taxonomy) and @hark-protocol/sdk (publisher and advertiser clients). Payments (the core of the project) - x402 protocol v2, using @x402/core, @x402/express, @x402/fetch, and @x402/hedera. - POST /v1/reach is protected by x402 on the API side. An unpaid request returns a real HTTP 402. - The agent side signs and retries automatically, paying in native HBAR. - Settlement runs through the Blocky402 facilitator against Hedera testnet. - Every settled transaction shown in the app and pitch deck is independently confirmed against the public Hedera testnet mirror node, not just Hark's own API response. Why Blocky402 and Hedera mattered here - Blocky402 is the actual value add of the project. It lets an autonomous agent sign and settle a real payment inline in a single HTTP request response cycle, with no manual invoicing or offchain reconciliation. - Hedera testnet gives fast, cheap settlement, which fits a per-request micropayment model like this far better than a slower or more expensive chain would. Relevance reasoning - Uses the Vercel AI SDK with an OpenAI model. - Wrapped behind a RelevanceScorer interface, with a deterministic fallback scorer, so the demo never silently breaks if a key is missing or a network call fails. - The LLM only recommends relevance. Budget and price limits are enforced entirely in code, never by the model.