Skip to content

screwyforcepush/claude-code-subagent-bus

Repository files navigation

πŸ§™β€β™‚οΈ Multi-Agent Orchestration for Claude Code

"Stay awhile and listen... Transform one Claude into an infinite swarm."

Run 10+ specialized agents in parallel. Build at the speed of thought.

The Ancient Knowledge

You've been using Claude Code like a single warrior. This system awakens the swarm:

  • Engineers building different modules simultaneously
  • Architects designing while others implement
  • Researchers gathering wisdom as code flows
  • Gatekeepers ensuring perfection in parallel
  • Recursive Orchestration: Infinite orchestrators managing infinite squads

Watch your legion work through the real-time dashboard. Feel the power.

Token Efficiency Mastery

Context-engineered for extended battles without bankruptcy:

  • Minimal context per agent (they share memory through SQLite)
  • File references, not contents (massive token savings)
  • From the Maker: I rarely hit my claude usage cap, even with 3-5 concurrent sessions running all day.

πŸš€ Quick Start

# 1. Clone this repo and start the system
./scripts/start-system.sh
# If this fails you probably need to bun install or whatever. Just ask claude code to sort it out.


# 2. Use it in your project
npx claude-comms # in your project root.
# or copy CLAUDE.md and .claude directory to your projects

# 3. Launch claude code in your project. --dangerously-skip-permissions if you like.

# 4. prompt claude to get cookin: /cook <what you want to build, requirements spec, etc>
"/cook make a dashboard that for the real time event stream but style it like the matrix and populate the matrix characters with the event stream data"

Level Up

  1. Observe http://localhost:5173/ ./scripts/restart-system.sh restarts everything and can clear the db

  2. Install perplexity mcp. it will make your claude code cap last 20% longer. I've used $5 in a month and I'm a HEAVY user. claude mcp add perplexity-ask -- env PERPLEXITY_API_KEY=pplx-xxxx npx -y server-perplexity-ask You can still be a wizzard without this, but its the difference between being Dumbledore and being Gandalf.

  3. In this project prompt claude with /learn My man Deckard Cain will teach you everything I know.

πŸ—οΈ Architecture Overview

Claude Agents β†’ Hook Scripts β†’ HTTP POST β†’ Bun Server β†’ SQLite β†’ WebSocket β†’ Vue Dashboard
                     ↓                          ↓
              Communication Hooks        Message Routing
                     ↓                          ↓
               Inter-Agent Messages      Subagent Registry

Tech Stack: Vue 3, Bun, TypeScript, SQLite, WebSocket, Python hooks

Agent Data Flow Animation

πŸ“¦ Core Components

Observability System

  • Hook Events: Pre/Post tool use, notifications, user prompts
  • Real-time Capture: SQLite storage with WebSocket broadcasting
  • Timeline View: Visual event stream with filtering and search

Multi-Agent Communication

  • Agent Registry: Automatic discovery and session tracking
  • Message Queue: Inter-agent messaging with read receipts
  • Dashboard Views: Live communication monitoring

Integration

  • Copy .claude directory to any project for instant observability
  • Configure settings.json with your project name
  • Start monitoring - no code changes required

πŸ› οΈ Quick Commands

Command Description
./scripts/start-system.sh Launch server and dashboard
./scripts/reset-system.sh Clean shutdown and reset
./scripts/test-system.sh System validation

πŸ“š Documentation Hub

Getting Started

Technical Reference

Multi-Agent Development

Archive

πŸ”Œ API Quick Reference

Core Endpoints

# Observability
POST /events              # Submit hook events
GET /events/recent        # Retrieve event timeline
WS /stream               # Real-time event stream

# Multi-Agent Communication  
POST /subagents/register  # Register new agent
POST /subagents/message   # Send inter-agent message
POST /subagents/unread    # Get unread messages

Hook Commands

# Send message between agents
uv run .claude/hooks/comms/send_message.py --sender "AgentName" --message "Hello"

# Check for unread messages
uv run .claude/hooks/comms/get_unread_messages.py --name "AgentName"

Full API Reference β†’

πŸ§ͺ Testing & Validation

# System validation
./scripts/test-system.sh

# Manual event test
curl -X POST http://localhost:4000/events \
  -H "Content-Type: application/json" \
  -d '{"source_app": "test", "session_id": "test-123", "hook_event_type": "PreToolUse"}'

# Multi-agent communication test
python3 .claude/hooks/comms/send_message.py --sender "Agent-Alpha" --message "Test message"

βš™οΈ System Requirements

Prerequisites

  • Claude Code - Anthropic's official CLI
  • Astral uv - Python package manager for hooks
  • Bun or npm/yarn - JavaScript runtime
  • API Keys - Anthropic (required), OpenAI/ElevenLabs (optional)

Environment Setup

# Copy environment template
cp .env.sample .env

# Configure API keys in .env
ANTHROPIC_API_KEY=your_key_here
OPENAI_API_KEY=optional_key
ELEVEN_API_KEY=optional_key

Server Ports

  • Server: localhost:4000 (HTTP/WebSocket)
  • Dashboard: localhost:5173 (Vite dev server)

πŸ“Š Key Features

Event Types Captured

Event Description Use Case
PreToolUse Before tool execution Validation & blocking
PostToolUse After tool completion Result tracking
UserPromptSubmit User prompt submission Session analysis
Notification User interactions UX monitoring
SubagentStop Agent completion Orchestration tracking

Dashboard Capabilities

  • Real-time Timeline: Live event stream with auto-scroll
  • Advanced Filtering: By app, session, event type, time range
  • Chat Transcripts: Full conversation history with AI summaries
  • Agent Communications: Live inter-agent message display
  • Visual Analytics: Pulse charts and session visualization

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Follow the Contributing Guide
  4. Submit a pull request

πŸ“„ License

MIT License - see LICENSE file for details.

πŸ™ Acknowledgments

  • Anthropic Claude Code Team - For the fantastic hooks system
  • Contributors - Community feedback and improvements
  • Open Source Dependencies - Vue, Bun, and ecosystem tools

For comprehensive documentation and advanced features, explore our complete guides.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •