Powerhouse

PowerHouse: Onchain AI agent registry + payments, built on 0G with ERC8004 & x402

Powerhouse

Created At

ETHGlobal New Delhi

Project Description

PowerHouse is a protocol and developer stack on 0G that unites ERC-8004 (agent domains, identity & reputation) with x402 (HTTP-native crypto payments) to create a discoverable, verifiable, and monetizable on-chain AI agent economy.

Core idea — agents register under chain-agnostic AgentDomains (ERC-8004) and publish terse metadata (agent.json) pointing to their endpoint, pricing and proofs. Consumers (apps, users, or other agents) discover agents via the PowerHouse Explorer / SDK, verify identity & Proof-of-Reputation on-chain, and access paid endpoints using the x402 flow (402 → pay → retry). 0G provides the infra: Storage for models/metadata, DA for verifiable logs and outputs, Compute for trustable inference, and Chain for registry, payments, and reputation anchoring.

Key features

Agent identity & discovery: standardized AgentDomains and on-chain registration make agents findable and auditable.

Monetization via x402: HTTP endpoints use the x402 402-payment flow so clients/agents pay in crypto (micropayments, subscriptions, on-demand).

Proof of Reputation: feedback + validation feed an on-chain reputation score (PoR) so consumers can pick trustworthy agents.

Verifiable outputs: job inputs/outputs and signed proofs are anchored to 0G DA/storage so results are auditable.

Cross-chain, chain-agnostic: domains and CAIP-10 addresses let agents be discovered and used across EVM chains.

SDK & Explorer: developer SDK (TypeScript/Node) automates registry calls, x402 payment orchestration, and job submission to 0G Compute; the Explorer shows domains, agents, PoR, and payment info.

Typical developer flow (3 steps)

Create domain & agent metadata — publish agent.json (name, endpoint, payment rules, metadataURI) and deploy/register domain on 0G via the SDK.

Implement agent endpoint with x402 — add x402 middleware so the endpoint returns 402 with paymentRequirements and accepts X-PAYMENT.

Consume via SDK — client calls agent; SDK handles 402 → constructs/signs payment → resends request → fetches verified response and updates on-chain logs/feedback.

Why PowerHouse matters

Developers get a single stack for discover + trust + pay for AI services, reducing friction for production dApps.

Users get transparent reputation and verifiable outputs before they pay.

Economies form where agents can pay agents, open new micropayment business models, and show reliable histories anchored on-chain.

Example use cases

Healthcare triage agents with verifiable provenance and pay-per-consult calls.

DeFi risk solvers charging per-scan with on-chain settlement and reputation.

Disaster-relief sensor agents that charge for processed data while anchoring proofs to DA.

Operational notes & governance

PowerHouse supports on-chain governance for domain curation (optional token-curated lists), validators for automated validation tasks, and a payment facilitator pattern for agents that don’t run full nodes. Security best practices (signed agent registrations, HTTPS, audited middleware) are required to avoid impersonation and replay attacks.

Get started (quick)

Install the SDK, connect wallet to 0G, publish agent.json to 0G Storage, register the domain/agent on 0G, add x402 to your agent endpoint, and test calls with the SDK (it auto-resolves 402 payments).

How it's Made

PowerHouse was built by combining ERC-8004 (Agent Domains) with x402 (HTTP crypto payments) and deploying everything natively on the 0G Chain. We wanted to create the first developer stack where AI agents can be registered, discovered, trusted, and paid — all in one flow.

🏗️ Core Architecture

Smart Contracts (Solidity, 0G EVM)

Implemented ERC-8004 standard for agent/domain registration, metadata linking, and on-chain feedback.

Added Proof-of-Reputation scoring via feedback + validation events.

Agent Metadata (IPFS + 0G Storage)

Each agent has a agent.json (endpoint, pricing, reputation hooks).

Metadata stored on 0G Storage/IPFS, ensuring immutability.

x402 Middleware (Node.js/Express)

Agents expose HTTP endpoints with x402 support.

If payment required → agent responds 402 Payment Required with JSON rules.

Middleware verifies X-PAYMENT header, calls facilitator, settles onchain, and returns resource.

0G DA & Compute

Outputs from agent inference are logged to 0G DA for auditability.

Heavy lifting inference tasks run on 0G Compute Network for decentralized, cost-efficient AI compute.

🧩 SDK & Explorer

PowerHouse SDK (TypeScript)

Provides devs with functions like registerAgent(), discoverAgents(), payAndCall().

Handles 402 → payment → retry flow automatically, abstracting x402 complexity.

Explorer (Next.js + Vercel)

Simple UI where you can browse domains, agents, and their on-chain reputation.

Fetches live metadata from IPFS/0G storage and contract events.

🔗 Partner Tech & Benefits

0G (Mainnet Infra) → Provided DA, Compute, Storage, Chain in one unified stack, letting us make agents fully decentralized.

x402 (Coinbase/CDP) → Gave us a drop-in standard for crypto payments in HTTP APIs, avoiding custom payment code.

IPFS → Made agent metadata tamper-proof and easily referenced from contracts.

🤯 Hacky / Notable Bits

We hacked together a “domain → subpath → JSON agent registry” on Vercel (e.g. /agent1.json) so that every agent is both on-chain discoverable and web-accessible.

Built an SDK helper that auto-resolves 402 flows (so devs just call sdk.callAgent() and payments happen under the hood).

Used CAIP-10 identifiers for chain-agnostic domain mapping so an agent in 0G can still be accessed from Arbitrum, Base, or Polygon.

background image mobile

Join the mailing list

Get the latest news and updates

Powerhouse | ETHGlobal