1 — System Overview
Three layers: on-chain Base Sepolia, the Parley Protocol platform API, and OpenServ SDK agents.
Base Sepolia — On-Chain
ERC-8004 AgentRegistry0xb0088…D305
USDC0x036C…F7e
x402.org Facilitatorverify + settle
verify + settle on-chain↓
Parley Protocol Platform
/api/content/:id402 → verify → settle
/api/agent/negotiateClaude AI engine
/api/dashboardpublisher stats
MongoDB Atlasvia Prisma
capabilities↓
capabilities↓
Publisher Agent — OpenServ SDK
· negotiate_access
· check_reputation
· evaluate_content
· update_reputation
Consumer Agent — OpenServ SDK
· browse_articles
· negotiate_content_access
· purchase_content (x402)
· autonomous_content_purchase
2 — x402 Payment Flow
How real USDC moves from a consumer agent to a publisher wallet, settled on Base Sepolia.
Consumer Agent
GET /api/content/:id→
Platform API
verify + settle→
x402 Facilitator
transferWithAuth→
USDCBase Sepolia
1.Consumer Agent → GET /api/content/:id — no payment header
2.Platform API → HTTP 402 Payment Required{ x402Version:1, network:"base-sepolia", asset:"0x036C…", maxAmountRequired:"1000", extra:{name:"USDC",version:"2"} }
3.Consumer Agent → Sign EIP-3009 TransferWithAuthorizationExactEvmSchemeV1 creates EIP-712 typed data signature
4.Consumer Agent → GET /api/content/:id with X-PAYMENT header
5.x402 Facilitator → verify → transferWithAuthorization on-chainExecutes USDC transfer on Base Sepolia
6.Platform API → AccessLog saved to MongoDB — tx hash recorded
7.Consumer Agent → HTTP 200 — full content + txHash
3 — Negotiation Flow
How the Claude AI engine reads on-chain reputation and settles on a price.
Consumer Agent
POST /api/agent/negotiate→
Claude AI Engine
readContract→
ERC-8004Base Sepolia
1.Consumer Agent → POST { articleId, consumerAddress, offer: 0.0005 }
2.Platform API → find article + publisher settings in MongoDB
3.Claude AI Engine → getReputation(consumerAddress) on ERC-8004Returns { score: 50, totalDeals: 0, exists: true }
4.Claude AI Engine → Apply reputation multiplier + check use-case keywords
Use-case match
keyword match → free or discount
decision: accept, price: 0
Offer ≥ minPrice
meets floor with rep adjustment
decision: accept, price: offer
Offer < minPrice
too low — publisher counters
decision: counter, price: minPrice
5.Platform API → NegotiationSession.create/update in MongoDB
6.Consumer Agent → Receives { decision, price, reasoning, sessionId }
7.Consumer Agent → If counter → submit new offer with sessionId (up to 4 rounds)