Lux Docs
Lux Skills Reference

Lux AI - Decentralized AI Inference and Mining

AI proofs generated on the network can mint tokens on any teleport-supported network Lux, Hanzo, Zoo.

Overview

Lux AI is a decentralized AI compute network for mining AI tokens and running AI inference on the Lux Network. It provides an OpenAI-compatible chat API, coordinates GPU miners, generates AI proofs for Q-Chain attestation, and includes a Tauri-based desktop application for mining and chat.

AI proofs generated on the network can mint tokens on any teleport-supported network (Lux, Hanzo, Zoo).

Quick reference

ItemValue
Repogithub.com/luxfi/ai
Modulegithub.com/luxfi/ai
Go1.26.1
Binarylux-ai
Desktoplux-desktop (Tauri v2 + React + Vite)
Default Port9090
Branchmain
LicenseProprietary (Lux Industries)

Hard requirements

  1. ALWAYS use github.com/luxfi/* packages -- NEVER go-ethereum or luxfi
  2. NEVER use EWOQ keys -- generate fresh keys
  3. Desktop requires Rust (for Tauri), Node.js 20+, pnpm

Architecture

luxfi/ai
├── cmd/
│   └── lux-ai/          — Main node binary
├── pkg/
│   ├── aivm/            — AI virtual machine
│   ├── attestation/     — Q-Chain AI proof generation
│   ├── cc/              — Chat completion handler
│   ├── miner/           — Miner management and task distribution
│   └── rewards/         — Reward tracking and distribution
├── desktop/             — Tauri desktop app (React, TypeScript, Vite)
│   ├── src/             — React frontend
│   └── src-tauri/       — Rust backend (Tauri)
├── benchmarks/          — Performance benchmarks
└── docs/                — Documentation

One-file quickstart

Build and run the node

git clone https://github.com/luxfi/ai.git
cd ai

# Build
make build
# Output: bin/lux-ai

# Run
make run
# Or manually:
./bin/lux-ai -port 9090

Run the desktop app

cd desktop
pnpm install
pnpm tauri:dev     # Development mode
pnpm tauri:build   # Production build

API Reference

Chat Completion (OpenAI-compatible)

curl -X POST http://localhost:9090/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "zen-mini-0.5b",
    "messages": [
      {"role": "user", "content": "Hello!"}
    ]
  }'

List Models

curl http://localhost:9090/v1/models

Register Miner

curl -X POST http://localhost:9090/api/miners/register \
  -H "Content-Type: application/json" \
  -d '{
    "id": "miner-001",
    "wallet_address": "0x...",
    "endpoint": "http://localhost:8888",
    "gpu_enabled": true
  }'

Stats

curl http://localhost:9090/api/stats

Available Models

ModelParametersContextCapabilities
zen-coder-1.5b1.5B32KCode, Chat
zen-mini-0.5b0.5B8KChat
qwen3-8b8B128KChat, Code, Reasoning

Earnings Model

Miners earn AI coins for:

  • Inference Tasks: Variable rate based on model size and tokens
  • Uptime Bonus: 10% bonus for 99.9% uptime
  • Speed Bonus: 5% bonus for sub-100ms latency

AI proofs are attested on Q-Chain, then mintable on Lux, Hanzo, or Zoo networks via Teleport Bridge.

Docker

docker build -t luxfi/ai:latest .
docker run -p 9090:9090 -v ai-data:/data luxfi/ai:latest

Health check at http://localhost:9090/health.

Makefile Targets

TargetDescription
make buildBuild lux-ai binary
make build-desktopBuild Tauri desktop app
make runBuild and run node on port 9090
make dev-desktopRun desktop in dev mode
make testRun all Go tests
make fmtFormat Go code
make lintRun golangci-lint

Desktop Stack

ComponentTechnology
FrameworkTauri v2
FrontendReact 18, TypeScript 5, Vite 5
StylingTailwind CSS 3
Iconslucide-react
Buildpnpm tauri:build

Troubleshooting

IssueCauseSolution
Port 9090 in useAnother service on portlsof -i :9090 and kill, or use -port flag
Desktop build failsMissing Rust toolchainInstall Rust via rustup
No models availableNo miners registeredRegister a miner endpoint
API returns 404Wrong endpoint pathUse /v1/chat/completions (OpenAI-compatible)
  • lux/lux-node.md -- Core validator node (Q-Chain integration)
  • lux/lux-consensus.md -- Quasar consensus for AI proof attestation
  • lux/lux-crypto.md -- Cryptographic primitives used in attestation

On this page