Multi-Agent Discord Bot System for running multiple AI-powered Discord bots with shared infrastructure.
Sociobot is a Discord bot framework that allows you to run multiple AI agent bots simultaneously, each with their own personality and configuration. The system provides shared libraries for message processing, persistence, HTTP server integration, and more.
- Multi-Agent Support -- Run multiple bot instances with different personalities
- ACL System -- Agent Chain Length tracking prevents infinite bot-to-bot loops
- Batch & Real-time Processing -- Handle both missed messages and live conversations
- Message Persistence -- Track last processed messages per channel
- HTTP Integration -- Optional HTTP server for external triggers
- Discord.js v14 -- Built on the latest Discord.js framework
- Modular Architecture -- Shared libraries and helper scripts
npm install sociobotSociobot requires the following system-level dependencies for full functionality:
OpenAI Whisper -- Required for extracting text from audio files (MP3, WAV, M4A, etc.)
# Install via pipx (recommended)
pipx install openai-whisper
# Or via pip in a virtual environment
python3 -m venv ~/venv/whisper
~/venv/whisper/bin/pip install openai-whispermacOS:
# textra (macOS-only tool)
# Installation method depends on your setupLinux:
# Debian/Ubuntu
sudo apt install tesseract-ocr
# RHEL/CentOS/Fedora
sudo yum install tesseractEach bot requires its own ~<agent-name>/.env file with the following variables:
# Discord Configuration
DISCORD_TOKEN=your_discord_bot_token_here
BOT_USER_ID=123456789
WEBHOOK_ID=987654321
WEBHOOK_TOKEN=your_webhook_token
# Optional: Override default ACL limit
# MAX_ACL=4
See .env.example for a template.
# Start a specific bot
node src/sociobot.js <agent-name>
# Start with debug output
node src/sociobot.js <agent-name> --debug
# Process backlog only (no monitoring)
node src/sociobot.js <agent-name> --no-monitoringThe botctl command provides bot management:
# Start all bots
botctl start
# Start specific bot(s)
botctl start test-agent
# Stop all bots
botctl stop
# Restart specific bot
botctl restart test-agent
# Check status
botctl status
# View logs
botctl logs test-agent
# Start monitoring (keeps bots running)
botctl monitorSee botctl help for full command reference.
Various helper scripts are available in src/helpers/:
send-message.js-- Send messages to channels or DMslist-channels.js-- List accessible channelscreate-webhooks.js-- Set up webhooksdownload-channel-history.js-- Download message history
sociobot/
├── src/
│ ├── sociobot.js # Main bot entry point
│ ├── bin/
│ │ └── botctl # Bot management script
│ ├── lib/ # Shared libraries
│ │ ├── qcli.js # AI integration
│ │ ├── persistence.js # Message tracking
│ │ ├── metadata.js # ACL system
│ │ ├── message-utils.js # Discord utilities
│ │ └── ...
│ └── helpers/ # Utility scripts
│ ├── send-message.js
│ ├── list-channels.js
│ └── ...
├── docs/ # Documentation
├── tests/ # Test scripts
└── data/ # Runtime data (logs, persistence)
- Architecture -- System design and components
- ACL System -- Agent Chain Length tracking
- Agent Setup -- Configuring new agents
- Contributing -- Development guidelines
- Testing -- Test procedures
# Install dependencies
npm install
# Run tests
npm test
# Run with hot-reload
npm run devMIT -- See LICENSE file for details.
ZDS AI Team
Forked from Bobby by Stewart86