Onchain Trust Records for the Agentic Web
AgentBadge scans any site for agent-readiness, records the result onchain through a KeeperHub workflow (Base Sepolia), and mints a soulbound trust badge. KeeperHub Agent Economy hackathon (Sep 6-18, 2026).
⚙️ KeeperHub Workflows (3) ▾
Three KeeperHub workflows power the onchain trust record pipeline:
1. record-scan
Triggered after each AgentBadge scan. Calls TrustRegistry.recordScan() on Base Sepolia with the scan result, site URL, score, and rule breakdown. Creates a permanent onchain trust record.
2. mint-trust-badge
Triggered when scan score ≥ 85. Calls TrustBadge.mint() to mint a soulbound ERC-721 NFT on Base Sepolia. The badge is non-transferable and permanently linked to the scanned site.
3. audit-stream
Long-running workflow that listens for RecordScan events on TrustRegistry and streams them via SSE to the audit trail table. No page refresh needed — rows appear live.
📜 Trust Contracts (2) ▾
Two smart contracts on Base Sepolia (84532) form the onchain trust layer:
TrustRegistry.sol
Base SepoliaStores scan records onchain. Key functions:
recordScan(siteUrl, score, rulesPassed, rulesTotal)— creates a trust recordgetRecord(id)— returns scan data for verificationrecordCount()— total records onchain
Emits RecordScan event → consumed by audit-stream workflow.
TrustBadge.sol
ERC-721 SBTSoulbound (non-transferable) NFT contract. Key functions:
mint(to, siteUrl, score)— mints badge (score ≥ 85 only)tokenURI(tokenId)— onchain metadata JSON_update()— override: revert on transfer (soulbound)
Implements ERC-721 with _update override to prevent transfers.
Contract interaction flow:
AgentBadge Scan
↓ (score + rules)
KeeperHub Workflow: record-scan
↓
TrustRegistry.recordScan() ──→ emits RecordScan event
↓ ↓
TrustBadge.mint() (if score ≥ 85) audit-stream → SSE → browser
🔧 MCP Tools (4) ▾
Four MCP tools expose the trust record system to AI agents:
keeperhub-scan
Triggers an AgentBadge scan on a given URL. Returns scan ID, score, and rule breakdown. Supports dry-run mode (no onchain tx).
keeperhub-record
Records a scan result onchain via KeeperHub workflow. Calls TrustRegistry.recordScan(). Returns tx hash + Basescan link.
keeperhub-audit
Queries the onchain audit trail. Returns recent trust records with tx hashes, timestamps, and scan scores.
keeperhub-badge
Checks if a site has a TrustBadge NFT. Returns token ID, mint tx, and onchain metadata if badge exists.
Agents discover these tools via the MCP server descriptor at /.well-known/mcp.json and call them directly — no UI needed.
💵 x402 Payment ($0.01/record) ▾
Agents pay for onchain records via the x402 protocol — native HTTP 402 payment:
- Agent calls
keeperhub-recordMCP tool - Server returns 402 Payment Required with x402 challenge
- Agentic Wallet skill signs an EIP-3009 USDC authorization
- Server settles payment and executes the KeeperHub workflow
- Two onchain receipts: USDC transfer + TrustRegistry record
Cost breakdown: $0.01 USDC per record (gas on Base Sepolia is negligible)
Architecture
Every arrow is one verifiable transaction on Base Sepolia (84532).
Base Sepolia testnet — every arrow is one verifiable tx
⚡ AgentBadge components in this flow ▾
The AgentBadge Scan, Audit Trail + SSE, and TrustBadge mint nodes (dashed border in the diagram) are AgentBadge components:
- AgentBadge Scan — runs a 40-rule agent-readiness scan, produces a score (0-100) and structured report
- Audit Trail + SSE — live server-sent events feed streaming onchain records to the browser in real-time
- TrustBadge mint — when score ≥ 85, mints a soulbound ERC-721 trust badge on Base Sepolia
- KeeperHub Workflow and TrustRegistry are KeeperHub infrastructure components
📋 Step-by-step data flow ▾
- Scan — AgentBadge scans the site URL with 40 agent-readiness rules, producing a score and structured report
- Trigger — Scan result triggers a KeeperHub workflow via webhook (write-contract MCP tool)
- Record — KeeperHub workflow calls TrustRegistry.recordScan() on Base Sepolia, creating an onchain trust record
- Stream — The onchain record streams live via SSE to the audit trail table (no page refresh needed)
- Mint — If the scan score ≥ 85, a soulbound TrustBadge (ERC-721 SBT) is minted on Base Sepolia
❓ FAQ ▾
What is KeeperHub?
KeeperHub is an onchain workflow automation platform that lets smart contracts trigger external actions via MCP tools — webhooks, contract writes, and API calls.
How does AgentBadge use KeeperHub?
AgentBadge triggers a KeeperHub workflow after each scan. The workflow calls TrustRegistry.recordScan() on Base Sepolia, creating a permanent onchain trust record.
What is a dry-run?
A dry-run preview shows exactly what would be executed onchain (function arguments, workflow name, target contract) without actually sending a transaction. You confirm before anything goes onchain.
What is the TrustBadge?
A soulbound (non-transferable) ERC-721 NFT minted on Base Sepolia when a site scores ≥ 85 on the agent-readiness scan. It serves as a permanent onchain proof of agent-readiness.
How do agents pay?
Agents pay via x402 protocol — a 402 challenge triggers the Agentic Wallet skill to sign an EIP-3009 USDC transfer. Two onchain receipts: payment settlement + trust record.
How it works
Scan
40-rule agent-readiness scan (SSRF-guarded, free dry-run)
Confirm
Dry-run preview shows exactly what lands onchain (functionArgs), then confirm
Record
KeeperHub executes the workflow: TrustRegistry.recordScan onchain, tx on Basescan
Verify
Audit trail (live SSE) + keeperhub-audit MCP tool; agents pay via x402 (USDC)
Try it: scan → onchain record
One POST away from a permanent onchain trust record.
Agents can pay per onchain record via x402 (USDC on Base):
POST /api/keeperhub/scan/premium
Live Audit Trail
Onchain records, streamed as they happen.
No onchain records yet — run the demo above ↑
| Status | Site | Score | Tx | Recorded |
|---|
Source: TrustRegistry on Base Sepolia · each Tx links to Basescan
Stack
API Surface
Every public endpoint and MCP tool from Phase C/D.
| Surface | Endpoint / Tool | Auth | Returns |
|---|---|---|---|
| Scan (free) | POST /api/keeperhub/scan | — | dry-run preview or onchain tx |
| Scan (premium) | POST /api/keeperhub/scan/premium | x402 · $0.01 | onchain tx (paid via USDC) |
| Audit API | GET /api/keeperhub/audit | — | events + onchain + Basescan links |
| Live stream | GET /api/keeperhub/audit/stream | — | event: audit frames (SSE) |
| MCP tools | keeperhub-record-scan · mint-trust-badge · workflow-status · audit | MCP session | via AgentBadge MCP server |