A multi-agent AI prediction platform built on 0G Compute. Multiple specialized agents collaborate to research questions, reach consensus, and optionally execute on-chain actions.
Architecture & workflow (pitch + dev): see docs/WORKFLOW.md.
# Install dependencies
npm install
# Copy and configure environment
cp .env.example .env
# Edit .env with your 0G Compute and Telegram settings
# Start development
npm run devOpen http://localhost:5173 to access the dashboard.
npm run telegram:devThis starts everything in one terminal:
- Orchestrator API server
- ngrok tunnel (for local webhook)
- Telegram webhook registration
Press Ctrl+C to stop all services.
If you prefer manual control:
- Install ngrok: https://ngrok.com/download
- Set
TELEGRAM_BOT_TOKENandVITE_TELEGRAM_BOT_USERNAMEin.env - Start the orchestrator:
npm run dev - In another terminal:
ngrok http 3001 - Set webhook:
curl "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/setWebhook?url=https://YOUR-NGROK-URL/webhooks/telegram"
- Click "Connect Telegram" in the dashboard → copy the pairing code
- DM the code to your bot (@your_bot_username)
- Bot confirms connection, then you can:
- Send any prediction question
- Toggle agents on/off with inline buttons
- Choose workflow (Supervisor/Sequential)
- Run the swarm and get results
| Command | Description |
|---|---|
npm run dev |
Start orchestrator + frontend in watch mode |
npm run start |
Start HTTP API server only |
npm run telegram:dev |
Full local dev setup with ngrok + webhook |
npm run demo:btc |
Run BTC $100k prediction demo |
npm run demo:custom |
Run custom YAML agent demo |
npm run demo:eth-personas |
Three-ETH-persona demo |
| Variable | Description |
|---|---|
TELEGRAM_BOT_TOKEN |
Bot token from @BotFather |
VITE_TELEGRAM_BOT_USERNAME |
Bot username (without @) |
OG_COMPUTE_API_KEY |
0G Compute API key (or use wallet auth) |
OG_COMPUTE_WALLET_PRIVATE_KEY |
Wallet for SDK auth |
OG_CHAIN_RPC |
0G JSON-RPC URL |
PUBLIC_APPROVAL_BASE_URL |
For human approval webhooks |
See .env.example for the full list.
- Frontend: React + Vite dashboard for agent selection and results display
- Orchestrator: LangGraph-based multi-agent workflows (sequential or supervisor-routed)
- LLM Layer: 0G Compute for decentralized inference
- Consensus: Weighted voting across agent outputs → confidence score → action trigger
- Actions: Uniswap trades, HTTP calls, notifications
src/
├── agents/ # Agent definitions, runner, tools
├── orchestrator/ # LangGraph workflows
├── llm/ # 0G Compute client & discovery
├── consensus/ # Weighted voting algorithm
├── actions/ # Uniswap, HTTP, notify
├── telegram/ # Bot, pairing, sessions, conversations
├── data/ # Market data providers
└── index.ts # HTTP API server
frontend/src/
└── App.tsx # Dashboard UI
scripts/
└── telegram-dev.sh # One-command dev setup
MIT