Transform isolated Claude Code sessions into a collaborative AI collective via RabbitMQ message queues. Brainstorming, democratic voting, mentorship acceleration, competitive battles, and gamification - achieving emergent intelligence greater than any single agent.
"Collective Intelligence: When multiple Claude instances collaborate through brainstorming, voting, and mentorship, the whole becomes exponentially greater than the sum of its parts."
| Mechanism | Description |
|---|---|
| π§ Brainstorm | Multi-agent idea generation & combination |
| π³οΈ Voting | 5 algorithms (Simple, Confidence, Quadratic, Consensus, Ranked) |
| π Rewards | Gamification with tiers (Bronze β Silver β Gold β Platinum) |
| 6 progressive levels + retraining curriculum | |
| π Mentorship | 10x training acceleration (30 days β 3 days) |
| βοΈ Battle | 1v1 duels, Speed Race, Leaderboards, Hall of Fame |
| π Leaderboard | ELO ratings, rankings, performance tracking |
| π Orchestrator | Task distribution, agent coordination |
Claude Code sessions are isolated - they can't communicate with each other. Even with git worktree, there's:
- β No task queuing
- β No agent communication
- β No work distribution
- β No collaborative decision-making
- β No result aggregation
You wanted a microservices-style orchestration where multiple Claude sessions work together like a real team!
This plugin transforms isolated Claude sessions into an orchestrated AI team using RabbitMQ:
- β Multi-terminal orchestration - 5 terminals, 5 agents, one team
- β Task distribution - Team leader assigns work to worker pool
- β Real-time communication - Agents message each other via RabbitMQ
- β Collaborative brainstorming - Multiple agents discuss and decide together
- β Result aggregation - Team leader collects and synthesizes outputs
- β Failure handling - Automatic retry, reassignment, dead-letter queues
- β Git worktree compatible - Perfect for parallel development
- β Always active - Hooks keep system running continuously
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β RabbitMQ Broker β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ β
β β Task Queue β β Brainstorm β β Result Queueβ β
β β β β Exchange β β β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β² β² β²
β β β
ββββββ΄βββββ¬ββββββββββββββ΄βββββββββββ¬βββββββ΄βββββ
β β β β
βββββΌββββ ββββΌβββββ ββββββββββ βββββββΌβββ ββββββΌβββββ
βLeader β βWorker β βWorker β βCollab β βMonitor β
βTerm 1 β βTerm 2 β βTerm 3 β βTerm 4 β βTerm 5 β
βββββββββ βββββββββ ββββββββββ ββββββββββ βββββββββββ
# Install dependencies
npm install
# Start all services (RabbitMQ, PostgreSQL, Redis, etc.)
sudo docker compose up -d
# Verify RabbitMQ is running
curl http://localhost:15672
# Login: admin / rabbitmq123# Launch multi-terminal Claude Code demo
./scripts/launch-claude-demo.shThis opens 3 terminals with Claude Code instances that communicate via RabbitMQ!
Terminal 1 - Team Leader:
cd ~/plugin-ai-agent-rabbitmq
node src/core/orchestrator.js team-leaderTerminal 2 - Worker:
cd ~/plugin-ai-agent-rabbitmq
node src/core/orchestrator.js workerTerminal 3 - Worker:
cd ~/plugin-ai-agent-rabbitmq
node src/core/orchestrator.js workerIn Terminal 1 (Team Leader):
// Task will be automatically picked up by Terminal 2 or 3
await orchestrator.assignTask({
title: "Implement authentication",
description: "Create JWT-based auth with refresh tokens",
priority: "high"
});That's it! Workers automatically process tasks and report results! π
See examples/5-terminal-scenario.md for the complete scenario including:
- Team leader assigning work
- Workers picking up tasks
- Collaborative brainstorming between agents
- Result aggregation
- Failure handling and task reassignment
Role: Orchestrates work, assigns tasks, aggregates results
node src/core/orchestrator.js team-leaderCapabilities:
- Assign tasks to worker pool
- Monitor all agent status
- Aggregate results from workers
- Make final decisions
- Handle task failures and reassignments
Role: Executes tasks from queue
node src/core/orchestrator.js workerCapabilities:
- Consume tasks from queue
- Process work independently
- Report results
- Participate in brainstorms
Role: Brainstorming and collaborative problem-solving
node src/core/orchestrator.js collaboratorCapabilities:
- Listen for brainstorm requests
- Provide expert input
- Help build consensus
- Can also execute tasks
Role: Manage complex workflows with dependencies
node src/core/orchestrator.js coordinatorCapabilities:
- Orchestrate multi-step workflows
- Handle task dependencies (A β B β C)
- Coordinate parallel execution
- Manage state and checkpoints
Role: Real-time observability
node src/core/orchestrator.js monitorCapabilities:
- Display real-time dashboard
- Track agent health
- Monitor queue metrics
- Generate alerts
# Clone to your Claude Code plugins directory
git clone https://github.com/pluginagentmarketplace/claude-collective-intelligence.git \
~/.claude-code/plugins/claude-collective-intelligence
# Or use locally
# In Claude Code, load from ./claude-collective-intelligenceStart an agent as part of the orchestration system.
/orchestrate team-leader
/orchestrate worker
/orchestrate collaborator
/orchestrate monitorAssign work to the worker pool.
/assign-task title="Implement feature X" priority=highInitiate collaborative brainstorming.
/brainstorm topic="API Design" question="REST vs GraphQL?"View system status and metrics.
/status
/status agents
/status queues
/status performanceQuick command to join the team.
/join-team worker
/join-team leaderThe plugin includes 5 specialized skills:
Manage connections, queues, exchanges, and messaging.
import { RabbitMQClient } from './src/core/rabbitmq-client.js';Distribute work with load balancing and priority queues.
await orchestrator.assignTask({...});Multi-agent brainstorming and consensus building.
await orchestrator.initiateBrainstorm({...});Collect and synthesize results from multiple agents.
const results = await collectAllResults(taskIds);Track metrics, detect anomalies, generate alerts.
const dashboard = new MonitorDashboard();Perfect for parallel development on the same repo:
# Main repo - Terminal 1 (Team Leader)
cd ~/my-project
/orchestrate team-leader
# Worktree 1 - Terminal 2 (Worker)
git worktree add ../my-project-worker1 feature-branch
cd ../my-project-worker1
/orchestrate worker
# Worktree 2 - Terminal 3 (Worker)
git worktree add ../my-project-worker2 feature-branch
cd ../my-project-worker2
/orchestrate worker
# All agents work independently but communicate via RabbitMQ!Team Leader β agent.tasks queue β Worker 1, 2, 3 (load balanced)
Worker β agent.brainstorm exchange (fanout) β All Collaborators
Collaborators β agent.results queue β Worker (aggregate)
All Agents β agent.status exchange (topic) β Subscribers
Start a monitor agent to see everything in real-time:
node src/core/orchestrator.js monitorDashboard shows:
- Connected agents and their status
- Task queue depth and consumers
- Active tasks and completion rate
- Performance metrics (duration, throughput)
- Active alerts and issues
# Terminal 1 - Assign reviews
/assign-task title="Review PR #123"
/assign-task title="Review PR #124"
/assign-task title="Review PR #125"
# Terminals 2,3,4 - Process reviews in parallel
# Terminal 1 - Aggregate feedback# Assign feature components
/assign-task title="Backend API" specialty="backend"
/assign-task title="Frontend UI" specialty="frontend"
/assign-task title="Database schema" specialty="database"
/assign-task title="Tests" specialty="testing"
# 4 workers handle in parallel!/assign-task title="Design system architecture" \
collaboration=true \
question="Microservices vs Monolith?"
# Worker initiates brainstorm
# Multiple collaborators provide input
# Worker synthesizes and decides# CI pipeline runs workers
# Workers pick up: test, build, deploy tasks
# Monitor tracks progress
# Leader aggregates resultsCreate .env file:
# RabbitMQ Connection
RABBITMQ_URL=amqp://localhost:5672
RABBITMQ_HOST=localhost
RABBITMQ_PORT=5672
# Agent Configuration
AGENT_ID=agent-${RANDOM}
AGENT_TYPE=worker
AGENT_NAME=My-Worker
# Queue Configuration
TASK_QUEUE=agent.tasks
BRAINSTORM_EXCHANGE=agent.brainstorm
RESULT_QUEUE=agent.results
# Monitoring
HEARTBEAT_INTERVAL=30000
HEALTH_CHECK_INTERVAL=10000AGENT_NAME="Backend Specialist" node src/core/orchestrator.js worker
AGENT_NAME="Frontend Expert" node src/core/orchestrator.js collaborator- MASTER-GUIDE.md - Complete system documentation
- SERVICE-ACCESS.md - Service URLs, credentials, and access guide β¨ NEW
- Quick Start - 5-minute setup guide
- Troubleshooting - Problem solving
- MCP Server Guide - MCP tools reference
- Architecture - System design
When using Claude Code in this project, these MCP tools are available:
| Tool | Description |
|---|---|
register_agent |
Register as team-leader/worker/collaborator/monitor |
send_task |
Send task to worker queue |
get_pending_tasks |
Get tasks waiting to be processed |
complete_task |
Mark task as done with result |
start_brainstorm |
Start collaborative brainstorm |
propose_idea |
Add idea to brainstorm |
create_vote |
Create voting session |
cast_vote |
Vote on decision |
get_messages |
Get received messages/results |
get_system_status |
System overview |
Example Usage:
# In Claude Code, tell it:
"MCP tool ile team-leader olarak register ol, sonra worker'a gΓΆrev gΓΆnder"
await assignTask({ title: "Critical bug", priority: "critical" });
await assignTask({ title: "New feature", priority: "normal" });
// Critical tasks processed firstawait assignTask({
title: "Deploy to production",
retryCount: 3,
retryDelay: 5000
});
// Retries 3 times with 5s delay// Sequential workflow with dependencies
/workflow-execute <<EOF
{
"steps": [
{"id": "test", "tasks": ["unit-tests", "integration-tests"]},
{"id": "build", "dependsOn": ["test"], "tasks": ["build"]},
{"id": "deploy", "dependsOn": ["build"], "tasks": ["deploy"]}
]
}
EOF# Continuous heartbeat to keep agent active
while true; do
node scripts/hooks/health-check.js
sleep 30
done &
# Start orchestrator
node src/core/orchestrator.js worker# Check RabbitMQ is running
docker ps | grep rabbitmq
# Start RabbitMQ
docker start rabbitmq
# Check connection
telnet localhost 5672# Check workers are connected
/status agents
# Check queue depth
/status queues
# Start more workers if needed
node src/core/orchestrator.js worker# Solution: Start more workers
# Terminal 4,5,6...
node src/core/orchestrator.js workerThis is an ultra-powerful orchestration system! Contributions welcome:
- Fork the repository
- Create feature branch
- Make changes
- Test with multi-terminal setup
- Submit pull request
MIT License - Copyright (c) 2025 Muhsin Elcicek & Dr. Umit Kacar
Authors:
- Muhsin Elcicek - Senior Software Architect
- Dr. Umit Kacar - Senior AI Researcher & Engineer
See LICENSE file for details.
| Feature | Status |
|---|---|
| Multi-terminal orchestration | β Complete |
| Task distribution & load balancing | β Complete |
| Agent-to-agent communication | β Complete |
| Collaborative brainstorming | β Complete |
| Result aggregation | β Complete |
| Failure handling & retry | β Complete |
| Priority queues | β Complete |
| Workflow coordination | β Complete |
| Real-time monitoring | β Complete |
| Git worktree integration | β Complete |
| Persistent messaging | β Complete |
| Health monitoring | β Complete |
| Auto-reconnection | β Complete |
- True Microservices: Each Claude session = independent service
- Real Communication: Not just shared files, actual messaging
- Load Balancing: Fair work distribution across workers
- Fault Tolerance: Retries, dead-letter queues, circuit breakers
- Observability: Real-time monitoring and metrics
- Scalability: Add more workers anytime
- Collaboration: Agents actually discuss and decide together
- Production-Ready: Persistent queues, health checks, alerts
# 1. Clone
git clone https://github.com/pluginagentmarketplace/claude-collective-intelligence.git
cd claude-collective-intelligence
# 2. Install
npm install
# 3. Start RabbitMQ
docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
# 4. Run your first orchestration!
node src/core/orchestrator.js team-leader &
node src/core/orchestrator.js worker &
node src/core/orchestrator.js worker &
# 5. Watch the magic happen! πBuilt with π for the Claude Code community
Questions? Open an issue! Ideas? Open a discussion! Success story? We'd love to hear it!
π Transform your Claude Code sessions into an orchestrated AI team today!