Releases: splinesreticulating/eggdrop-ai
v2.1.0
Eggdrop AI v2.1.0
What's New
Gemini 3 Flash Preview via OpenRouter BYOK
Production now runs on Google Gemini 3 Flash Preview using OpenRouter's Bring Your Own Key feature with a Google Studio API key. This provides a significantly more capable model at near-zero cost.
Configurable Bot Name
Bot nickname is now set via BOT_NAME environment variable and injected into the system prompt at startup. No more hardcoded names — deploy the same codebase for any bot.
Smarter Trigger: Any Nickname Mention
The bot now responds whenever its nickname appears anywhere in a message (e.g. "hey soonyo what's up?"), not just @botname or botname: prefixes. Uses string match for security (no regex injection).
Bug Fixes
- Fixed message duplication bug causing repetitive responses
- Fixed identity confusion where bot would refer to itself in third person
- Fixed bot incorrectly prefixing responses with usernames
Upgrade Notes
- Add
BOT_NAME=yournicktogateway/.env - For Gemini BYOK: add your Google Studio API key in OpenRouter settings, add ~$5 credit balance, set
MODEL=google/gemini-3-flash-preview
v2.0.0 - Vector Memory System
Eggdrop AI v2.0.0 - Vector Memory Release
🚀 Major Features
Vector Memory System
The bot now has a complete conversational memory using vector embeddings and semantic search:
- Full channel awareness: Stores ALL channel messages, not just direct mentions
- Semantic search: Finds relevant past messages using vector similarity (Xenova/all-MiniLM-L6-v2)
- Hybrid context: Combines recent messages + semantically similar messages
- Chronological ordering: Context presented in proper timeline for coherent recall
- Persistent storage: SQLite database with sqlite-vec extension for vector operations
- Configurable retention: Default 90-day message retention (configurable or unlimited)
New Endpoints
POST /store- Passive message storage without LLM response (used for all channel messages)POST /chat- Enhanced to retrieve context from vector memory before generating responses
How It Works
- All channel messages → stored in vector memory via
/storeendpoint - When mentioned → bot retrieves relevant context (recent + similar messages)
- LLM response → generated with full conversational awareness
- Bot remembers → facts, preferences, and conversations over time
🔧 Improvements
Performance & Reliability
- Increased API timeout: 30s → 90s (handles slow free tier models)
- Increased Eggdrop timeout: 45s → 100s
- Fixed message duplication in context (3x → 2x)
- Async message storage (doesn't block responses)
Configuration
New environment variables for vector memory:
MEMORY_ENABLED- Enable/disable memory system (default: true)MEMORY_DB_PATH- Database file pathMEMORY_TOP_K- Max similar messages to retrieve (default: 15)MEMORY_RECENT_COUNT- Recent messages to include (default: 5)MEMORY_RETENTION_DAYS- Message retention period (default: 90)DEBUG_LOG_REQUESTS- Log full context sent to LLM (for debugging)
Model Configuration
- Increased
max_tokens: 100 → 300 tokens - Updated production model:
xiaomi/mimo-v2-flash:free - System prompt improvements for memory usage
📦 Installation Notes
New Requirements
cd gateway
npm run setup # Downloads sqlite-vec extensionOn first run, the embedding model (~90MB) will be downloaded automatically. This takes 10-30 seconds and only happens once.
Upgrading from v1.0.0
-
Pull latest code:
git pull origin main
-
Install new dependencies:
cd gateway npm install npm run setup # Download sqlite-vec extension
-
Update Eggdrop script:
cp eggdrop/eggdrop-ai.tcl /path/to/eggdrop/scripts/
-
Rebuild and restart gateway:
npm run build npm start # or restart your systemd/pm2 service -
Rehash Eggdrop:
.rehash
Configuration Migration
The .env file has new optional variables. Your existing configuration will continue to work with defaults:
# Optional - vector memory is enabled by default
MEMORY_ENABLED=true
MEMORY_RETENTION_DAYS=90📝 Documentation Updates
- Comprehensive README updates explaining vector memory architecture
- Updated CLAUDE.md with implementation details
- New troubleshooting sections for memory-related issues
- Enhanced testing instructions
🐛 Bug Fixes
- Fixed TypeScript compilation error with Pipeline type
- Fixed message duplication causing 3x context repetition
- Improved error handling for memory system failures
- Better timeout handling for slow API responses
🔍 Example Usage
Teaching the bot facts:
<user> @bot my favorite color is crimson
<bot> Noted.
... many messages later ...
<user> @bot what's my favorite color?
<bot> Crimson.
Context-aware conversations:
<alice> I'm going to the store
<bob> Can you get milk?
<alice> @bot what did bob ask me to get?
<bot> Milk.
The bot now maintains full conversational context and can recall information from anywhere in the channel history.
⚠️ Breaking Changes
None - this is a backward-compatible release. The memory system is opt-in via environment variables.
📊 Performance Impact
- Storage: ~1-2KB per message (text + 384-dim vector embedding)
- Memory: ~90MB for embedding model (loaded once on startup)
- Response time: +10-50ms for context retrieval (negligible)
- Startup time: +10-30 seconds on first run (model download)
🙏 Credits
Built with:
- OpenRouter - LLM API aggregation
- transformers.js - Embedding model
- sqlite-vec - Vector similarity search
- better-sqlite3 - SQLite driver
Full Changelog: v1.0.0...v2.0.0
v1.0.0 - Production-Ready Release
Eggdrop AI v1.0.0
First production-ready release of Eggdrop AI - a minimal, security-hardened LLM-powered IRC bot using OpenRouter.
✨ Features
- LLM Integration: OpenRouter API support with configurable models
- Default Model:
qwen/qwen3-4b:free(fast, capable, and free) - Dynamic Triggers:
@botnameorbotname:- automatically uses your bot's nickname - Rate Limiting: Per-user 10-second cooldown to prevent abuse
- Production Ready: PM2 and systemd deployment examples included
🔒 Security
- Helmet middleware: Security headers enabled
- Input validation: Comprehensive validation of all user input
- Size limits: 10KB request body, 50KB response size limits
- Timeout protection: 30-second API timeout with AbortController
- IRC injection prevention: Control character sanitization
- Localhost binding: Gateway only accessible locally (127.0.0.1)
- Fail-fast validation: API key validated on startup
- No regex injection: Uses
string matchinstead of regex for security
📦 What's Included
- Gateway (152 lines TypeScript): Express server with helmet, validation, timeouts
- Eggdrop Script (127 lines Tcl): Rate-limited bot with sanitization and error handling
- Documentation: README.md, INSTALL.md, CLAUDE.md for complete setup guidance
🚀 Quick Start
# Clone and setup
git clone https://github.com/splinesreticulating/eggdrop-ai.git
cd eggdrop-ai/gateway
npm install
cp .env.example .env
# Add your OPENROUTER_API_KEY to .env
# Run gateway
npm start
# Install Eggdrop script
cp eggdrop/eggdrop-ai.tcl /path/to/eggdrop/scripts/
# Add "source scripts/eggdrop-ai.tcl" to eggdrop.conf
# .rehash in IRC📊 Performance
- Minimal dependencies (express, helmet, dotenv)
- Efficient Tcl implementation
- 100 token response limit (configurable)
- Concise, maintainable codebase
🔧 Configuration
All configuration via environment variables and Tcl script variables - no code changes needed for most use cases.
See README.md for full documentation.