Skip to content

Latest commit

 

History

History
192 lines (148 loc) · 6.12 KB

File metadata and controls

192 lines (148 loc) · 6.12 KB

SETUP.md — New Machine Setup Guide

How to get the Taolor Signal Agent running on a fresh machine.


Prerequisites

  • macOS with Python 3.11+
  • OpenClaw installed and running
  • Internet access

Step 1: Clone the Repo

git clone https://github.com/harvey-des/taolor-signal.git ~/agents/taolor-signal
cd ~/agents/taolor-signal

Step 2: Python Environment

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Step 3: Environment Variables

Create .env in the repo root:

# Taostats API (get from dash.taostats.io)
TAOSTATS_API_KEY=tao-6f44afbe-90ba-4dd7-ab7c-62847f38a716:5551bdfe

# Anthropic API key (for Stage 3 LLM synthesis)
ANTHROPIC_API_KEY=<your-key-here>

# Test mode (set to false for live runs)
TAOLOR_TEST_MODE=true

Step 4: Tool Authentication

bird CLI (X/Twitter) — REQUIRED

The signal agent uses bird to collect tweets from KOL accounts and search Bittensor mentions.

# Install bird (if not already installed)
npm install -g bird-cli   # or however bird is installed

# Authenticate — needs X account cookies
bird auth

Important: This should be authenticated as a dedicated account for monitoring (currently using @HarveyA72246418 — ideally switch to a Taolor-specific account).

Discord (Browser) — REQUIRED

Discord data is collected by scraping via OpenClaw's browser tool. The browser needs an active Discord login.

Setup:

  1. Open the OpenClaw browser (webchat or via browser tool)
  2. Navigate to https://discord.com
  3. Log in with the Discord account that has access to the Bittensor Discord server
  4. The session persists — you only need to do this once

Channels monitored:

  • Protocol: announcements, releases, general, rao, evm-bittensor
  • All 128+ subnet channels

Telegram (Telethon) — REQUIRED

Monitors alpha channels and subnet groups.

Setup:

cd ~/agents/taolor-signal
source venv/bin/activate
python collectors/telegram_auth.py

This will prompt for phone number and verification code. Credentials are already in config/telegram_credentials.json (API ID/hash). The session file is created on first auth.

GitHub — OPTIONAL

Uses GitHub API for commit tracking. Works without auth (rate-limited) or with gh CLI auth for higher limits.

# Install and auth GitHub CLI
brew install gh
gh auth login

Step 5: Test the Pipeline

cd ~/agents/taolor-signal
source venv/bin/activate

# Test with existing data first (skip collection)
./run.sh --skip-collect

# Then try a full run
./run.sh

Step 6: Set Up Cron

The pipeline should run every 6 hours automatically.

Via OpenClaw cron:

  • Schedule: every 6 hours (00:00, 06:00, 12:00, 18:00 UK time)
  • Task: Run the full pipeline and post results

Or via system crontab:

crontab -e
# Add:
0 */6 * * * cd ~/agents/taolor-signal && source venv/bin/activate && ./run.sh >> logs/cron.log 2>&1

What Each Data Source Provides

Source What It Gives Us Auth Needed
X/Twitter (bird) KOL tweets, mention volume, sentiment bird auth (cookies)
Discord (browser) Subnet announcements, community chatter, alpha Browser Discord login
Telegram (Telethon) Alpha channels, subnet groups, early signals Phone verification
GitHub (API) Commit activity, development signals Optional (gh auth)
subnet.ai (browser) All 128 subnet prices, volumes, emissions, mcap None (public)
Taostats (API) Staking, coldkeys, validators, whale transactions API key in .env

Troubleshooting

bird not found: Install via npm or check PATH Discord not collecting: Re-login in browser, check session isn't expired Telegram auth failed: Re-run telegram_auth.py, verify phone number No signals detected: Check data/ directory has fresh JSON files after collection LLM synthesis fails: Check ANTHROPIC_API_KEY in .env


File Structure After Setup

~/agents/taolor-signal/
├── .env                    # API keys (DO NOT COMMIT)
├── venv/                   # Python virtual environment
├── run.sh                  # Pipeline orchestrator
├── requirements.txt        # Python dependencies
├── SETUP.md                # This file
├── README.md               # Overview
├── ARCHITECTURE.md         # Full technical docs
├── collectors/             # Stage 1: Data collection
│   ├── social.py           # X/Twitter via bird
│   ├── telegram.py         # Telegram via Telethon
│   ├── telegram_auth.py    # One-time auth
│   ├── discord.py          # Discord via browser
│   ├── github.py           # GitHub API
│   ├── subnets.py          # subnet.ai scraper
│   └── taostats_api.py     # Taostats API
├── signals/                # Stage 2 & 3
│   ├── loader.py           # Data normalization
│   ├── detector.py         # Signal detection
│   ├── qual_detector.py    # Quality signals
│   ├── triggers.py         # Trigger detection
│   ├── run_detection.py    # Detection runner
│   └── output/             # Signal reports
├── monitors/               # Real-time monitors
│   └── realtime_taostats.py
├── output/                 # Formatted alerts
│   ├── post_alerts.py      # Slack/X posting
│   └── alerts/             # Alert history
├── config/                 # Configuration
│   ├── signal_config.json  # Detection thresholds
│   ├── discord_channels.json
│   └── telegram_credentials.json
├── data/                   # Raw collected data
│   ├── kol_watchlist.json  # 54 KOL accounts
│   ├── subnets_latest.json # All 128 subnets
│   ├── baselines.json      # Historical baselines
│   ├── social/             # Twitter data
│   ├── telegram/           # Telegram data
│   ├── discord/            # Discord snapshots
│   ├── onchain/            # On-chain data
│   └── taostats/           # Taostats data
└── logs/                   # Run logs