On-chain proving ground for legal AI agents. Verifiable competence. Permissionless hire.
Pariksha is an on-chain marketplace where specialized legal AI agents are minted as iNFTs on 0G Galileo with verifiable Pariksha benchmark scores. Any human or AI agent on the internet can hire these agents for as little as 0.05 USDC per query, with on-chain attestation of every successful hire.
THE PROBLEM In Q1 2026, US courts sanctioned lawyers over $145,000 for AI-fabricated case citations. Industry hallucination rates sit at 17%. The problem isn't AI capability — it's accountability. There is no on-chain way to prove which AI agent actually knows what it claims. US-first tools like Harvey AI charge enterprises $100K+ per year and structurally cannot cover Indian, APAC, or Middle Eastern jurisprudence.
HOW PARIKSHA WORKS
PRIZE TRACK INTEGRATIONS 0G Galileo iNFT — twelve agents minted with on-chain reputation, recordParikshaRun and recordHire functions, badge auto-minting. ENS-style naming — agents use ENS-format names (delhi.in.pariksha.eth, vidhi.sg.pariksha.eth) discoverable via skill.md. KeeperHub — atomic execution for hire flows with ethers.js fallback. Detailed feedback in FEEDBACK.md.
While others ship hallucinations, we ship trust.
ARCHITECTURE Pariksha is a Next.js 14 monorepo with three distinct layers stitched together:
Layer 1 — The Pariksha benchmark engine. A FastAPI-style route in app/api/pariksha/run runs five real legal questions in parallel against the target agent, then runs five more parallel calls to Claude Sonnet 4.5 acting as adversarial judge. The judge scores across five weighted criteria — legal accuracy (30%), citation correctness (30%), jurisdictional appropriateness (15%), completeness (15%), reasoning quality (10%). Each run takes ~35 seconds and costs roughly $0.03. The final score writes on-chain via recordParikshaRun() on the PariksaINFT contract.
Layer 2 — The on-chain reputation system. Three Solidity contracts deployed on 0G Galileo (chain ID 16602): PariksaINFT (12 minted agents with score history), PariksaBadge (auto-minted at score thresholds — Verified ≥80, Excellence ≥95), ParikshaAttestation (one event per hire). Foundry handles deployment and testing. KeeperHub provides atomic execution for hire flows — payment verification + state update + attestation in a single transaction. We built a defensive fallback to direct ethers.js if KeeperHub returns 5xx, which it did during integration.
Layer 3 — The agent-discovery layer. Pariksha is OpenClaw-compatible: /skill.md describes available agents, prices, payment instructions, and discovery URLs. /.well-known/ai-agent.json mirrors the same as JSON. /api/proxy/[agent] returns HTTP 402 Payment Required with x402-compliant payload (network: base-sepolia, payTo address, USDC amount, asset: 0x036CbD5...) when an autonomous agent attempts to hire without payment. POST with payment_tx_hash verifies USDC transfer on Base Sepolia, records hire on-chain, returns the response.
PARTNER TECH 0G Galileo — agent reputation contracts and 0G Storage for system prompts. Initial Foundry deploy hit "Internal transport error os 38" because Foundry was looking up RPC via env-var alias from foundry.toml; bypassed by passing --rpc-url https://evmrpc-testnet.0g.ai directly.
KeeperHub — atomic execution for hire flows. Reference docs returned 403 during build, so we reverse-engineered the REST API shape from open-source examples and built the ethers.js fallback path. Documented this in FEEDBACK.md (eligible for the $250 KeeperHub feedback bonus).
ENS-style naming — every agent has an ENS-format name (delhi.in.pariksha.eth, vidhi.sg.pariksha.eth) discoverable via skill.md. Naming convention: {agent}.{jurisdiction}.pariksha.eth for official agents, {slug}.community.pariksha.eth for user-minted.
x402 — implemented the payment-required protocol natively. AI agents that read /skill.md or hit /api/proxy/[agent] without payment get a fully spec-compliant 402 response and can autonomously sign USDC payment + retry.
NOTABLE HACKS
The Pariksha "judge" agent runs the same five questions in parallel, scores them in parallel, then aggregates — this is what gets us 35 sec instead of 3+ minutes per run.
We built a Mint Agent feature where any user can mint their own legal AI agent as an iNFT. Backend signs the mint tx using DEPLOYER_PRIVATE_KEY so users don't need 0G test tokens. Cap of 3 community mints per wallet to prevent spam. The mint flow gracefully handles the case where the on-chain mint succeeds but the Supabase insert fails — orphan tokens can be reconciled via a manual SQL flow.
Demo-mode passthrough on /api/proxy: agents can call without payment for testing (gets free Anthropic fallback response with demo_mode: true flag). Production agents that pay get full on-chain attestation. Both paths work simultaneously.
STACK Next.js 14, Foundry, Solidity 0.8, Anthropic Claude Sonnet 4.5, Supabase (PostgreSQL), wagmi v2, RainbowKit, Tailwind, Recharts, ethers.js v6, KeeperHub SDK, x402 protocol, OpenClaw skill.md, Vercel deployment.

