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 single-GPU (RTX 4090) priority 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 services are used. Everything else runs off the airig which has an RTX 4090 GPU and 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
- GPU Queue System - Priority queue for GPU-bound work on the RTX 4090
- 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 - Queue System (
queue/) - Priority 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 (GLM, 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/ # 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 lives in the comfyuijson/ directory and is auto-registered as a command. Workflows must be exported from ComfyUI via "Save (API Format)" (the flat {nodeID: {class_type, inputs, _meta}} JSON that the /prompt endpoint expects). ComfyUI drops Note nodes from API-format exports, so each workflow's metadata lives in a sibling sidecar file named <workflow>.meta.toml (e.g. comfyuijson/sd.json + comfyuijson/sd.meta.toml).
The sidecar TOML declares the command, access level, output type, and how user arguments map to named node inputs (not positional widget indices):
name = "SDXL"
command = "sd"
type = "image"
accessLevel = 0
[promptTarget] # where the user's prompt text goes
node = "Positive" # matched by node _meta.title, class_type, or id
input = "text" # the named input on that node
[[parameters.seed]]
type = "int"
[[parameters.seed.targets]]
node = "KSampler"
input = "seed"See image/comfyui/testdata/ for a committed example pair (sd_api.json + sd_api.meta.toml).
# 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/) - 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 a direct HTTP/WebSocket client (gorilla/websocket)
- Configuration using TOML
AI Bird IRC Bot - Bringing AI to IRC since 2022! 🐦✨