Skip to content

thesumedh/Nexora

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Nexora

Nexora β€” AI-Powered Compute Orchestration

Intelligent GPU workload routing Β· Multi-provider marketplace Β· Visual workflow automation

GitHub Next.js 16 TypeScript Tailwind CSS Gemini AI Solidity MIT License

Nexora Landing Page


🎯 The Problem

The global GPU compute market is fragmented and inefficient:

Pain Point Impact
Fragmented Markets Pricing across Akash, Render, Lambda, io.net is inconsistent and impossible to compare at scale
No Intelligent Routing Manual provider selection wastes 40%+ on suboptimal pricing
Settlement Risk No transparent escrow or audit trail β€” trust is assumed, not verified
Complex Workflows Zero automation for recurring compute tasks and deployment pipelines

Enterprise teams sit on millions of dollars of idle H100s and A100s while developers globally struggle to access affordable compute.

πŸ’‘ The Solution

Nexora is an AI-powered compute orchestration platform that acts as an intelligent broker between compute demand and supply. Think of it as "Kayak for GPU compute" β€” powered by AI.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  User: "I need 4x A100 GPUs for training a LLaMA model"        β”‚
β”‚                          ↓                                       β”‚
β”‚  πŸ€– AI Agent: Analyzes requirements β†’ Queries providers          β”‚
β”‚                          ↓                                       β”‚
β”‚  πŸ“Š Comparison: Akash ($2.10/hr) vs io.net ($2.85/hr)           β”‚
β”‚                          ↓                                       β”‚
β”‚  πŸš€ Auto-Deploy: Best provider selected, SDL generated, live    β”‚
β”‚                          ↓                                       β”‚
β”‚  πŸ”’ Settlement: USDC escrow with full audit trail               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

How It Works

  1. Describe your workload in natural language (e.g., "Deploy a PyTorch training job with 2x RTX 4090")
  2. AI Agent analyzes your requirements β€” GPU type, memory, budget, region, compliance
  3. Automatic routing to the best provider with real-time pricing comparison
  4. One-click deployment with SDL manifest generation and container orchestration
  5. Secure settlement via smart contract escrow with full audit trail

✨ Key Features

Feature Description
πŸ€– AI Routing Agent Gemini 2.5-powered multi-step agent pipeline: analyze β†’ compare β†’ route β†’ deploy. Uses Google ADK with forced tool-calling for deterministic execution
πŸ“Š Real-Time GPU Dashboard Live GPU pricing, availability, utilization metrics, and provider health across 7+ networks
πŸ”„ Visual Workflow Builder Drag-and-drop automation pipelines with React Flow β€” chain triggers, logic, providers, and settlement nodes
🏠 Host Compute List your own GPU machines with region tagging, compliance controls, and availability scheduling
πŸ”’ Smart Contract Escrow Solidity USDC escrow with auto-release on service completion and refund capability
πŸ“‹ Immutable Audit Trail Full deployment history with on-chain transaction links and 0G Storage for reasoning logs
🌐 Multi-Provider Support Akash, Render, io.net, Spheron, Aethir, Nosana, Hyperspace, Gensyn β€” 137 normalized providers
🐳 Smart Docker Resolution Auto-resolves workload descriptions to optimal Docker images (PyTorch, TensorFlow, NGINX, PostgreSQL, etc.)

πŸ—οΈ Architecture

graph TB
    subgraph Client["πŸ–₯️ Next.js 16 Frontend"]
        LP["Landing Page"] --> DB["Dashboard"]
        DB --> AG["AI Agent Chat"]
        DB --> WF["Workflow Builder"]
        DB --> HP["Host Compute"]
        DB --> PR["Provider Explorer"]
        DB --> AL["Audit Log"]
    end

    subgraph Agent["πŸ€– AI Agent Layer (Google ADK)"]
        AG --> GEM["Gemini 2.5 Flash"]
        GEM --> |"Phase 1"| CP["compare_providers Tool"]
        GEM --> |"Phase 2"| RA["route_to_akash Tool"]
        GEM --> |"Phase 3"| LG["log_reasoning_to_0g Tool"]
        CP --> |"Score & Rank"| RA
    end

    subgraph Data["πŸ“Š Data Layer"]
        CP --> AF["Akash Fetcher (Live API)"]
        CP --> DF["Provider Database (137 nodes)"]
        RA --> SDL["SDL Generator"]
        SDL --> |"Manifest"| AK["Akash Network"]
    end

    subgraph Chain["πŸ”— Settlement Layer"]
        RA --> CR["ComputeRouter.sol"]
        CR --> ESC["USDCEscrow.sol"]
        ESC --> |"Release/Refund"| USDC["USDC Token"]
        LG --> ZG["0G Storage (DA)"]
    end

    style Client fill:#1e1b4b,stroke:#6366f1,color:#e0e7ff
    style Agent fill:#1e1b4b,stroke:#a855f7,color:#e0e7ff
    style Data fill:#1e1b4b,stroke:#06b6d4,color:#e0e7ff
    style Chain fill:#1e1b4b,stroke:#10b981,color:#e0e7ff
Loading

Agent Pipeline Deep Dive

sequenceDiagram
    participant U as User
    participant F as Frontend
    participant API as /api/route-job
    participant ADK as Google ADK Agent
    participant AK as Akash API

    U->>F: "Deploy PyTorch with 2x A100"
    F->>API: POST {description, requirements}
    API->>ADK: Create routing agent (Gemini 2.5)

    Note over ADK: Phase 1: Provider Comparison
    ADK->>AK: Fetch live providers
    AK-->>ADK: Provider list + pricing
    ADK->>ADK: Score & rank providers

    Note over ADK: Phase 2: Deployment
    ADK->>ADK: Generate SDL manifest
    ADK->>AK: Create deployment
    AK-->>ADK: Deployment ID + URIs

    ADK-->>API: Result + thinking steps
    API-->>F: Stream response
    F-->>U: Show result with deploy button
Loading

πŸ› οΈ Tech Stack

Layer Technology Purpose
Frontend Next.js 16, React 19, TypeScript App Router, Server Components, streaming
Styling Tailwind CSS v4, OKLCH Color Space Dark-first cyberpunk theme with design tokens
UI shadcn/ui (27 components), Framer Motion Radix Primitives, micro-animations
State Zustand, TanStack Query Client-side + server-side state management
AI Google ADK, Gemini 2.5 Flash Multi-step agentic pipeline with forced tool calling
Orchestration React Flow Visual workflow canvas with custom node types
Web3 wagmi v3, viem, MetaMask Wallet connection, contract interactions
Contracts Solidity 0.8.28, Hardhat, OpenZeppelin USDC escrow, job routing, access control
Storage 0G Storage Immutable reasoning log data availability

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ and npm
  • MetaMask browser extension (optional β€” for on-chain features)
  • Google AI Studio API Key (required for AI agent)

1. Clone & Install

git clone https://github.com/thesumedh/Nexora.git
cd Nexora/offchain
npm install

2. Configure Environment

cp .env.example .env.local

Edit .env.local:

# Required β€” Get yours at: https://aistudio.google.com/app/apikey
GOOGLE_AI_STUDIO_API_KEY=your_api_key_here

# Optional β€” For on-chain settlement
AGENT_PRIVATE_KEY=0x...

3. Launch

npm run dev
# β†’ http://localhost:3000

4. Smart Contracts (Optional)

cd ../hardhat
npm install
npx hardhat compile
npx hardhat test

πŸ“ Project Structure

Nexora/
β”œβ”€β”€ offchain/                     # Next.js 16 Application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/                  # App Router (25 routes)
β”‚   β”‚   β”‚   β”œβ”€β”€ page.tsx          # ✨ Landing page with animations
β”‚   β”‚   β”‚   β”œβ”€β”€ dashboard/        # πŸ“Š Real-time GPU dashboard
β”‚   β”‚   β”‚   β”œβ”€β”€ agent/            # πŸ€– AI chat + deploy interface
β”‚   β”‚   β”‚   β”œβ”€β”€ workflow/         # πŸ”„ Visual workflow builder
β”‚   β”‚   β”‚   β”œβ”€β”€ providers/        # 🌐 Provider marketplace
β”‚   β”‚   β”‚   β”œβ”€β”€ host/             # 🏠 Host compute listing
β”‚   β”‚   β”‚   β”œβ”€β”€ audit/            # πŸ“‹ Deployment audit log
β”‚   β”‚   β”‚   β”œβ”€β”€ verify-agent/     # πŸ§ͺ Agent router demo
β”‚   β”‚   β”‚   └── api/              # 9 API endpoints
β”‚   β”‚   β”œβ”€β”€ components/           # 50+ React components
β”‚   β”‚   β”‚   β”œβ”€β”€ ui/               # shadcn/ui (27 primitives)
β”‚   β”‚   β”‚   β”œβ”€β”€ layout/           # AppShell, Sidebar, Header
β”‚   β”‚   β”‚   β”œβ”€β”€ agent/            # DeployModal, PreflightChecklist
β”‚   β”‚   β”‚   β”œβ”€β”€ workflow/         # Canvas, CustomNodes, ConfigPanel
β”‚   β”‚   β”‚   └── host/             # FleetDashboard, ListingForm
β”‚   β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”‚   β”œβ”€β”€ agent/            # Google ADK agent + 4 tools
β”‚   β”‚   β”‚   β”œβ”€β”€ akash/            # SDL manifest generator
β”‚   β”‚   β”‚   β”œβ”€β”€ providers/        # Multi-provider fetchers
β”‚   β”‚   β”‚   β”œβ”€β”€ contracts/        # ABI + contract helpers
β”‚   β”‚   β”‚   └── 0g/               # 0G Storage client
β”‚   β”‚   β”œβ”€β”€ hooks/                # 4 custom hooks
β”‚   β”‚   └── context/              # MarketplaceContext
β”‚   └── public/                   # Static assets + logo
β”‚
└── hardhat/                      # Solidity Smart Contracts
    β”œβ”€β”€ contracts/
    β”‚   β”œβ”€β”€ ComputeRouter.sol     # Job submission & routing decisions
    β”‚   β”œβ”€β”€ USDCEscrow.sol        # USDC escrow (deposit/release/refund)
    β”‚   └── TestnetUSDC.sol       # Mock ERC-20 for testing
    β”œβ”€β”€ ignition/                 # Hardhat Ignition deploy modules
    └── test/                     # Contract test suite

πŸ”‘ API Endpoints

Endpoint Method Description
/api/route-job POST AI agent routing pipeline (main endpoint)
/api/providers GET Fetch all normalized providers
/api/compare-providers POST Compare provider pricing
/api/akash GET Live Akash network data
/api/deployments POST Create Akash deployment
/api/deployments/[id] GET Deployment status
/api/deployments/[id]/bids GET Deployment bids
/api/deployments/[id]/logs GET Container logs
/api/escrow POST Smart contract escrow operations
/api/agent-chat POST Streaming AI chat interface
/api/agent/payment POST Agent payment processing
/api/job-count GET On-chain job counter

πŸ§ͺ Running Tests

# Frontend build verification
cd offchain && npm run build

# Smart contract tests
cd hardhat && npx hardhat test

# Type checking
cd offchain && npx tsc --noEmit

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.


Built with ❀️ for the future of compute infrastructure

⭐ Star on GitHub Β· πŸ› Report Bug Β· πŸ’‘ Request Feature

About

AI-Powered Compute Orchestration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors