An intelligent AI agent that analyzes social media sentiment from Twitter, Discord, and Telegram to provide crypto trading insights and recommendations. The agent fetches real-time data, performs sentiment analysis, detects alpha signals, and generates trade plans for various cryptocurrencies and memecoins.
- Multi-Platform Data Fetching: Collects data from Twitter, Discord, and Telegram
- Sentiment Analysis: Analyzes social media posts for bullish/bearish/neutral sentiment
- Alpha Signal Detection: Identifies potential trading opportunities and market signals
- Trade Planning: Generates buy/sell/hold recommendations based on sentiment analysis
- Dynamic Coin Support: Works with any cryptocurrency or memecoin
- Real-time Analysis: Continuously monitors social media for market-moving information
- AI-Powered Analysis: Uses advanced language models for sentiment detection
- Risk Assessment: Evaluates risk levels and potential impact of trading signals
- Engagement Scoring: Considers social media engagement metrics in analysis
- Keyword Detection: Identifies crypto-specific trading keywords and signals
- Modular Architecture: Easy to extend with new data sources and analysis methods
- Node.js (version 22 or higher)
- pnpm package manager
- Docker (optional, for containerized deployment)
- API Keys for social media platforms (see Configuration section)
-
Clone the repository
git clone <repository-url> cd eliza-starter
-
Install dependencies
pnpm install
-
Set up environment variables
cp .env.example .env # Edit .env with your API keys (see Configuration section)
-
Start the agent
pnpm start
-
Clone the repository
git clone <repository-url> cd eliza-starter
-
Configure environment variables
cp .env.example .env # Edit .env with your API keys
-
Run with Docker Compose
docker compose up
Create a .env
file in the project root with the following variables:
# Option 1: OpenAI (you already have this)
OPENAI_API_KEY=your_openai_api_key
# Option 2: Google Gemini (you already have this)
GOOGLE_GENERATIVE_AI_API_KEY=your_gemini_api_key
# Option 3: Together AI (free tier available)
TOGETHER_API_KEY=your_together_api_key
# Option 4: Ollama (local, completely free)
OLLAMA_SERVER_URL=http://localhost:11434
OLLAMA_MODEL=llama3.2
# Twitter (for fetching tweets)
TWITTER_USERNAME=your_twitter_username
TWITTER_PASSWORD=your_twitter_password
TWITTER_EMAIL=your_twitter_email
# Discord (for fetching messages)
DISCORD_APPLICATION_ID=your_discord_app_id
DISCORD_API_TOKEN=your_discord_bot_token
# Telegram (for fetching messages)
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
# BirdEye (Solana data)
BIRDEYE_API_KEY=your_birdeye_api_key
# Helius (Solana RPC)
HELIUS_API_KEY=your_helius_api_key
- Go to Discord Developer Portal
- Create a new application
- Go to "Bot" section and create a bot
- Copy the Application ID and Bot Token
- Message @BotFather on Telegram
- Use
/newbot
command - Follow instructions to create your bot
- Copy the bot token
- Ollama: Install locally with
curl -fsSL https://ollama.ai/install.sh | sh
- Together AI: Sign up at together.ai for free credits
- Google Gemini: You already have this configured
-
Start the agent
pnpm start
-
Interact with the agent
- The agent will start a chat interface
- Ask questions like: "What do you think about Bitcoin?"
- Request analysis: "Analyze sentiment for ETH"
# Use a specific character file
pnpm start --character=./characters/trading-bot.json
# Use multiple characters
pnpm start --characters="./characters/bot1.json,./characters/bot2.json"
# Build and run with custom environment
docker compose -f docker-compose-image.yaml up
You: What's the sentiment around Bitcoin right now?
TradeBot: let me analyze the current sentiment around Bitcoin. checking social media and market data...
You: ETH is going to moon!
TradeBot: strong bullish sentiment detected! generating trade plan...
You: Can you analyze these posts for trading signals?
TradeBot: analyzing multiple posts for trading signals...
- fetch_tweets: Fetches tweets for any cryptocurrency
- fetch_discord: Fetches Discord messages (stubbed, ready for API integration)
- fetch_telegram: Fetches Telegram messages (stubbed, ready for API integration)
- analyze_sentiment: Analyzes sentiment with crypto-specific keywords
- detect_alphas: Identifies alpha signals and trading opportunities
- plan_trade: Generates buy/sell/hold recommendations
- Bullish Keywords: pump, moon, bullish, buy, long, hodl, diamond hands, etc.
- Bearish Keywords: crash, rug, bearish, sell, short, dump, scam, etc.
- Engagement Scoring: Considers retweets, replies, likes, and quotes
- Confidence Scoring: Measures the strength of sentiment signals
- Technical Signals: breakout, support, resistance, volume spike
- Fundamental Signals: partnership, adoption, institutional, audit
- Social Signals: viral, trending, fomo, influencer, whale
- Risk Assessment: Evaluates scam, rug, manipulation signals
If you encounter SQLite binding errors:
# Option 1: Use Docker (recommended)
docker compose up
# Option 2: Rebuild SQLite
pnpm rebuild better-sqlite3
# Option 3: Install system dependencies
sudo apt-get install -y python3 make g++ build-essential
- Ensure all required API keys are set in
.env
- Check API key permissions and rate limits
- Verify social media account credentials
- The agent runs on port 3000 by default
- If port 3000 is busy, it will automatically try port 3001
- You can set a custom port with
SERVER_PORT=3001
in.env
Run the test script to verify skills work independently:
node --loader ts-node/esm test-skills.js
eliza-starter/
├── src/
│ ├── skills/ # Trading analysis skills
│ │ ├── fetch_tweets.ts
│ │ ├── fetch_discord.ts
│ │ ├── fetch_telegram.ts
│ │ ├── analyze_sentiments.ts
│ │ ├── detect_alphas.ts
│ │ └── plan_trade.ts
│ ├── character.ts # Agent personality configuration
│ ├── index.ts # Main application entry point
│ └── ...
├── characters/ # Character configuration files
├── data/ # Database and cache files
├── docker-compose.yaml # Docker configuration
├── Dockerfile # Docker build instructions
└── .env # Environment variables
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
This AI agent is for educational and research purposes only. It should not be considered as financial advice. Always do your own research and consult with financial professionals before making trading decisions. Cryptocurrency trading involves significant risk and you can lose your entire investment.
If you encounter issues:
- Check the troubleshooting section above
- Review the logs for error messages
- Ensure all dependencies are properly installed
- Verify API keys and credentials are correct
For additional help, please open an issue in the repository.