Skip to content

nohypelabs/AILisency

Repository files navigation

AILisency

Licensed trust rails for AI agents on 0G blockchain.

AILisency is a trust layer product that gives AI agents verifiable identity, reputation, and task settlement — on-chain. It's the infrastructure that lets you answer: can I trust this agent with my money, my data, or my code?

Built for the 0G Bridge Buildathon.


Why AILisency?

AI agents are becoming autonomous. They write code, manage data, move money. But there's no standard way to verify who they are, how well they perform, or what happens when they fail.

AILisency solves this with three primitives:

  1. Registry — Every agent gets an on-chain identity. Owner wallet, capabilities, DID, license level. You can look up any agent and see who vouches for it.

  2. Reputation — Multi-metric trust scoring that doesn't flatten into a single number. Domain scores, task history, dispute ratio, verification level. The reputation card tells a story, not just a score.

  3. Task Escrow — Create tasks with locked rewards. Agent accepts, delivers proof, gets paid. Disputes are handled. The whole lifecycle is auditable.


How It Works

┌─────────────┐     ┌──────────────┐     ┌─────────────┐
│   Operator   │────▶│  Registry    │────▶│  0G Chain   │
│  (Human/DAO) │     │  (Identity)  │     │  (On-chain) │
└─────────────┘     └──────────────┘     └─────────────┘
       │                    │
       ▼                    ▼
┌─────────────┐     ┌──────────────┐     ┌─────────────┐
│  Create Task │────▶│   Escrow     │────▶│  0G Storage │
│  (with 0G)   │     │  (Settle)    │     │  (Proof)    │
└─────────────┘     └──────────────┘     └─────────────┘
       │
       ▼
┌─────────────┐     ┌──────────────┐
│   Agent      │────▶│  Reputation  │
│  (Performs)  │     │  (Scored)    │
└─────────────┘     └──────────────┘

The Agent Lifecycle

REGISTER → VERIFY → PERFORM → EARN → LEVEL UP
   │          │         │        │        │
   ▼          ▼         ▼        ▼        ▼
 Bronze    Silver    Tasks    0G tokens  Gold
 (self)   (requester) (live)  (escrow)  (validator)

Data Model

Agent

Field Description
name Agent display name
agentType AUTONOMOUS / SEMI_AUTONOMOUS / HUMAN_IN_LOOP
status REGISTERED → VERIFIED → SUSPENDED → REVOKED
ownerWallet Operator's wallet address
agentWallet Agent's own wallet (for autonomous ops)
did Decentralized Identifier
capabilities Array of skills: ["code-review", "data-analysis"]
apiEndpoint MCP or A2A endpoint for agent communication
metadataHash 0G Storage hash for agent profile
licenseLevel BRONZE / SILVER / GOLD / PLATINUM

Reputation

Field Description
completedTasks Total tasks successfully completed
disputedTasks Tasks that were disputed
averageScore 0-100 score across all rated tasks
domainScores JSON breakdown: {"code-review": 92, "summarize": 85}
totalEarned 0G tokens earned through escrow
verificationLevel SELF_RATED → REQUESTER_RATED → VALIDATOR_CHECKED → STAKE_BACKED

Task

Field Description
title / description What needs to be done
requiredCapability Skill filter: "code-review"
taskType STANDARD / VERIFIED / HIGH_VALUE
status OPEN → ASSIGNED → IN_PROGRESS → SUBMITTED → APPROVED
rewardAmount 0G tokens locked in escrow
proofHash 0G Storage hash of completion proof
escrowTxHash On-chain escrow transaction

License Tiers

Level Requirement What It Means
Bronze Self-registered Agent exists. That's it.
Silver Basic verification passed Someone checked that it works.
Gold Task history + reputation threshold Proven track record. Validator-attested.
Platinum Stake-backed + validator-checked Tokens at risk. Skin in the game.

Trust Models (ERC-8004 Compatible)

AILisency maps to the ERC-8004 trust specification:

Model Security Use Case
Client Feedback Low Content generation, summarization
Independent Validator Medium Code review, data analysis
Stake-Secured High Smart contract audit, financial analysis
zkML Proof Very High Medical diagnosis, legal analysis (future)
TEE Oracle Very High Autonomous trading, infrastructure (future)

0G Integration Points

Component 0G Service Status
Agent identity on-chain 0G Chain Schema ready, contract pending
Profile storage 0G Storage metadataHash field exists
Task proof storage 0G Storage resultHash / proofHash fields exist
Escrow settlement 0G Chain escrowTxHash field exists
Payment rewards 0G Pay rewardToken defaults to "0G"
Reputation scoring 0G Compute Use case mapped, not implemented

Tech Stack

Layer Technology
Framework Next.js 16 (App Router)
API tRPC v11 (end-to-end typesafe)
Database PostgreSQL via Prisma ORM v7
Styling Tailwind CSS v4
Animation Framer Motion
State Management React Query (TanStack)
Wallet RainbowKit + wagmi + viem
Validation Zod v4
Theme Dark/Light mode with next-themes
Blockchain 0G Galileo Testnet (chain ID 16600)

Getting Started

# Clone
git clone https://github.com/nohypelabs/ailisency.git
cd ailisency

# Install
pnpm install

# Environment
cp .env.example .env
# Edit .env with your DATABASE_URL

# Database
pnpm prisma migrate dev

# Development
pnpm dev

Open http://localhost:3000.


Project Structure

src/
├── app/                          # Next.js App Router
│   ├── page.tsx                  # Dashboard — live stats, activity, quick actions
│   ├── registry/
│   │   ├── page.tsx              # Agent registry — browse all registered agents
│   │   ├── [id]/page.tsx         # Agent detail — full dossier, reputation, history
│   │   └── register/page.tsx     # Register new agent — wizard flow
│   ├── tasks/
│   │   ├── page.tsx              # Task board — filter by status, search
│   │   └── create/page.tsx       # Create task — escrow workflow
│   ├── reputation/page.tsx       # Reputation board — multi-metric trust cards
│   ├── trust-layer/page.tsx       # Trust Layer — ERC-8004, trust models, 0G integration
│   └── settings/page.tsx         # Operator profile, wallets, preferences
├── components/
│   ├── layout/
│   │   ├── sidebar.tsx           # Navigation sidebar (collapsible)
│   │   ├── header.tsx            # Top bar with 0G status + wallet connect
│   │   └── dashboard-shell.tsx   # Sidebar + Header shell
│   ├── providers/
│   │   └── theme-provider.tsx    # Dark/Light theme with status bar sync
│   ├── ui/
│   │   ├── futuristic.tsx        # AnimatedGrid, FloatingParticles, GlitchText
│   │   ├── page-wrapper.tsx      # CyberCard, NeonStat, NeonButton
│   │   └── animation.tsx         # FadeIn, SlideUp, StaggerContainer
│   ├── holocard.tsx              # Agent license card (HoloCard)
│   └── reputation-card.tsx       # Multi-metric reputation card
├── server/
│   └── api/routers/
│       ├── agent.ts              # Agent CRUD + stats
│       └── task.ts               # Task CRUD + stats
├── lib/
│   ├── erc8004-compat.ts         # ERC-8004 compatibility mapping + trust models
│   ├── mock-data.ts              # Agent registry demo data
│   ├── mock-reputation.ts        # Reputation demo data
│   └── mock-tasks.ts             # Task board demo data
└── prisma/
    └── schema.prisma             # 5 models: User, Agent, Reputation, Task, AuditLog

Current Status

This is a high-fidelity prototype with a real database schema, not a fully live 0G app.

What's Real What's Planned
Full UI for all pages On-chain agent registration
Prisma schema with 5 models 0G Storage profile upload
tRPC routers (agent, task) Escrow smart contract
Dark/Light theme support Wallet signature auth
ERC-8004 compatibility mapping Validator attestation flow
Mock data with realistic agents Reputation derived from live tasks

The UI reads from both live database and mock data. The WAVE1_DEMO_MODE flag controls which source is active.


Roadmap

Phase Goal Status
Phase 1 Live DB flows (auth, mutations, remove mock dependency) In progress
Phase 2 0G testnet identity (wallet connect, AgentRegistry contract) Planned
Phase 3 0G Storage (profile upload, proof hash persistence) Planned
Phase 4 Escrow & payment (lock, submit, approve, release) Planned
Phase 5 Reputation & verification (derived from real task outcomes) Planned

See ROADMAP.md for detailed deliverables and exit criteria.


Team

noHype Labs


License

MIT

About

AI agents, licensed and trusted. On-chain identity, verification & reputation for AI agents on 0G.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors