@vizzor/cli 0.11.0 → 0.12.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  <p align="center">
2
2
  <picture>
3
- <source media="(prefers-color-scheme: dark)" srcset="vizzor_lighticon.png">
4
- <source media="(prefers-color-scheme: light)" srcset="vizzor_icon.png">
5
- <img alt="Vizzor" src="vizzor_icon.png" width="120">
3
+ <source media="(prefers-color-scheme: dark)" srcset="vizzor_logoicon.png">
4
+ <source media="(prefers-color-scheme: light)" srcset="vizzor_logodarkicon.png">
5
+ <img alt="Vizzor" src="vizzor_logodarkicon.png" width="120">
6
6
  </picture>
7
7
  </p>
8
8
 
@@ -20,20 +20,19 @@
20
20
  </p>
21
21
 
22
22
  <p align="center">
23
- <a href="#what-vizzor-predicts">Predictions</a> &bull;
23
+ <a href="#requirements">Requirements</a> &bull;
24
24
  <a href="#installation">Install</a> &bull;
25
25
  <a href="#quick-start">Quick Start</a> &bull;
26
- <a href="#prediction-engine">Engine</a> &bull;
27
- <a href="#command-reference">Commands</a> &bull;
28
- <a href="#ai-tools">AI Tools</a> &bull;
29
- <a href="#data-sources">Data Sources</a> &bull;
26
+ <a href="#usage">Usage</a> &bull;
30
27
  <a href="#agents">Agents</a> &bull;
28
+ <a href="#web-dashboard">Dashboard</a> &bull;
29
+ <a href="#api-server">API</a> &bull;
31
30
  <a href="#configuration">Config</a>
32
31
  </p>
33
32
 
34
33
  ---
35
34
 
36
- Vizzor is a crypto market prediction engine. It pulls live data from 7 APIs, runs technical analysis on raw candles, reads derivatives positioning and market sentiment, then synthesizes price predictions with actual dollar targets across multiple timeframes -- from 5 minutes to 3 months.
35
+ Vizzor is a crypto market prediction engine. It pulls live data from 7+ APIs, runs technical analysis on raw candles, reads derivatives positioning and market sentiment, then synthesizes price predictions with actual dollar targets across multiple timeframes from 5 minutes to 3 months.
37
36
 
38
37
  Ask about any coin, token, or currency. Vizzor fetches real-time data, computes signals, and gives you a prediction with numbers, not opinions.
39
38
 
@@ -51,60 +50,79 @@ ETH at $2,112 | Bullish | Confidence: Medium-High
51
50
 
52
51
  ---
53
52
 
54
- ## What Vizzor Predicts
53
+ ## What It Does
54
+
55
+ **Any tradable crypto asset.** BTC, ETH, SOL, meme coins, new DEX launches, tokens by contract address — if it has a price, Vizzor can analyze it.
56
+
57
+ - **Price predictions** — bull/bear/likely targets across 9 timeframes (5m to 3 months)
58
+ - **ChronoVisor engine** — mathematical prediction system using Bayesian inference, certainty-factor algebra, first-order logic rules, and meta-reasoning with 6 independent signal sources
59
+ - **Microstructure analysis** — market structure, FVGs, VWAP, volume delta, liquidation map, order book depth, S/R zones, squeeze detection
60
+ - **Token security audits** — honeypot detection, tax analysis, mint/blacklist flags, rug pull indicators
61
+ - **On-chain forensics** — wallet analysis, whale tracking, holder concentration, token flow patterns
62
+ - **Blockchain fundamentals** — TVL, protocol revenue, developer activity, governance metrics, staking yields
63
+ - **Derivatives positioning** — funding rates, open interest, long/short ratios from Binance Futures
64
+ - **Prediction markets** — integrates Gamma protocol data for market-implied probabilities
65
+ - **Sentiment analysis** — Fear & Greed Index, news sentiment, buy/sell transaction ratios
66
+ - **Trending discovery** — what tokens are moving right now across DexScreener and CoinGecko
67
+ - **ICO tracking** — upcoming launches, fundraising rounds, investor data
68
+ - **Notifications & alerts** — price alerts, prediction tracking, interactive alerts panel with detail views
69
+ - **Autonomous agents** — set-and-forget trading agents with paper/live execution
70
+ - **DeFi protocols** — Aave V3, Lido integrations with health monitoring and yield orchestration
55
71
 
56
- **Any tradable crypto asset.** BTC, ETH, SOL, meme coins, new DEX launches, tokens by contract address -- if it has a price, Vizzor can analyze it.
57
-
58
- ### Price Predictions
59
-
60
- Every prediction includes dollar-value targets across all timeframes:
61
-
62
- | Timeframe | Use Case |
63
- |-----------|----------|
64
- | **5 min / 15 min** | Scalping, quick entries |
65
- | **1 hour / 4 hours** | Intraday trading |
66
- | **1 day / 7 days** | Swing trades |
67
- | **2 weeks / 1 month** | Position trades |
68
- | **3 months** | Macro outlook |
69
- | **Custom time** | "predict BTC at 16:00 today" |
70
-
71
- Each timeframe shows bullish, most likely, and bearish scenarios with percentage moves. Predictions include support/resistance levels, signal confidence, and what would invalidate the forecast.
72
-
73
- ### Market Intelligence
72
+ ---
74
73
 
75
- Beyond price targets, Vizzor provides:
74
+ ## Requirements
76
75
 
77
- - **Token security audits** -- honeypot detection, tax analysis, mint/blacklist flags, rug pull indicators
78
- - **On-chain forensics** -- wallet analysis, whale tracking, holder concentration, token flow patterns
79
- - **Derivatives positioning** -- funding rates, open interest, long/short ratios from Binance Futures
80
- - **Sentiment analysis** -- Fear & Greed Index, news sentiment, buy/sell transaction ratios
81
- - **Trending discovery** -- what tokens are moving right now across DexScreener and CoinGecko
82
- - **ICO tracking** -- upcoming launches, fundraising rounds, investor data from DeFiLlama
76
+ ### Hardware
83
77
 
84
- ---
78
+ | Component | Minimum | Recommended |
79
+ |-----------|---------|-------------|
80
+ | **CPU** | 2 cores | 4+ cores |
81
+ | **RAM** | 2 GB | 4+ GB (8 GB if running ML sidecar) |
82
+ | **Disk** | 500 MB | 2 GB (includes SQLite cache + ML models) |
83
+ | **Network** | Stable internet | Low latency to Binance/CoinGecko APIs |
84
+ | **GPU** | Not required | Not required (ML models are CPU-based) |
85
85
 
86
- ## Requirements
86
+ ### Software
87
87
 
88
88
  | Dependency | Version | Notes |
89
89
  |------------|---------|-------|
90
90
  | **Node.js** | >= 20.0.0 | ES2022 target, ESM modules |
91
- | **pnpm** | >= 8.0 | Recommended (npm/yarn also work) |
91
+ | **pnpm** | >= 8.0 | Recommended package manager (npm/yarn also work) |
92
92
  | **Python** | 3.x | Required by `better-sqlite3` native build |
93
93
  | **C++ compiler** | GCC / Clang / MSVC | Required by `better-sqlite3` native build |
94
- | **Docker** | >= 24 | Optional, for ML sidecar + PostgreSQL |
94
+ | **Docker** | >= 24 | Optional for ML sidecar, PostgreSQL, web dashboard |
95
95
 
96
- Works on **macOS**, **Linux**, and **Windows**. No GPU required.
96
+ Works on **macOS**, **Linux**, and **Windows**.
97
+
98
+ ### API Keys
99
+
100
+ | Key | Required | Free Tier | Purpose |
101
+ |-----|----------|-----------|---------|
102
+ | `ANTHROPIC_API_KEY` | Yes (or use Ollama) | Pay-per-use | Claude AI — best prediction quality |
103
+ | `ETHERSCAN_API_KEY` | Recommended | Yes | Transaction history, contract source |
104
+ | `OPENAI_API_KEY` | No | Pay-per-use | GPT-4 as alternative provider |
105
+ | `GOOGLE_API_KEY` | No | Free tier | Gemini as alternative provider |
106
+ | `ALCHEMY_API_KEY` | No | Free tier | Premium RPC endpoints |
107
+ | `COINGECKO_API_KEY` | No | Free tier | Extended market data |
108
+ | `CRYPTOPANIC_API_KEY` | No | Free tier | News with sentiment |
109
+ | `DISCORD_TOKEN` | No | Free | Discord bot |
110
+ | `TELEGRAM_BOT_TOKEN` | No | Free | Telegram bot |
111
+
112
+ **No API key at all?** Use Ollama with a local model — fully offline predictions (lower quality but free).
97
113
 
98
114
  ---
99
115
 
100
116
  ## Installation
101
117
 
118
+ ### npm (recommended)
119
+
102
120
  ```bash
103
121
  npm install -g @vizzor/cli
104
122
  ```
105
123
 
106
124
  ```bash
107
- # Or run directly
125
+ # Or run directly without installing
108
126
  npx @vizzor/cli
109
127
  ```
110
128
 
@@ -121,88 +139,102 @@ pnpm link --global
121
139
  ### Docker (Full Stack)
122
140
 
123
141
  ```bash
124
- cp .env.example .env # Configure API keys
125
- docker compose up -d # Starts CLI + ML sidecar + PostgreSQL
142
+ cp .env.example .env # Configure API keys
143
+ docker compose up -d # Starts CLI + ML sidecar + PostgreSQL + Web Dashboard
126
144
  ```
127
145
 
128
146
  ---
129
147
 
130
148
  ## Quick Start
131
149
 
150
+ ### Option A: With Claude (best quality)
151
+
132
152
  ```bash
133
- # 1. Set your API key
134
- vizzor config set anthropicApiKey <your-key>
135
- # or: export ANTHROPIC_API_KEY=<your-key>
153
+ # 1. Set your Anthropic API key
154
+ vizzor config set anthropicApiKey sk-ant-...
155
+ # or: export ANTHROPIC_API_KEY=sk-ant-...
136
156
 
137
157
  # 2. Launch
138
158
  vizzor
139
159
  ```
140
160
 
141
- Then just ask:
161
+ ### Option B: With Ollama (free, local, offline)
162
+
163
+ ```bash
164
+ # 1. Install Ollama: https://ollama.ai
165
+ ollama pull llama3.2 # or qwen2.5:14b for better results
166
+
167
+ # 2. Configure Vizzor
168
+ vizzor config set ai.provider ollama
169
+ vizzor config set ai.model llama3.2
170
+
171
+ # 3. Launch
172
+ vizzor
173
+ ```
174
+
175
+ ### Option C: With OpenAI or Gemini
176
+
177
+ ```bash
178
+ vizzor config set ai.provider openai
179
+ vizzor config set openaiApiKey sk-...
180
+ # or
181
+ vizzor config set ai.provider gemini
182
+ vizzor config set googleApiKey AI...
183
+ ```
184
+
185
+ ### Start asking
142
186
 
143
187
  ```
144
188
  > predict BTC price next week
145
189
  > analyze $PEPE security and price outlook
146
190
  > what's trending in crypto right now
191
+ > full microstructure analysis for ETH
147
192
  > track wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
148
193
  > audit contract 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984
149
194
  ```
150
195
 
151
196
  ---
152
197
 
153
- ## Prediction Engine
154
-
155
- ### Multi-Signal Composite
156
-
157
- Vizzor builds predictions from 5 weighted signal dimensions:
158
-
159
- ```
160
- Technical Analysis ........... 40% RSI, MACD, Bollinger, EMA, ATR, OBV
161
- Market Sentiment ............. 20% Fear & Greed, news sentiment, buy/sell ratio
162
- Derivatives Positioning ...... 20% Funding rate, open interest, long/short
163
- Trend Momentum ............... 15% 24h/7d price action, volume trends
164
- Macro Cycle ................... 5% Fear & Greed extremes as contrarian signals
165
- ----
166
- Composite Score -100 to +100
167
- ```
168
-
169
- Signals are computed from raw data before the AI sees them. The AI presents and contextualizes the pre-computed analysis -- it doesn't invent numbers.
170
-
171
- ### Technical Analysis
172
-
173
- Computed from Binance kline data. No third-party TA APIs -- pure math on raw candles.
174
-
175
- | Indicator | Signal |
176
- |-----------|--------|
177
- | **RSI** (14) | Overbought > 70, Oversold < 30 |
178
- | **MACD** (12, 26, 9) | Crossover direction + histogram momentum |
179
- | **Bollinger Bands** (20, 2) | %B position for squeeze/breakout |
180
- | **EMA Crossover** (12/26) | Golden cross / death cross |
181
- | **ATR** (14) | Volatility regime |
182
- | **OBV** | Volume-price confirmation |
183
-
184
- ### Volatility-Scaled Projections
198
+ ## Usage
185
199
 
186
- Price targets use `hourlyVol * sqrt(hours)` scaling -- wider ranges for longer timeframes, amplified for micro-cap/meme tokens. The engine automatically detects meme coins (Pump.fun, sub-$1M market cap) and applies higher volatility multipliers.
200
+ ### TUI (Terminal UI)
187
201
 
188
- ### Time-Aware Predictions
202
+ Launch with `vizzor`. Interactive chat with live price ticker, streaming responses, and slash commands.
189
203
 
190
- Ask for any specific time and Vizzor computes a targeted projection:
204
+ **Price Ticker:** Arrow keys to navigate, **Enter** to trigger AI prediction, **Tab** to toggle focus.
191
205
 
192
- ```
193
- > predict SOL at 3:00pm # specific clock time
194
- > predict ETH in 30 minutes # relative time
195
- > predict BTC tomorrow # next day
196
- > predict DOGE end of week # end of week
197
- ```
198
-
199
- ---
206
+ | Command | Description |
207
+ |---------|-------------|
208
+ | `/scan <address> [--chain <chain>]` | Token security + risk scan |
209
+ | `/track <wallet> [--chain <chain>]` | Wallet forensics |
210
+ | `/trends` | Trending tokens + top gainers/losers |
211
+ | `/audit <contract> [--chain <chain>]` | Smart contract audit |
212
+ | `/add <symbol>` | Add token to live price ticker (any source: Binance, CoinGecko, DEX) |
213
+ | `/remove <symbol>` | Remove token from ticker |
214
+ | `/alerts` | Interactive alerts panel — browse predictions, price alerts, notifications |
215
+ | `/alerts clear` | Mark all notifications as read |
216
+ | `/alerts hide` / `/alerts show` | Toggle alerts banner visibility |
217
+ | `/alerts purge [id\|all]` | Delete predictions, notifications, and alert rules |
218
+ | `/alerts delete <id\|all>` | Same as purge (alias) |
219
+ | `/chain [<id>]` | Show/switch chain |
220
+ | `/provider` | Show current AI provider |
221
+ | `/provider <name>` | Switch to `anthropic`, `openai`, `gemini`, `ollama` |
222
+ | `/agent create <name> [options]` | Create autonomous agent |
223
+ | `/agent list` | List agents |
224
+ | `/agent start <name>` | Start agent |
225
+ | `/agent stop <name>` | Stop agent |
226
+ | `/agent status <name>` | Agent status + decisions |
227
+ | `/agent wallet <name>` | Show agent wallet balance |
228
+ | `/agent trades <name>` | Show agent trade history |
229
+ | `/backtest` | Historical strategy backtest |
230
+ | `/config` | Show config |
231
+ | `/help` | Command reference |
200
232
 
201
- ## Command Reference
233
+ **Alerts Panel:** Type `/alerts` to open the interactive panel. Use **Up/Down** to navigate predictions and alerts, **Enter** to view full details (entry price, confidence, outcome, signal snapshot), **Escape** to close.
202
234
 
203
235
  ### CLI Commands
204
236
 
205
- ```
237
+ ```bash
206
238
  vizzor # Launch interactive TUI
207
239
  vizzor scan <token> [options] # Token risk analysis
208
240
  vizzor trends [options] # Market trends + top movers
@@ -215,362 +247,225 @@ vizzor config show # Show config
215
247
  vizzor wallet create|import|list|delete # Wallet management
216
248
  vizzor backtest [options] # Historical strategy backtest
217
249
  vizzor bot start [options] # Start Discord/Telegram bots
218
- vizzor bot validate # Check bot token configuration
250
+ vizzor api start [--port 3100] # Start REST API server
251
+ vizzor api key create "my-app" # Create API key
219
252
  ```
220
253
 
221
- ### TUI Slash Commands
222
-
223
- | Command | Description |
224
- |---------|-------------|
225
- | `/scan <address> [--chain <chain>]` | Token security + risk scan |
226
- | `/track <wallet> [--chain <chain>]` | Wallet forensics |
227
- | `/trends` | Trending tokens + top gainers/losers |
228
- | `/audit <contract> [--chain <chain>]` | Smart contract audit |
229
- | `/add <symbol>` | Add a token to the live price ticker |
230
- | `/remove <symbol>` | Remove a token from the price ticker |
231
- | `/chain [<id>]` | Show available chains or switch chain |
232
- | `/config` | Show config with setup guidance |
233
- | `/config set <key> <value>` | Update a config value |
234
- | `/provider` | Show current AI provider |
235
- | `/provider list` | List all providers with availability |
236
- | `/provider <name>` | Switch to `anthropic`, `openai`, `gemini`, `ollama` |
237
- | `/agent create <name> [options]` | Create autonomous prediction agent |
238
- | `/agent list` | List all agents |
239
- | `/agent start <name>` | Start agent cycle |
240
- | `/agent stop <name>` | Stop agent |
241
- | `/agent status <name>` | View status + recent decisions |
242
- | `/agent delete <name>` | Delete an agent |
243
- | `/agent strategies` | List available strategies |
244
- | `/backtest` | Run historical strategy backtest |
245
- | `/help` | Command reference |
246
- | `/clear` | Clear messages |
247
- | `/exit` | Quit |
248
-
249
- **Price Ticker:** Arrow keys to navigate, **Enter** to trigger full AI prediction for any token, **Tab** to toggle focus.
250
-
251
254
  ### Discord Bot
252
255
 
253
- | Command | Description |
254
- |---------|-------------|
255
- | `/scan <address>` | Token security + risk scan |
256
- | `/trends` | Trending tokens + market data |
257
- | `/track <wallet>` | Wallet forensics |
258
- | `/ico` | Upcoming launches and rounds |
259
- | `/audit <contract>` | Contract audit |
260
- | `/price <symbol>` | Live price check |
261
- | `/predict <symbol>` | AI prediction with signals |
262
- | `/wallet <address>` | ETH wallet balance |
263
- | `/agent_create` | Create a trading agent |
264
- | `/agent_list` | List all agents |
265
- | `/agent_start` | Start an agent |
266
- | `/agent_stop` | Stop an agent |
267
- | `/agent_status` | Agent status & decisions |
268
- | `/agent_delete` | Delete an agent |
269
- | `/help` | Show all commands |
270
- | *@mention* | AI-powered chat with live data |
271
-
272
- **Setup**: Enable the `MESSAGE_CONTENT` privileged intent in the [Discord Developer Portal](https://discord.com/developers/applications) for @mention AI chat.
273
-
274
- ### Telegram Bot
256
+ Requires `DISCORD_TOKEN`. Enable the `MESSAGE_CONTENT` privileged intent in the [Discord Developer Portal](https://discord.com/developers/applications).
275
257
 
276
258
  | Command | Description |
277
259
  |---------|-------------|
260
+ | `/predict <symbol>` | AI prediction with signals |
278
261
  | `/scan <address>` | Token security scan |
279
- | `/trends` | Trending tokens + gainers/losers |
262
+ | `/trends` | Trending tokens |
280
263
  | `/track <wallet>` | Wallet forensics |
281
- | `/ico` | Upcoming launches and rounds |
264
+ | `/price <symbol>` | Live price |
282
265
  | `/audit <contract>` | Contract audit |
283
- | `/price <symbol>` | Live price check |
284
- | `/predict <symbol>` | AI prediction with signals |
285
- | `/wallet <address>` | ETH wallet balance |
286
- | `/agent_create` | Create a trading agent |
287
- | `/agent_list` | List all agents |
288
- | `/agent_start` | Start an agent |
289
- | `/agent_stop` | Stop an agent |
290
- | `/agent_status` | Agent status & decisions |
291
- | `/agent_delete` | Delete an agent |
292
- | *Any text* | AI-powered chat with live data |
266
+ | `/ico` | Upcoming launches |
267
+ | `/agent_create` | Create agent |
268
+ | *@mention* | AI-powered chat |
293
269
 
294
- ---
270
+ ### Telegram Bot
295
271
 
296
- ## AI Tools
297
-
298
- Vizzor exposes **17+ tools** to the AI. During conversation, the AI autonomously calls whichever tools it needs to build a complete prediction.
299
-
300
- | Tool | What It Provides |
301
- |------|------------------|
302
- | `get_market_data` | Price, volume, market cap (CoinGecko) |
303
- | `search_token_dex` | Real-time DEX pair data (DexScreener) |
304
- | `get_technical_analysis` | RSI, MACD, Bollinger, EMA, ATR, OBV |
305
- | `get_prediction` | Multi-signal composite prediction |
306
- | `get_derivatives_data` | Funding rate, open interest (Binance Futures) |
307
- | `get_fear_greed` | Fear & Greed Index + 7-day history |
308
- | `get_crypto_news` | News headlines with sentiment scoring |
309
- | `get_trending` | Hot tokens across DexScreener + CoinGecko |
310
- | `get_token_info` | On-chain token data (name, supply, holders) |
311
- | `get_token_security` | GoPlus security scan (honeypot, taxes, flags) |
312
- | `analyze_wallet` | Wallet forensics (patterns, holdings, risk) |
313
- | `check_rug_indicators` | Rug pull detection suite |
314
- | `search_upcoming_icos` | ICO/IDO tracker with filters |
315
- | `get_raises` | Recent fundraising rounds |
316
- | `get_funding_history` | Project/investor funding history |
317
- | `create_agent` | Deploy autonomous prediction agent |
318
- | `list_agents` | List active agents |
319
- | `get_agent_status` | Agent status and decisions |
320
- | `run_backtest` | Historical strategy backtesting |
321
- | `get_ml_prediction` | ML model price prediction |
322
- | `get_ml_regime` | Market regime classification |
323
- | `get_ml_model_health` | ML sidecar health and model status |
324
- | `classify_user_intent` | AI-powered query intent detection |
325
-
326
- ### AI Providers
327
-
328
- | Provider | Model | Tool Support | Notes |
329
- |----------|-------|--------------|-------|
330
- | **Anthropic** | Claude Opus / Sonnet | Full tool-use | Default. Best prediction quality |
331
- | **OpenAI** | GPT-4 Turbo | Full tool-use | Function calling |
332
- | **Google** | Gemini Pro | Full tool-use | Tool-use support |
333
- | **Ollama** | Any local model | Context injection | Pre-computed signals injected into context |
334
-
335
- For providers without tool support (Ollama), Vizzor pre-fetches all relevant data, runs signal computation, and injects pre-written analysis directly into the context. The model presents the pre-computed predictions rather than generating them from scratch.
272
+ Requires `TELEGRAM_BOT_TOKEN`.
336
273
 
337
- ```bash
338
- /provider openai
339
- /provider ollama llama3
340
- ```
274
+ Same commands as Discord (`/predict`, `/scan`, `/trends`, `/track`, `/price`, `/audit`, `/ico`, `/agent_create`). Any text message triggers AI chat.
341
275
 
342
276
  ---
343
277
 
344
- ## Data Sources
345
-
346
- | Source | Data | Auth |
347
- |--------|------|------|
348
- | **Binance** | Klines, tickers, funding rates, open interest, gainers/losers | Public |
349
- | **DexScreener** | DEX pairs, trending tokens, real-time pricing | Public |
350
- | **GoPlus** | Token security, honeypot detection, holder analysis | Public |
351
- | **DeFiLlama** | TVL, fundraising rounds, protocol metrics | Public |
352
- | **CryptoPanic** | News aggregation with sentiment | Free tier |
353
- | **Fear & Greed** | Crypto Fear & Greed Index | Public |
354
- | **Pump.fun** | Solana meme coin launches | Public |
355
-
356
- All responses cached with configurable TTL (5 min for market data, 1 hour for token info, 24 hours for contract code).
357
-
358
- ### Database Layer
359
-
360
- Dual-backend storage with automatic migration:
361
-
362
- | Backend | Use Case |
363
- |---------|----------|
364
- | **SQLite** | Default, zero-config local cache |
365
- | **PostgreSQL** | Multi-instance deployments, Docker stack |
366
-
367
- Data pipeline collectors run on configurable intervals, aggregating market snapshots, token metrics, and wallet activity into time-series tables for ML training and trend analysis.
278
+ ## Agents
368
279
 
369
- ### ML Prediction Sidecar
280
+ Autonomous prediction agents that run a continuous **think → analyze → decide → act** cycle.
370
281
 
371
- A Python FastAPI sidecar enhances predictions with trained models:
282
+ ### Agent Requirements
372
283
 
373
- | Model | Algorithm | Purpose |
374
- |-------|-----------|---------|
375
- | **Price Predictor** | LSTM | Short-term price direction |
376
- | **Signal Classifier** | Random Forest | Buy/sell/hold signal quality |
377
- | **Anomaly Detector** | Isolation Forest | Unusual market activity |
378
- | **Rug Detector** | GBM | Scam token identification |
379
- | **Wallet Classifier** | LSTM | Wallet behavior profiling |
380
- | **Sentiment NLP** | DistilBERT | News headline sentiment |
284
+ | Requirement | Details |
285
+ |-------------|---------|
286
+ | **AI Provider** | Any (Claude recommended for best decisions) |
287
+ | **Wallet** | Required for live trading; not needed for paper trading or alert-only |
288
+ | **RPC Endpoint** | Required for live trading (default public RPCs or Alchemy) |
289
+ | **Minimum Balance** | Agent-specific; configurable spending limits |
290
+ | **Always-on Process** | Agent runs in a loop — needs a persistent process (terminal, tmux, Docker, etc.) |
381
291
 
382
- Models fall back to heuristic scoring when the sidecar is unavailable. Start with Docker:
292
+ ### Create and Run
383
293
 
384
294
  ```bash
385
- docker compose up ml-sidecar
386
- curl http://localhost:8000/health
387
- ```
295
+ # Create an agent
296
+ /agent create alpha --strategy momentum --pairs BTC,ETH,SOL --interval 60
388
297
 
389
- ### REST API
298
+ # Start it
299
+ /agent start alpha
390
300
 
391
- Authenticated REST API exposing all Vizzor capabilities programmatically:
301
+ # Check status
302
+ /agent status alpha
392
303
 
393
- ```bash
394
- # Start the API server
395
- vizzor api start --port 3100
396
-
397
- # Create an API key
398
- vizzor api key create "my-app"
399
-
400
- # Endpoints
401
- GET /health # Health check (public)
402
- GET /docs # OpenAPI/Swagger UI (dev only)
403
- POST /scan # Token security scan
404
- POST /trends # Market trends
405
- POST /track # Wallet forensics
406
- POST /predict # AI prediction
407
- POST /audit # Contract audit
408
- POST /v1/backtest # Historical backtest
409
- GET /v1/agents # List agents
410
- POST /v1/agents # Create agent
411
- POST /v1/agents/:name/start # Start agent
412
- POST /v1/agents/:name/stop # Stop agent
413
- GET /v1/portfolio/:id # Agent portfolio
304
+ # Stop it
305
+ /agent stop alpha
414
306
  ```
415
307
 
416
- All endpoints require `X-API-Key` header. Rate limited to 100 req/min per key. Keys are hashed with scrypt and stored locally.
308
+ ### Execution Modes
417
309
 
418
- ### Autonomous Agents v2
310
+ | Mode | Description | Wallet Required |
311
+ |------|-------------|-----------------|
312
+ | **Alert-only** | Generates signals, no trades | No |
313
+ | **Paper trading** | Simulated trades with realistic slippage model | No |
314
+ | **Live trading** | On-chain execution via DEX router | Yes |
419
315
 
420
- Portfolio-aware trading agents with risk management:
316
+ ### Strategies
421
317
 
422
- - **Portfolio Manager** tracks positions, calculates P&L, manages allocation limits
423
- - **Risk System** — Kelly criterion position sizing, ATR-based stop losses, drawdown limits
424
- - **ML-Adaptive Strategy** combines RSI, MACD, EMA, Bollinger, funding rate with ML regime detection
425
- - **Strategy Registry** pluggable strategy system, easy to add custom strategies
318
+ | Strategy | Signals | Best For |
319
+ |----------|---------|----------|
320
+ | **Momentum** | RSI + MACD + Bollinger + Funding | Short-term reversals |
321
+ | **Trend-Following** | EMA Crossover + OBV + Fear & Greed | Swing trades |
322
+ | **ML-Adaptive** | All TA + ML regime + ChronoVisor | Adaptive, all conditions |
323
+ | **ChronoVisor** | 6-signal Bayesian engine + FOL rules + meta-reasoning | Multi-timeframe predictions |
426
324
 
427
- ### Security & ZK
325
+ ### Safety Pipeline (Live Trading)
428
326
 
429
- - **AES-256-GCM encryption** for sensitive data at rest
430
- - **HMAC signatures** for API request integrity
431
- - **Audit logging** for security-critical operations
432
- - **ZK-proof chain adapters** for privacy-preserving verification
433
- - **Input sanitization** across all user-facing surfaces
327
+ Live trades pass through a 7-step pipeline before execution:
434
328
 
435
- ### n8n Workflow Automation
329
+ 1. **Validate** check parameters, balance, spending limits
330
+ 2. **Prepare** — build transaction with DEX router quote
331
+ 3. **Simulate** — `eth_call` dry run to detect reverts
332
+ 4. **Approve** — ERC-20 token approval if needed
333
+ 5. **Execute** — submit on-chain transaction
334
+ 6. **Record** — log to portfolio + audit trail
335
+ 7. **Cleanup** — update positions, trigger alerts
436
336
 
437
- 14 pre-built n8n workflows for automated operations:
337
+ Additional protections:
338
+ - Per-agent daily/weekly spending caps
339
+ - Kelly criterion position sizing
340
+ - ATR-based stop losses
341
+ - Max drawdown limits
342
+ - Global emergency kill switch (`/agent emergency-stop`)
438
343
 
439
- | Workflow | Function |
440
- |----------|----------|
441
- | Data Collection | Scheduled market data ingestion |
442
- | Alert Pipeline | Real-time anomaly alerts |
443
- | ML Retraining | Periodic model retraining |
444
- | Agent Monitor | Agent health and decision tracking |
445
- | Daily Report | Automated portfolio summaries |
446
- | Anomaly Analysis | Deep-dive unusual activity |
447
- | Narrative Generator | Market narrative detection |
448
- | Portfolio Rebalancer | Automated rebalancing signals |
449
- | Strategy Tournament | Strategy backtesting comparison |
450
- | Arbitrage Scanner | Cross-DEX price divergence |
344
+ ### Wallet Setup
451
345
 
452
346
  ```bash
453
- docker compose up -d # Starts Vizzor + ML sidecar + PostgreSQL + n8n + Web Dashboard
347
+ vizzor wallet create # Generate new encrypted wallet
348
+ vizzor wallet import # Import existing private key
349
+ vizzor wallet list # List managed wallets
454
350
  ```
455
351
 
456
- ### Extended ML Models
457
-
458
- v0.10 adds 7 new Python models to the sidecar:
352
+ Wallets are encrypted with AES-256-GCM (scrypt N=2^18) and stored at `~/.vizzor/wallets/`.
459
353
 
460
- | Model | Algorithm | Purpose |
461
- |-------|-----------|---------|
462
- | **Trend Scorer** | XGBoost | Market trend strength scoring |
463
- | **TA Interpreter** | Random Forest | Technical analysis signal weighting |
464
- | **Strategy Bandit** | Contextual Bandit | Adaptive strategy selection |
465
- | **Regime Detector** | HMM | Market regime classification |
466
- | **Project Risk** | GBM | Comprehensive project risk scoring |
467
- | **Portfolio Optimizer** | Mean-Variance | Dynamic position sizing |
468
- | **Intent Classifier** | DistilBERT | User query intent detection |
354
+ ### Backtesting
469
355
 
470
- All 13 models integrated across 14 TypeScript modules with graceful fallback to heuristics. v0.11 adds model training pipeline (`POST /train`, `POST /evaluate`) and wires remaining ML modules.
471
-
472
- ---
473
-
474
- ## Agents
475
-
476
- Autonomous prediction agents that run a continuous **think -> analyze -> decide -> act** cycle.
356
+ Test strategies against historical data before going live:
477
357
 
478
358
  ```bash
479
- /agent create alpha --strategy momentum --pairs BTC,ETH,SOL --interval 60
480
- /agent start alpha
481
- /agent status alpha
359
+ vizzor backtest --strategy momentum --pair BTCUSDT --from 2024-01-01 --to 2024-12-31
482
360
  ```
483
361
 
484
- ### Strategies
485
-
486
- | Strategy | Signals | Entry | Exit |
487
- |----------|---------|-------|------|
488
- | **Momentum** | RSI + MACD + Bollinger + Funding | RSI crosses above 30 + bullish MACD | RSI > 70 + bearish divergence |
489
- | **Trend-Following** | EMA Crossover + OBV + Fear & Greed | Golden cross + rising volume | Death cross |
490
- | **ML-Adaptive** | All TA + Funding + Fear & Greed + Regime | ML composite score > threshold | ML signal reversal + stop loss |
362
+ Metrics: total return, win rate, profit factor, Sharpe ratio, max drawdown, equity curve.
491
363
 
492
- > Agents can run in **alert-only mode** or with **live trade execution** via DEX integration.
364
+ ---
493
365
 
494
- ### Trade Execution (v0.11)
366
+ ## Web Dashboard
495
367
 
496
- On-chain trade execution with safety controls:
368
+ Next.js 15 dashboard at `http://localhost:3001`.
497
369
 
498
- - **Wallet Manager** — encrypted private key storage (AES-256-GCM + scrypt) at `~/.vizzor/wallets/`
499
- - **DEX Router** — Uniswap V3 SwapRouter02 integration for token swaps
500
- - **Slippage Protection** — configurable max slippage (default 0.5%)
501
- - **Dry-Run Mode** — simulate trades without executing (default: on)
502
- - **Gas Estimation** — automatic gas estimation with configurable multiplier
370
+ ### Setup
503
371
 
504
372
  ```bash
505
- vizzor wallet create # Create encrypted wallet
506
- vizzor wallet import # Import existing private key
507
- vizzor wallet list # List managed wallets
508
- ```
509
-
510
- ### Backtesting Engine (v0.11)
511
-
512
- Historical strategy simulation with walk-forward analysis:
373
+ # Option 1: Docker (recommended)
374
+ docker compose up web
513
375
 
514
- ```bash
515
- vizzor backtest --strategy momentum --pair BTCUSDT --from 2024-01-01 --to 2024-12-31
376
+ # Option 2: From source
377
+ cd web
378
+ pnpm install
379
+ pnpm dev
516
380
  ```
517
381
 
518
- - Run any strategy against historical kline data
519
- - Metrics: total return, win rate, profit factor, Sharpe ratio, max drawdown
520
- - Equity curve and drawdown visualization
521
- - Walk-forward analysis with rolling train/test windows
522
- - Available via CLI, TUI (`/backtest`), AI tool, and REST API (`POST /v1/backtest`)
382
+ Requires the API server running (`vizzor api start`).
523
383
 
524
- ### Real-time WebSocket Feeds (v0.11)
384
+ ### Pages
525
385
 
526
- Live market data via Binance WebSocket streams:
386
+ - **AI Chat** conversational interface with streaming, tool call progress, trade action cards, conversation persistence
387
+ - **Dashboard** — market overview, Fear & Greed, sentiment, regime, trending tokens, news, prediction accuracy tracker
388
+ - **Markets** — token analysis, wallet analyzer, on-chain intelligence
389
+ - **Agents** — create, monitor, start/stop agents with paper/live mode, portfolio chart, trade history
390
+ - **Portfolio** — positions, trade history, P&L metrics
391
+ - **Notifications** — real-time notification panel with prediction detail modals, price alert management, desktop push notifications
392
+ - **Settings** — API keys and provider configuration
527
393
 
528
- - Trade, kline, and ticker streams with auto-reconnect
529
- - Connection pooling (up to 5 connections, 1024 streams each)
530
- - In-memory price cache for instant access
531
- - Agent engine prefers WebSocket data over REST polling
394
+ ---
532
395
 
533
- ### Web Dashboard (v0.11)
396
+ ## API Server
534
397
 
535
- Next.js 15 web dashboard at `http://localhost:3001`:
398
+ REST API exposing all Vizzor capabilities programmatically.
536
399
 
537
- - **Dashboard** — market overview, ML status, agent summary
538
- - **Predictions** — candlestick charts with price predictions
539
- - **Agents** — create, start/stop, and monitor agents
540
- - **Portfolio** — positions, trade history, performance metrics
541
- - **Settings** — API configuration
400
+ ### Setup
542
401
 
543
402
  ```bash
544
- docker compose up web # Start dashboard on port 3001
403
+ vizzor api start --port 3100 # Start server
404
+ vizzor api key create "my-app" # Create API key
545
405
  ```
546
406
 
547
- ### Training Pipeline (v0.11)
407
+ All endpoints require `X-API-Key` header. Rate limited to 300 req/min per key.
548
408
 
549
- Model training and evaluation via the ML sidecar:
409
+ ### Endpoints
550
410
 
551
- - `POST /train` — train rug detector, trend scorer, regime classifier, sentiment models
552
- - `POST /evaluate` evaluate model accuracy on held-out test sets
553
- - Data loaders for PostgreSQL-backed labeled datasets
411
+ ```
412
+ GET /health # Health check (public)
413
+ GET /docs # Swagger UI
414
+ POST /v1/chat # AI chat (SSE streaming)
415
+ POST /v1/chat/thread # Threaded chat reply
416
+ GET /v1/conversations # List conversations
417
+ GET /v1/conversations/:id # Get conversation with messages
418
+ GET /v1/market/price/:symbol # Price
419
+ GET /v1/market/prices?symbols= # Batch prices
420
+ GET /v1/market/trending # Trending tokens
421
+ GET /v1/market/fear-greed # Fear & Greed Index
422
+ GET /v1/market/ml-health # ML sidecar status
423
+ GET /v1/market/trenches # Trenches scanner
424
+ GET /v1/chronovisor/:symbol # ChronoVisor prediction
425
+ GET /v1/chronovisor/predictions # List all predictions
426
+ GET /v1/chronovisor/accuracy # Prediction accuracy metrics
427
+ GET /v1/notifications # List notifications
428
+ GET /v1/notifications/:id # Get notification detail
429
+ POST /v1/notifications/mark-read # Mark all as read
430
+ DELETE /v1/notifications/:id # Delete notification
431
+ GET /v1/notifications/rules # List alert rules
432
+ POST /v1/notifications/rules # Create alert rule
433
+ DELETE /v1/notifications/rules/:id # Delete alert rule
434
+ POST /scan # Token security scan
435
+ POST /trends # Market trends
436
+ POST /track # Wallet forensics
437
+ POST /predict # AI prediction
438
+ POST /audit # Contract audit
439
+ POST /v1/backtest # Backtest
440
+ GET /v1/agents # List agents
441
+ POST /v1/agents # Create agent
442
+ POST /v1/agents/:name/start # Start agent
443
+ POST /v1/agents/:name/stop # Stop agent
444
+ GET /v1/agents/:name/wallet # Agent wallet balance
445
+ GET /v1/agents/:name/trades # Agent trade history
446
+ GET /v1/agents/:name/stats # Agent trade statistics
447
+ GET /v1/portfolio/:id # Portfolio
448
+ POST /v1/agents/emergency-stop # Global kill switch
449
+ WS /ws # WebSocket real-time push
450
+ ```
554
451
 
555
452
  ---
556
453
 
557
454
  ## Supported Chains
558
455
 
559
- | Chain | Status | Security Scan |
560
- |-------|--------|---------------|
561
- | Ethereum | Live | GoPlus |
562
- | Polygon | Live | GoPlus |
563
- | Arbitrum | Live | GoPlus |
564
- | Optimism | Live | GoPlus |
565
- | Base | Live | GoPlus |
566
- | BSC | Live | GoPlus |
567
- | Avalanche | Live | GoPlus |
568
- | Solana | Live | GoPlus |
569
- | Sui | Live | GoPlus |
570
- | Aptos | Live | GoPlus |
571
- | TON | Live | GoPlus |
572
-
573
- New chains are added by implementing the `ChainAdapter` interface.
456
+ | Chain | Status |
457
+ |-------|--------|
458
+ | Ethereum | Live |
459
+ | Polygon | Live |
460
+ | Arbitrum | Live |
461
+ | Optimism | Live |
462
+ | Base | Live |
463
+ | BSC | Live |
464
+ | Avalanche | Live |
465
+ | Solana | Live |
466
+ | Sui | Live |
467
+ | Aptos | Live |
468
+ | TON | Live |
574
469
 
575
470
  ---
576
471
 
@@ -578,27 +473,6 @@ New chains are added by implementing the `ChainAdapter` interface.
578
473
 
579
474
  Config at `~/.vizzor/config.yaml`. Environment variables override file values.
580
475
 
581
- ### Required
582
-
583
- | Variable | Purpose |
584
- |----------|---------|
585
- | `ANTHROPIC_API_KEY` | Claude AI -- primary prediction engine |
586
- | `ETHERSCAN_API_KEY` | Transaction history, contract source |
587
-
588
- ### Optional
589
-
590
- | Variable | Purpose |
591
- |----------|---------|
592
- | `OPENAI_API_KEY` | GPT-4 as alternative provider |
593
- | `GOOGLE_API_KEY` | Gemini as alternative provider |
594
- | `ALCHEMY_API_KEY` | Premium RPC endpoints |
595
- | `COINGECKO_API_KEY` | Extended market data |
596
- | `CRYPTOPANIC_API_KEY` | News with sentiment |
597
- | `DISCORD_TOKEN` | Discord bot |
598
- | `TELEGRAM_BOT_TOKEN` | Telegram bot |
599
-
600
- ### Full Config
601
-
602
476
  ```yaml
603
477
  anthropicApiKey: <your-key>
604
478
  etherscanApiKey: <your-key>
@@ -626,6 +500,37 @@ cacheTtl:
626
500
  contractCode: 86400
627
501
  ```
628
502
 
503
+ ### AI Provider Comparison
504
+
505
+ | Provider | Quality | Cost | Latency | Tool Support | Offline |
506
+ |----------|---------|------|---------|--------------|---------|
507
+ | **Anthropic** (Claude) | Best | Pay-per-use | ~2-5s | Full | No |
508
+ | **OpenAI** (GPT-4) | Great | Pay-per-use | ~2-5s | Full | No |
509
+ | **Google** (Gemini) | Good | Free tier | ~2-4s | Full | No |
510
+ | **Ollama** (local) | Varies | Free | ~5-30s | Context injection | Yes |
511
+
512
+ ---
513
+
514
+ ## ML Sidecar (Optional)
515
+
516
+ Python FastAPI sidecar with 16 trained models for enhanced predictions. Falls back to heuristics when unavailable.
517
+
518
+ ### Setup
519
+
520
+ ```bash
521
+ docker compose up ml-sidecar
522
+ curl http://localhost:8000/health
523
+ ```
524
+
525
+ ### Requirements
526
+
527
+ | Component | Minimum |
528
+ |-----------|---------|
529
+ | **RAM** | 4 GB (8 GB recommended) |
530
+ | **Disk** | 1 GB for models |
531
+ | **Python** | 3.10+ |
532
+ | **GPU** | Not required |
533
+
629
534
  ---
630
535
 
631
536
  ## Development
@@ -664,7 +569,7 @@ pnpm test:coverage # With coverage
664
569
 
665
570
  ## License
666
571
 
667
- [BUSL-1.1](LICENSE.md) -- Business Source License 1.1
572
+ [BUSL-1.1](LICENSE.md) Business Source License 1.1
668
573
 
669
574
  ---
670
575