Quick guide to get your multi-agent Discord infrastructure running.
- Node.js 20+
- Docker Desktop
- Discord account
- Anthropic API key (get from https://console.anthropic.com/)
For each agent you want to deploy, create a Discord bot:
- Backend - Senior Backend Engineer
- DevOps - Senior DevOps Engineer
- Frontend - Senior Frontend Engineer
- Go to https://discord.com/developers/applications
- Click "New Application"
- Name it (e.g., "Backend Engineer", "DevOps Engineer", "Frontend Engineer")
- Go to Bot section:
- Click "Add Bot"
- Click "Reset Token" and copy it (save for later!)
- Enable "Message Content Intent" under Privileged Gateway Intents
- Optional: Upload custom avatar, set status
- Go to OAuth2 → URL Generator:
- Select scopes:
bot - Select permissions:
- ✅ Read Messages/View Channels
- ✅ Send Messages
- ✅ Embed Links
- ✅ Read Message History
- Copy the generated URL
- Open URL in browser and invite to your server
- Select scopes:
Repeat for all 3 bots!
- Go to https://console.anthropic.com/
- Sign in or create account
- Go to API Keys section
- Create 3 separate API keys (one per agent)
- Or use the same key for all (simpler but less isolated)
cd backend
cp .env.example .envEdit .env file with your actual tokens:
# Agent Backend
BACKEND_API_KEY=sk-ant-api03-YOUR_ACTUAL_KEY_HERE
BACKEND_DISCORD_TOKEN=YOUR_ACTUAL_DISCORD_TOKEN_HERE
# Agent DevOps
DEVOPS_API_KEY=sk-ant-api03-YOUR_ACTUAL_KEY_HERE
DEVOPS_DISCORD_TOKEN=YOUR_ACTUAL_DISCORD_TOKEN_HERE
# Agent Frontend
FRONTEND_API_KEY=sk-ant-api03-YOUR_ACTUAL_KEY_HERE
FRONTEND_DISCORD_TOKEN=YOUR_ACTUAL_DISCORD_TOKEN_HEREImportant:
- Each
DISCORD_TOKENmust be different (from different Discord applications) - API keys can be the same or different (your choice)
- Don't commit the
.envfile to git (already in .gitignore)
# Backend
cd backend
npm install
# Dashboard (optional, if you want the web UI)
cd ../dashboard
npm installcd backend
docker-compose up --buildYou should see:
✅ agentbase-redis | Ready to accept connections
✅ agentbase-backend | Connected to Discord
✅ agentbase-devops | Connected to Discord
✅ agentbase-frontend | Connected to Discord
✅ agentbase-metrics | Metrics API running on port 3001
In your Discord server, you should now see the bots online!
Try mentioning them:
@Backend Help me design a REST API for a todo app
@DevOps Set up a CI/CD pipeline for my project
@Frontend Create a responsive navbar component
Or send them DMs directly!
The React dashboard provides real-time monitoring:
cd dashboard
npm run devOpen http://localhost:5173 to see:
- Agent status and metrics
- CPU/Memory usage
- Tasks completed
- Real-time activity logs
Problem:
The "BACKEND_API_KEY" variable is not set. Defaulting to a blank string.
Solution:
- Make sure you created
.envfile (not.env.example) - Check that
.envis in thebackend/directory - Verify tokens are on the correct lines (no extra spaces)
Problem: Bots are online but don't respond
Possible causes:
-
Message Content Intent not enabled
- Go to Discord Developer Portal → Your App → Bot
- Enable "Message Content Intent"
- Restart containers:
docker-compose restart
-
Bot not mentioned correctly
- Use
@BotName(not just typing the name) - Or send a DM directly to the bot
- Use
-
Check logs:
docker logs agentbase-backend docker logs agentbase-devops docker logs agentbase-frontend
Problem: Agents can't connect to Redis
Solution:
# Check if Redis is running
docker ps | grep redis
# If not, restart everything
docker-compose down
docker-compose up --buildProblem: Worried about Anthropic API costs
Tips:
- Each message costs ~$0.003 - $0.015 depending on length
- Estimated: $15-30/month for moderate usage (1000 messages/agent)
- Set billing limits in Anthropic Console
- Use Claude Haiku for cheaper option (modify agent code)
Edit the CLAUDE.md files:
backend/examples/dev-workforce/agent-backend/CLAUDE.mdbackend/examples/dev-workforce/agent-devops/CLAUDE.mdbackend/examples/dev-workforce/agent-frontend/CLAUDE.md
After editing, restart containers:
docker-compose restart- Create new directory in
backend/examples/dev-workforce/ - Add
CLAUDE.mdwith system prompt - Add credentials to
.env - Add service to
docker-compose.yml - Rebuild:
docker-compose up --build
See the main README.md for deployment options:
- Fly.io (recommended, ~$6/month)
- Railway
- AWS ECS
- Google Cloud Run
- Issues: https://github.com/anthropics/claude-code/issues
- Discord: Create your own server for testing
- Docs: Check the README.md files in each directory
You're all set! 🎉
Your AI agent workforce is ready to help in Discord!