Skip to content
AI Builders Hackathon
AgentBadge AgentBadge
onchain
⛓️ Base Sepolia

Onchain Trust Records for the Agentic Web

AgentBadge scans any site for agent-readiness, records the result onchain on Base Sepolia, and mints a soulbound trust badge. 40+ deterministic rules, MCP-native, x402 payments.

40+
Readiness rules
6
MCP tools
2
Trust contracts
$0.01
x402 per record
⚙️ Onchain Workflows (3)

Three onchain workflows power the 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 Sepolia

Stores scan records onchain. Key functions:

  • recordScan(siteUrl, score, rulesPassed, rulesTotal) — creates a trust record
  • getRecord(id) — returns scan data for verification
  • recordCount() — total records onchain

Emits RecordScan event → consumed by audit-stream workflow.

TrustBadge.sol

ERC-721 SBT

Soulbound (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)
Onchain Workflow: record-scan
    ↓
TrustRegistry.recordScan()  ──→  emits RecordScan event
    ↓                                    ↓
TrustBadge.mint() (if score ≥ 85)    audit-stream → SSE → browser
🔧 MCP Tools (6)

Six MCP tools expose the full AgentBadge system to AI agents:

scan

Triggers an AgentBadge scan on a given URL. Returns scan ID, score, and rule breakdown. Supports dry-run mode (no onchain tx).

badge

Checks if a site has a TrustBadge NFT. Returns token ID, mint tx, and onchain metadata if badge exists.

passport

Returns the full agent-readiness passport for a site — all scan results, badges, and trust records in one call.

verify

Verifies an onchain trust record by tx hash. Returns the scan data stored onchain for independent verification.

score

Returns the agent-readiness score for a site. Fast lookup without running a full scan.

search

Search across all scanned sites. Filter by score, grade, or readiness criteria.

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:

  1. Agent calls the scan MCP tool with premium flag
  2. Server returns 402 Payment Required with x402 challenge
  3. Agentic Wallet skill signs an EIP-3009 USDC authorization
  4. Server settles payment and records the scan onchain
  5. 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).

⚡ AgentBadge Site URL https://example.com web2 1. scan AgentBadge Scan 40 rules, score 0-100 web2 2. trigger Onchain Workflow write-contract, MCP MCP 3. record TrustRegistry recordScan() on Base EVM 4. stream Audit Trail + SSE live feed + Basescan SSE 5. score >= 85 → mint TrustBadge mint soulbound ERC-721 SBT ERC-721

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
  • Onchain Workflow and TrustRegistry are the onchain execution layer
📋 Step-by-step data flow
  1. Scan — AgentBadge scans the site URL with 40 agent-readiness rules, producing a score and structured report
  2. Trigger — Scan result triggers an onchain workflow via webhook (write-contract MCP tool)
  3. Record — Workflow calls TrustRegistry.recordScan() on Base Sepolia, creating an onchain trust record
  4. Stream — The onchain record streams live via SSE to the audit trail table (no page refresh needed)
  5. Mint — If the scan score ≥ 85, a soulbound TrustBadge (ERC-721 SBT) is minted on Base Sepolia
FAQ

What is AgentBadge?

AgentBadge is an agent-readiness scanner with 40+ deterministic rules. It checks any website for MCP compatibility, structured data, AI policies, and more — then records the result onchain as a permanent 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.

What is MCP?

Model Context Protocol — an open standard for AI agents to discover and call tools. AgentBadge exposes 6 MCP tools (scan, badge, passport, verify, score, search) that any MCP-compatible agent can call directly.

How it works

1

Scan

40-rule agent-readiness scan (SSRF-guarded, free dry-run)

2

Confirm

Dry-run preview shows exactly what lands onchain (functionArgs), then confirm

3

Record

Workflow executes: TrustRegistry.recordScan onchain, tx on Basescan

4

Verify

Audit trail (live SSE) + verify 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.

Status Site Score Tx Recorded

Source: TrustRegistry on Base Sepolia · each Tx links to Basescan

Stack

Base Sepolia
84532, Basescan
TrustRegistry / TrustBadge
Solidity 0.8.30, OZ 5.1
x402 v2
EIP-3009 USDC, facilitator
MCP tools
6 tools: scan, badge, passport, verify, score, search
SSE
live audit stream
Hono + hono/html
server-rendered, zero client framework
Agent Readiness Scanner
40+ deterministic rules, CLI + API

API Surface

Every public endpoint and MCP tool.

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 scan · badge · passport · verify · score · search MCP session via AgentBadge MCP server

Run the demo above

A permanent onchain record is 30 seconds away.

Support: support@agentbadge.xyz