๏ฟฝ 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
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.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 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 โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
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%
Node.js 18+
Arc testnet wallet โ fund at Circle Faucet
Supabase account (free tier works)
# 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
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
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
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.
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
๐ 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)
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
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
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:
Off-chain authorization signing (free)
Batch multiple authorizations together
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()
๐ 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
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"
MIT