Skip to content
HyperionBurnPublic

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

27 Commits

Folders and files

Repository files navigation


AgentWork

Autonomous AI Agents ยท Sub-Cent Nanopayments ยท On-Chain Reputation

The first economically viable AI agent marketplace โ€” powered by Arc L1 and Circle's x402 protocol.


Arc L1 Circle x402 USDC Native Gas Vyper ERC-8004 Gemini Featherless TypeScript


Built for the Agentic Economy on Arc Hackathon ยท April 2026

Tracks: ๐Ÿค– Agent-to-Agent Payment Loop ยท ๐Ÿงฎ Usage-Based Compute Billing ยท ๐Ÿช™ Per-API Monetization Engine



๏ฟฝ Architectural Whitepaper

๐Ÿ“ฅ Download the AgentWork Architectural Whitepaper (PDF)

A comprehensive technical document covering the full system design, economic model, smart contract architecture, and payment flow analysis behind AgentWork.

Section Highlights
System Architecture Multi-layer design: Agent Layer โ†’ Orchestrator โ†’ Circle Gateway โ†’ Arc L1
Economic Model 97.8% margin proof โ€” why $0.005 payments only work on Arc
Smart Contract Design 5 Vyper contracts: Escrow, PaymentSplitter, Identity, Reputation, SpendingLimiter
x402 Payment Protocol Full HTTP 402 lifecycle: authenticate โ†’ authorize โ†’ settle โ†’ verify
A2A Agent Chaining Multi-hop agent-to-agent nanopayment reciprocity chains
Security Analysis EIP-3009 gasless signing, Gateway batching, SpendingLimiter rate caps

๏ฟฝ๐Ÿ’ก Why AgentWork?

AI agents are powerful โ€” but paying them is broken. A $0.005 agent call costs $3.50 in gas on Ethereum. That's not a marketplace โ€” it's a money incinerator.

๐Ÿ’ฐ Cost per Transaction Gas Fee % of $0.005 Revenue Can You Profit?
๐Ÿ”ด Ethereum L1 $3.50 70,000% โŒ
๐ŸŸ  Arbitrum L2 $0.10 2,000% โŒ
๐ŸŸก Polygon $0.05 1,000% โŒ
๐ŸŸก Base (Coinbase L2) $0.01 200% โŒ
๐ŸŸก Solana $0.001 20% โš ๏ธ Marginal
๐ŸŸข Arc L1 + Circle x402 ~$0.0001 2% โœ… 97.8% margin

The math is binary. Either gas costs eat the revenue, or they don't. Only Arc crosses the viability threshold.

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         AGENTWORK PLATFORM                              โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                                         โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”‚
โ”‚   โ”‚              ๐Ÿ–ฅ๏ธ  Vite Dashboard (React + Zustand)           โ”‚      โ”‚
โ”‚   โ”‚    Real-time task feed ยท Agent cards ยท Explorer links        โ”‚      โ”‚
โ”‚   โ”‚    Economy charts ยท Receipts ยท Playground ยท :3001            โ”‚      โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ”‚
โ”‚                              โ”‚ SSE / Supabase Realtime                 โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”‚
โ”‚   โ”‚              ๐Ÿ“Š  Next.js API Backend (:3003)                 โ”‚      โ”‚
โ”‚   โ”‚    REST routes ยท x402 verify/settle ยท Supabase queries       โ”‚      โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ”‚
โ”‚                              โ”‚                                          โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”‚
โ”‚   โ”‚              โšก  Orchestrator (TypeScript + ESM)              โ”‚      โ”‚
โ”‚   โ”‚    Task decomposer โ†’ GatewayClient.pay() โ†’ Settlement poll   โ”‚      โ”‚
โ”‚   โ”‚    A2A chaining ยท Streaming ยท Governance ยท SLA engine         โ”‚      โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ”‚
โ”‚           โ”‚          โ”‚          โ”‚          โ”‚                            โ”‚
โ”‚     โ”Œโ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                   โ”‚
โ”‚     โ”‚ ๐Ÿ”ฌ Researchโ”‚ โ”‚๐Ÿ’ป Code โ”‚ โ”‚๐Ÿงช Test โ”‚ โ”‚๐Ÿ“‹ Reviewโ”‚                   โ”‚
โ”‚     โ”‚  Agent    โ”‚ โ”‚ Agent  โ”‚ โ”‚ Agent  โ”‚ โ”‚ Agent   โ”‚                   โ”‚
โ”‚     โ”‚  :4021    โ”‚ โ”‚ :4022  โ”‚ โ”‚ :4023  โ”‚ โ”‚ :4024   โ”‚                   โ”‚
โ”‚     โ”‚  $0.005   โ”‚ โ”‚ $0.005 โ”‚ โ”‚ $0.005 โ”‚ โ”‚ $0.005  โ”‚                   โ”‚
โ”‚     โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                   โ”‚
โ”‚           โ”‚          โ”‚         โ”‚          โ”‚                            โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚   โ”‚           ๐Ÿ”ต Circle Gateway (x402 / EIP-3009)                   โ”‚  โ”‚
โ”‚   โ”‚   Off-chain auth signing โ†’ Batch settlement โ†’ Arc L1           โ”‚  โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚                              โ”‚ On-chain settlement                     โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚   โ”‚                    โ›“๏ธ  Arc L1 (Chain ID: 5042002)                โ”‚  โ”‚
โ”‚   โ”‚                                                                  โ”‚  โ”‚
โ”‚   โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”           โ”‚  โ”‚
โ”‚   โ”‚  โ”‚ AgentEscrow  โ”‚ โ”‚ PaymentSplit โ”‚ โ”‚ SpendingLimiterโ”‚           โ”‚  โ”‚
โ”‚   โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜           โ”‚  โ”‚
โ”‚   โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                โ”‚  โ”‚
โ”‚   โ”‚  โ”‚ IdentityRegistry โ”‚ โ”‚ ReputationRegistry    โ”‚                โ”‚  โ”‚
โ”‚   โ”‚  โ”‚    (ERC-721)     โ”‚ โ”‚     (ERC-8004)        โ”‚                โ”‚  โ”‚
โ”‚   โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                โ”‚  โ”‚
โ”‚   โ”‚                                                                  โ”‚  โ”‚
โ”‚   โ”‚   USDC native gas ยท ~$0.0001/tx ยท EVM-compatible               โ”‚  โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚                                                                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“Š Live Economics

Cost at Scale: 1,000 Transactions

 Ethereum L1  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  $3,500
 Arbitrum L2   โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ                                  $100
 Polygon        โ–ˆโ–ˆโ–ˆโ–ˆ                                   $50
 Base            โ–ˆ                                      $10
 Solana          โ–                                      $1
 Arc L1           โ–Ž                                    $0.10  โ† 3,500ร— cheaper

Revenue Margins per Agent Call

Revenue Gas Cost Net Profit Margin
Agent Call @ $0.005 $0.005 $0.0001 $0.0049 97.8%
A2A Chain (3 hops) $0.015 $0.0003 $0.0147 98.0%
Full Task (4 agents) $0.020 $0.0004 $0.0196 98.0%
60-Transaction Demo $0.300 $0.006 $0.294 98.0%

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+
  • Arc testnet wallet โ€” fund at Circle Faucet
  • Supabase account (free tier works)

One-Command Setup

# Clone
git clone https://github.com/HyperionBurn/AgentWork.git
cd AgentWork

# Configure
cp .env.example .env
# โ† Edit .env with your private key + Supabase credentials

# Install + Validate
npm install
npm run validate-env

# Launch everything
npm run start:agents:express   # Terminal 1: Agents (:4021-4024)
cd packages/dashboard && npx next dev -p 3003  # Terminal 2: API
cd newgemdashboard && npx vite --port 3001      # Terminal 3: Dashboard

# Run the orchestrator (produces 26+ on-chain transactions)
cd packages/orchestrator && npx tsx src/index.ts

Full Demo (60+ Transactions)

npm run demo:10   # 10 orchestrated runs โ†’ 260+ on-chain txns

๐Ÿงฉ Components

Component Stack Port Description
Vite Dashboard React 19 ยท Tailwind v4 ยท Zustand ยท Framer Motion 3001 Real-time task feed, playground, economy charts, receipts
API Backend Next.js 14 ยท Supabase ยท x402 server SDK 3003 REST routes, payment verification, event streaming
Orchestrator TypeScript ESM ยท @circle-fin/x402-batching โ€” Task decomposition, gateway payments, settlement polling
Research Agent Express ยท x402 middleware 4021 Deep research & information synthesis
Code Agent Express ยท x402 middleware 4022 Code generation & implementation
Test Agent Express ยท x402 middleware 4023 Test suite generation & QA
Review Agent Express ยท x402 middleware 4024 Code review & quality scoring
Landing Page Vite ยท React Three Fiber ยท Framer Motion 3002 3D glassmorphism landing page (lazy-loaded Three.js)

Smart Contracts (Vyper 0.4.x โ€” Deployed on Arc Testnet)

Contract Address Standard Purpose
IdentityRegistry 0x858A...7431 ERC-721 Agent identity NFTs with metadata URIs
ReputationRegistry 0x75b4...f8Ea ERC-8004 On-chain reputation scores (0โ€“100)
AgentEscrow 0x5714...07F3 โ€” Task escrow (create โ†’ claim โ†’ complete)
PaymentSplitter 0xc239...aa30 โ€” Multi-recipient payment distribution
SpendingLimiter 0xe0c7...072D โ€” Per-agent spending rate limits

๐Ÿ”„ Transaction Flow

A single orchestrator run produces 26+ on-chain transactions:

  1. โ”€โ”€ Deposit USDC into Circle Gateway โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ’ฐ
  2. โ”€โ”€ Pay Research Agent โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ”ฌ $0.005 โ”€โ”€โ”€โ”€ โ›“๏ธ tx
  3. โ”€โ”€ Pay Code Agent โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ’ป $0.005 โ”€โ”€โ”€โ”€ โ›“๏ธ tx
  4. โ”€โ”€ Pay Test Agent โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿงช $0.005 โ”€โ”€โ”€โ”€ โ›“๏ธ tx
  5. โ”€โ”€ Pay Review Agent โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ“‹ $0.005 โ”€โ”€โ”€โ”€ โ›“๏ธ tx
  6. โ”€โ”€ Create Escrow Task โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ“ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ›“๏ธ tx
  7. โ”€โ”€ Agent Claims Escrow โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โœ‹ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ›“๏ธ tx
  8. โ”€โ”€ Submit Escrow Result โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ“ฆ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ›“๏ธ tx
  9. โ”€โ”€ Approve Escrow Completion โ”€โ”€โ”€โ”€โ”€ โœ… โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ›“๏ธ tx
 10. โ”€โ”€ Write Reputation (ร—4 agents) โ”€โ”€ โญ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ›“๏ธ tx
11. โ”€โ”€ A2A Nanopayment Chains โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ”— ร—11 โ”€โ”€โ”€โ”€โ”€โ”€ โ›“๏ธ tx
     ...
 26. โ”€โ”€ Settlement Complete โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ Total: ~$0.01

5 tasks ร— 26 txns = 60+ on-chain transactions. Total cost: ~$0.05. Every transaction is verifiable on ArcScan.


โœ… Hackathon Requirements Checklist

Mandatory Submission Requirements

# Requirement Status Evidence
REQ-01 Real per-action pricing โ‰ค $0.01 โœ… $0.005/agent call โ€” 50% below the threshold
REQ-02 50+ on-chain transactions in demo โœ… 260+ txns via npm run demo:10; 110+ via 10ร— pipeline run
REQ-03 Margin explanation (fails with traditional gas) โœ… 97.8% margin on Arc vs โˆ’70000% on Ethereum โ€” see Margin Analysis
REQ-04 Transaction flow demo video โœ… Shows end-to-end USDC payment + ArcScan verification
REQ-05 Circle Product Feedback ($500 bonus) โœ… circle-product-feedback.md โ€” detailed SDK feedback
REQ-06 Which Circle products used + why โœ… Arc ยท USDC ยท Circle Gateway ยท Nanopayments ยท x402 (see below)

Track Alignment

Track How AgentWork Addresses It
๐Ÿค– Agent-to-Agent Payment Loop โœ… Primary track. 4 autonomous agents pay/receive in real-time via x402. A2A reciprocity chains enable multi-hop agent-to-agent commerce without custodial control.
๐Ÿงฎ Usage-Based Compute Billing โœ… Each agent call billed at $0.005 โ€” precisely aligned to usage. SpendingLimiter enforces per-agent rate caps.
๐Ÿช™ Per-API Monetization Engine โœ… Every Express agent endpoint is an x402-gated API. Research, Code, Test, Review โ€” each charges per request.
๐Ÿ›’ Real-Time Micro-Commerce Flow โœ… Economic activity triggers and settles per interaction, not per subscription. Escrow lifecycle runs on-chain.

Circle Products Used

Product How We Use It Why We Chose It
Arc L1 All transactions settle on Arc (Chain ID 5042002) Only chain where sub-cent payments are economically viable โ€” USDC native gas at ~$0.0001/tx
USDC Native gas token + payment denomination Stable value, 6 decimals, no volatility risk for agent pricing
Circle Gateway GatewayClient for buyer-side deposits/payments; BatchFacilitatorClient for seller-side verify+settle EIP-3009 gasless signing โ€” agents never hold ETH, never pay gas directly
Nanopayments (x402) HTTP 402 payment-required protocol wrapping every agent endpoint Web-native payment standard โ€” any HTTP client can pay, no wallet extension needed
@circle-fin/x402-batching SDK v2.1.0 Official Circle SDK for both buyer and seller sides Production-grade batching reduces on-chain footprint

Judging Criteria Alignment

Criterion How AgentWork Scores
Application of Technology Gemini 4 31B for task decomposition + routing decisions; Featherless for LLM inference; Vyper for 5 deployed contracts; Circle x402 SDK v2.1.0 for payments; React Three Fiber for 3D landing page
Presentation Live dashboard (real-time task feed, playground, economy charts); 3D landing page; 5-slide pitch deck; 260+ on-chain transactions demonstrable live
Business Value 97.8% margin per agent call; first economically viable multi-agent marketplace; 3,500ร— cheaper than Ethereum; enables $0.005/action pricing that's impossible on any other chain
Originality A2A reciprocity chains (agents pay agents); Gemini-powered adaptive routing (parallel vs sequential); full escrow lifecycle on-chain; ERC-8004 reputation + identity; spending limiter for budget enforcement

Google Gemini Integration

Aspect Implementation
Model google/gemma-4-31B-it via Featherless API (Gemini family)
Use Case Task decomposition, agent routing decisions, reputation scoring
Function Calling decideTaskRouting() โ€” chooses parallel vs sequential execution based on agent history
Deep Think decideReputationScore() โ€” evaluates agent output quality with reasoning chain
Google AI Studio Used for prompt prototyping and routing strategy iteration

Differentiation from Other Submissions

What Others Do What AgentWork Does Differently
Mock payments or simulated transactions Real x402 payments via Circle Gateway with on-chain settlement receipts
2โ€“3 agent simple loop 7 subtasks in 4 parallel execution levels with adaptive routing
No smart contracts 5 deployed Vyper contracts โ€” Escrow, PaymentSplitter, Identity, Reputation, SpendingLimiter
No reputation system ERC-8004 on-chain reputation with post-task feedback and quality scores
Basic cost comparison table Live margin dashboard showing real-time revenue/gas/cost per agent
Single payment flow Full lifecycle: deposit โ†’ escrow โ†’ pay โ†’ verify โ†’ settle โ†’ claim โ†’ reputation โ†’ A2A chain


๐Ÿ› ๏ธ Tech Stack

๐Ÿ”’ Required (Per Hackathon)

  • Arc L1 โ€” EVM-compatible settlement (Chain ID 5042002)
  • USDC โ€” Native gas token + payment denom (6 decimals)
  • Circle Nanopayments โ€” Sub-cent, high-frequency x402 payments
  • Circle Gateway โ€” EIP-3009 gasless batch settlements
  • @circle-fin/x402-batching v2.1.0 โ€” Official Circle SDK
  • @x402/core + @x402/evm โ€” Protocol primitives

๐Ÿงฉ Recommended (Per Hackathon)

  • Vyper 0.4.x โ€” 5 deployed smart contracts
  • Moccasin + Titanoboa โ€” Deployment + testing framework
  • ERC-8004 โ€” Agent identity + reputation standard
  • viem โ€” EVM interactions (peer dep for x402 SDK)

๐Ÿค– AI / LLM Partners

  • Google Gemini (gemma-4-31B-it) โ€” Task routing + reputation
  • Google AI Studio โ€” Prompt prototyping
  • Featherless โ€” LLM inference provider
  • AI/ML API โ€” Multi-model access

๐Ÿ–ฅ๏ธ Application Layer

  • Next.js 14 โ€” API backend + SSR dashboard
  • React 19 + Vite โ€” Frontend dashboard
  • TypeScript โ€” Strict mode, ES modules
  • Supabase โ€” Realtime event streaming
  • Express โ€” Agent gateway (4 specialist agents)
  • React Three Fiber โ€” 3D landing page
  • Framer Motion / Motion โ€” Animations
  • Zustand โ€” State management
  • Docker Compose โ€” One-command deploy

Why This Stack?

Decision Reasoning
Arc over Ethereum/L2 Only chain where $0.005 payments are profitable (97.8% margin vs โˆ’70000% on ETH)
x402 over custom payment Web-native HTTP 402 standard โ€” any HTTP client can pay without wallet extensions
Vyper over Solidity Safer contract language; hackathon recommended via vyper-agentic-payments and erc-8004-vyper references
Gemini for routing Function calling enables programmatic routing decisions between parallel and sequential execution
Circle Gateway over direct tx Gasless EIP-3009 signing โ€” agents never hold ETH, batch settlements reduce on-chain footprint
Express agents Unified host with x402 middleware โ€” production-grade, not a toy Python wrapper

๐Ÿ“ Project Structure

AgentWork/
โ”œโ”€โ”€ ๐Ÿ“‚ packages/
โ”‚   โ”œโ”€โ”€ orchestrator/          โšก Task decomposition + x402 payment loop
โ”‚   โ”‚   โ””โ”€โ”€ src/
โ”‚   โ”‚       โ”œโ”€โ”€ index.ts           Main orchestrator entry
โ”‚   โ”‚       โ”œโ”€โ”€ executor.ts        GatewayClient.pay() execution
โ”‚   โ”‚       โ”œโ”€โ”€ gateway-settlement.ts  Settlement resolution polling
โ”‚   โ”‚       โ”œโ”€โ”€ receipts.ts        Payment receipt generation
โ”‚   โ”‚       โ”œโ”€โ”€ contracts.ts       On-chain contract interactions
โ”‚   โ”‚       โ””โ”€โ”€ economy/           Streaming ยท A2A ยท Governance ยท SLA
โ”‚   โ”œโ”€โ”€ dashboard/             ๐Ÿ“Š Next.js API backend + pages
โ”‚   โ”‚   โ”œโ”€โ”€ app/api/              REST routes (agents, receipts, stream)
โ”‚   โ”‚   โ””โ”€โ”€ components/           React components
โ”‚   โ”œโ”€โ”€ contracts/             โ›“๏ธ Vyper smart contracts
โ”‚   โ”‚   โ”œโ”€โ”€ src/                  AgentEscrow ยท PaymentSplitter ยท etc.
โ”‚   โ”‚   โ””โ”€โ”€ tests/                Moccasin + Titanoboa tests
โ”‚   โ””โ”€โ”€ database/              ๐Ÿ—„๏ธ Supabase schema + seeds
โ”œโ”€โ”€ ๐Ÿ“‚ agents/
โ”‚   โ””โ”€โ”€ express-server/        ๐Ÿค– Unified agent host (:4021-4024)
โ”‚       โ””โ”€โ”€ server.ts             x402 middleware + specialist logic
โ”œโ”€โ”€ ๐Ÿ“‚ newgemdashboard/        ๐Ÿ–ฅ๏ธ Vite frontend dashboard
โ”‚   โ””โ”€โ”€ src/
โ”‚       โ”œโ”€โ”€ components/dashboard/ Dashboard shell + tabs
โ”‚       โ””โ”€โ”€ lib/                  Supabase ยท Store ยท API adapters
โ”œโ”€โ”€ ๐Ÿ“‚ newlandingpage/         ๐ŸŒ Landing page (React Three Fiber)
โ”œโ”€โ”€ ๐Ÿ“‚ scripts/                ๐Ÿ“œ Demo, smoke-test, evidence collection
โ”œโ”€โ”€ ๐Ÿ“‚ docs/                   ๐Ÿ“š Documentation
โ””โ”€โ”€ ๐Ÿ“‚ evidence/               ๐Ÿ“‹ Session recordings with tx hashes

๐Ÿง  Key Technical Highlights

1. Official Circle SDK โ€” Not a Toy Implementation

// Buyer-side: GatewayClient pays agents
import { GatewayClient } from "@circle-fin/x402-batching/client";

const gateway = new GatewayClient({
  chain: "arcTestnet",
  privateKey: process.env.ORCHESTRATOR_PRIVATE_KEY as Hex,
});

const result = await gateway.pay("http://localhost:4021/research");
console.log(`๐Ÿ”— Explorer: https://testnet.arcscan.app/tx/${result.transaction}`);
// Seller-side: BatchFacilitatorClient verifies + settles
import { BatchFacilitatorClient } from "@circle-fin/x402-batching/server";

const facilitator = new BatchFacilitatorClient({
  url: "https://gateway-api-testnet.circle.com",
});
const { isValid } = await facilitator.verify(payload, requirements);
const { success, transaction } = await facilitator.settle(payload, requirements);

2. Background Settlement Resolution

Gateway payments return immediately with a reference ID. We poll for on-chain settlement and backfill real tx hashes:

// If payment ref isn't a real 0x hash yet, poll in background
if (txHash && !isRealTransactionHash(txHash)) {
  void resolveGatewaySettlement({ gatewayRef: txHash, taskId, onSettled });
}

3. EIP-3009 Gasless Signing

Users never hold ETH and never pay gas directly. The Circle Gateway handles:

  1. Off-chain authorization signing (free)
  2. Batch multiple authorizations together
  3. Single on-chain settlement to Arc L1

4. 5 Deployed Vyper Contracts

All contracts are deployed on Arc testnet with real on-chain interactions โ€” not mocks:

Contract Functions
AgentEscrow createTask โ†’ claimTask โ†’ submitResult โ†’ approveCompletion
PaymentSplitter createSplit(recipients[], basisPoints[]) โ†’ distribute()
IdentityRegistry registerAgent(wallet, metadataUri) โ†’ ERC-721 NFT
ReputationRegistry giveFeedback(agentId, score) โ†’ getSummary() โ†’ avg score
SpendingLimiter setLimit(agent, amount, window) โ†’ recordSpending() โ†’ checkLimit()

๐Ÿ“š Documentation

Document Description
๏ฟฝ Architectural Whitepaper Full technical deep-dive: system design, economics, contracts, security
๏ฟฝ๐Ÿ“– Setup Guide Full step-by-step installation
๐Ÿ’ฐ Margin Analysis Detailed economic comparison โ€” why this only works on Arc
๐Ÿ“ Circle Product Feedback Detailed SDK feedback for $500 Product Feedback prize
๐Ÿ“‹ Submission Details Full hackathon submission details
๐Ÿค– LLM Provider Setup Multi-provider AI configuration (Gemini, Featherless, AI/ML API)
๐ŸŽฏ Pitch Deck 5-slide investor pitch deck
๐ŸŒ Landing Page 3D glassmorphism product page (React Three Fiber)
๐Ÿ“Š Live Dashboard Real-time agent marketplace dashboard

๐Ÿ† Prize Categories We're Competing For

Prize Amount Our Qualification
Online 1st Place $2,500 USDC 260+ real on-chain txns, 5 Vyper contracts, full x402 integration
On-site 1st Place $3,000 USDC Live demo ready, all services dockerized
Product Feedback $500 USDC Detailed Circle SDK feedback covering 5 pain points with code-level suggestions
Google Prize (Online) $1,200 Gemini-powered task routing, reputation scoring, and function calling
Featherless Prize 500 credits Featherless inference for agent responses

Arc Testnet Constants

Constant Value
Chain ID 5042002
RPC https://rpc.testnet.arc.network
USDC 0x3600000000000000000000000000000000000000 (6 decimals, native gas)
Circle Gateway 0x0077777d7EBA4688BDeF3E311b846F25870A19B9
Explorer https://testnet.arcscan.app
Faucet https://faucet.circle.com
SDK Chain Name "arcTestnet"

๐Ÿ“œ License

MIT


Built with โค๏ธ for the Agentic Economy on Arc Hackathon

โญ Star this repo ยท ๐Ÿ› Report Bug ยท ๐Ÿ’ก Request Feature

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages