Skip to content

HDemir23/AION-_

Repository files navigation

AION 🧠

Decentralized Multi-LLM Consensus Protocol on Monad

Monad License TypeScript

AION enables multiple AI language models to analyze, debate, and reach consensus on complex decisions - all decentralized on the Monad blockchain.

🎯 What is AION?

AION (AI Consensus On-chain Network) is a protocol where:

  1. Multiple LLMs analyze the same task independently
  2. AI Debate occurs between models to refine reasoning
  3. Weighted Voting produces final consensus decisions
  4. Reputation Tracking ensures quality over time
  5. On-chain Verification provides immutable proof

🏗️ Architecture

┌─────────────────────────────────────────────────────────────┐
│                        AION Protocol                        │
├─────────────────────────────────────────────────────────────┤
│  Frontend (Next.js)  ←→  Backend (Fastify)  ←→  Blockchain │
│         ↓                     ↓                    ↓        │
│  Real-time UI         Consensus Engine      Smart Contracts │
│  Task Creation        LLM Orchestration     Reputation      │
│  Live Debate View     WebSocket Events      Governance      │
└─────────────────────────────────────────────────────────────┘

🚀 Quick Start

# Clone repository
git clone https://github.com/YOUR_USERNAME/aion.git
cd aion

# Install dependencies
pnpm install

# Start infrastructure
docker-compose up -d

# Setup database
cd apps/backend && pnpm db:migrate && cd ../..

# Start development
pnpm dev

Access Points

📁 Project Structure

aion/
├── apps/
│   ├── web/          # Next.js 16 frontend (App Router)
│   ├── backend/      # Fastify API + WebSocket server
│   └── mcp-tool/     # MCP server for AI agent integration
├── packages/
│   ├── shared/       # Shared TypeScript types
│   └── contracts/    # Solidity smart contracts (Foundry)
└── docker-compose.yml

🔄 Consensus Flow

┌──────────┐    ┌──────────┐    ┌──────────┐    ┌──────────┐
│ ANALYSIS │ →  │  DEBATE  │ →  │  VOTING  │ →  │CONSENSUS │
└──────────┘    └──────────┘    └──────────┘    └──────────┘
     ↓               ↓               ↓               ↓
  Each LLM       LLMs discuss    Weighted by     Final decision
  analyzes       findings        reputation      + confidence
  independently  with peers      scores          score

🔧 Supported LLMs

AION uses OpenRouter for unified LLM access:

Provider Model Type
Anthropic Claude Sonnet 4 Paid
OpenAI GPT-4.1 Paid
Google Gemini 2.5 Pro Paid
DeepSeek R1 Paid
DeepSeek R1 0528 Free
StepFun Step 3.5 Flash Free
NVIDIA Nemotron Nano 9B Free

📡 API Endpoints

Tasks

POST /api/tasks          # Create new consensus task
GET  /api/tasks          # List all tasks
GET  /api/tasks/:id      # Get task with debate/votes

LLMs

GET  /api/llms           # List available models
GET  /api/llms/fetch     # Fetch models from OpenRouter

Stats

GET  /api/stats          # System statistics

WebSocket

WS   /ws                 # Real-time updates

🧪 Testing

# Backend tests
cd apps/backend && pnpm test

# Single test file
NODE_OPTIONS=--experimental-vm-modules npx jest tests/unit/services/openrouter.test.ts

# Frontend tests
cd apps/web && pnpm test

# Smart contract tests
cd packages/contracts && forge test -vvvv

📝 Environment Variables

Backend (apps/backend/.env)

DATABASE_URL="postgresql://postgres:password@localhost:5432/aion"
PRIVATE_KEY="your_wallet_private_key"
RPC_URL="https://monad-testnet.drpc.org"
OPENROUTER_API_KEY="your_openrouter_key"

Frontend (apps/web/.env.local)

NEXT_PUBLIC_API_URL="http://localhost:3001"

🔗 Links

📄 License

MIT License - see LICENSE for details.


AION - Where AI Minds Converge 🧠⚡

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors