A sophisticated multi-network IRC bot that provides AI-powered services including text generation, image generation, and audio processing. Built with Go and featuring a dual-GPU queue system, comprehensive state management, and modular architecture.
You can find the bot in use on popular IRC networks in the channel #birdnest. The main #birdnest channel is on efnet, however also on libera, rizon and a few other networks. It's free to use and so far compared to other online AI generation services for images, sounds or music - it has unlimited use and is less censored. Also as it's mostly ran from my local system here it's more private. The exception is when Google Gemini or OpenRouter services are used. Everything else runs off the airig which has a 2070 and 4090 dual GPU setup which is networked with wireguard.
While it is possible to run this yourself it may need some adjustments to how it works. Some parts are also incomplete and the full use of aibird is not properly documented.
The aibird also shares some other projects to make it functional.
- birdcheck - Birdcheck runs on the
airigand provides a basic api to check the online status, gpu information and voices for the!ttscommand. - birdhole - The File upload and gallery service, which
aibirduploads to for sharing the requested generations over IRC.
This bot is a mix of maual coding (70%) with autocomplete, and LLM agent assisted coding (30%).
- Multi-Network IRC Support - Connect to multiple IRC networks simultaneously
- AI-Powered Services - Text generation, image generation, and audio processing
- Dual GPU Queue System - Intelligent routing between RTX 4090 and RTX 2070
- Comprehensive State Management - Robust IRC state tracking and user management
- Security & Moderation - Flood protection, content filtering, and access control
- Graceful Shutdown - Proper cleanup and resource management
- Extensive Logging - Detailed logging for debugging and monitoring
The bot is built with a modular architecture featuring:
- Main Application (
main.go) - Entry point and orchestration - Configuration Management (
settings/) - TOML-based configuration - Dual Queue System (
queue/) - Intelligent GPU resource management - IRC State Management (
irc/state/) - Comprehensive IRC state tracking - Command System (
irc/commands/) - Permission-based command handling - Image Processing (
image/comfyui/) - Advanced image generation - Text Services (
text/) - Multiple AI text generation providers
- Go 1.23+ - Minimum Go version required
- GPU Support - NVIDIA GPUs for image generation (optional)
- IRC Networks - Access to IRC networks you want to connect to
- AI Services - API keys for text generation services (OpenRouter, Gemini, etc.)
-
Clone the repository
git clone https://github.com/yourusername/aibird.git cd aibird -
Install dependencies
go mod download
-
Build the application
go build -o aibird . -
Configure the bot
cp config.toml.example config.toml # Edit config.toml with your settings -
Run the bot
./aibird
The bot uses TOML configuration files:
config.toml- Main configuration filesettings/- Service-specific configuration files
[networks.freenode]
enabled = true
nick = "aibird"
user = "aibird"
name = "AI Bird Bot"
channels = [
{ name = "#test", ai = true, sd = true }
]
[aibird]
actionTrigger = "!"
floodThreshold = 5
floodIgnoreMinutes = 10aibird/
├── main.go # Application entry point
├── config.toml # Main configuration (gitignored)
├── settings/ # Configuration management
├── queue/ # Dual GPU queue system
├── irc/ # IRC client and state management
├── image/ # Image generation services
├── text/ # Text generation services
├── http/ # HTTP utilities
├── logger/ # Logging system
├── helpers/ # Utility functions
└── shared/ # Shared components
Each ComfyUi workflow must be placed in the comfyuiworkflows directory for aibird to reconize as a command. Each workflow must also have a special API group, and in the group contains a text node aibird_meta which has some TOML information on how the workflow is used and what arguments override what node widget values.
An example workflow is provided as sd-example.json.
# Build for current platform
go build -o aibird .
# Build for specific platform
GOOS=linux GOARCH=amd64 go build -o aibird .# Run all tests
go test ./...
# Run with coverage
go test -cover ./...
# Run specific package tests
go test ./queue# Run go vet
go vet ./...
# Format code
go fmt ./...
# Tidy dependencies
go mod tidyThe project includes comprehensive inline documentation and comments throughout the codebase. Key areas to explore:
- Main Application (
main.go) - Entry point with detailed comments - Configuration (
settings/) - Configuration management and validation - IRC System (
irc/) - IRC client, state management, and commands - Queue System (
queue/) - Dual GPU queue management - AI Services (
text/,image/) - Text and image generation services - Utilities (
helpers/,logger/) - Helper functions and logging
For detailed architecture information, check the inline comments and code structure.
The bot includes several security features:
- Input Validation - All user inputs are validated
- Access Control - Hierarchical permission system
- Content Filtering - Configurable content moderation
- Flood Protection - Rate limiting and abuse prevention
- Secure Configuration - Sensitive files excluded from git
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue on GitHub
- Review the inline code documentation
- Check the configuration examples
- Built with Go
- IRC client using girc
- Image generation via ComfyUI using Comfy2Go
- Configuration using TOML
AI Bird IRC Bot - Bringing AI to IRC since 2022! 🐦✨