"What if your entire engineering team was AI β and never slept?"
Copilot Hive is an open-source framework for running 13 specialized GitHub Copilot CLI agents as an autonomous development team. They research ideas, implement features, audit code, deploy changes, and fix failures β all without human intervention, 24/7.
Architecture Β· Agents Β· Pipeline Β· Self-Healing Β· Get Started
Three layers work together:
| Layer | Agents | Purpose |
|---|---|---|
| π¬ Research | 6 read-only agents | Generate 780+ structured ideas per day |
| β‘ Pipeline | Developer β Auditor | Implement β Deploy β Verify β Audit β Loop |
| π‘οΈ Emergency | Fixer + Kuma + SmartThings | Monitor, self-heal, alert on failures |
This repo's actual interface is the Copilot Hive Project Manager in
dashboard.jsβ a dark-mode control panel for registering projects, checking agent status, launching runs, and reviewing setup logs.
From one screen you can wire up a repo, choose which agents should work on it, and watch the hive operate in real time.
The setup flow lets you register a local app or clone from GitHub, map health checks and containers, and choose exactly which Hive agents should be enabled for that project.
Each project gets its own control surface with configuration, per-agent run buttons, competitor discovery, and a live setup log for troubleshooting.
These are the only agents that touch the codebase. They chain through the event-driven pipeline.
| Agent | What It Does | Trigger | |
|---|---|---|---|
| π§ | Developer | Reads ALL idea files, implements the best ones, pushes to GitHub | Pipeline (continuous) |
| π | Auditor | Security audit, tests, bug fixes, code quality review | Pipeline (after Developer) |
| π | Emergency Fixer | Reads Docker logs + HTTP diagnostics, fixes critical issues | On failure (escalation) |
Read-only β they analyze the codebase and competitors, then write structured idea documents. Never modify code.
| Agent | Focus Area | Output | Schedule | |
|---|---|---|---|---|
| π¨ | Website Designer | Public site UX, animations, landing pages, mobile, conversions | 10 ideas | β±οΈ Every hour |
| π₯οΈ | Portal Designer | Dashboard, admin panel, charts, data viz, user settings | 10 ideas | β±οΈ Every hour |
| βοΈ | API Architect | API design, scanners, orchestration, performance, new tools | 10 ideas | β±οΈ Every hour |
| π₯ | Radical Visionary | Game-changers β competitor analysis, AI innovation, disruption | 5 transformative | β±οΈ Every 2h |
| βοΈ | Lawyer | Privacy policies, ToS, legal compliance, competitor legal | 5 ideas | β±οΈ Every 2h |
| π | Compliance | SOC2, PCI-DSS, HIPAA, ISO 27001 readiness | 5 ideas | β±οΈ Every 2h |
| Agent | What It Does | Schedule | |
|---|---|---|---|
| π§ | Reporter | Sends HTML email summaries of all agent activity | Daily + Weekly |
| π | Deployer | GitHub Actions β builds Docker images, deploys via SSH | On git push |
Research agents write structured markdown files to ideas/. The Developer reads all 6 files and picks the highest-impact ideas to implement:
ideas/web_design_latest.md ββ
ideas/portal_design_latest.md β
ideas/api_architect_latest.md ββββΆ π§ Developer picks best ideas
ideas/radical_latest.md β implements β pushes β deploys
ideas/lawyer_latest.md β
ideas/compliance_latest.md ββ
| Per Hour | 30 specialist ideas (10 web + 10 portal + 10 api) |
| Per 2 Hours | + 15 strategic ideas (5 radical + 5 lawyer + 5 compliance) |
| Per Day | ~780 total ideas feeding the Developer agent |
The Dispatcher (copilot-dispatcher.sh) runs every 60 seconds via cron and orchestrates the continuous Developer β Auditor loop:
| State | What's Happening |
|---|---|
| π€ Idle | Ready to launch next agent in the chain |
| π§ Running | Agent is actively working (PID tracked, monitored) |
| β³ Deploy | Code pushed β waiting for GitHub Actions + Docker deploy + version verification |
| π§ Fixing | Deploy failed β re-running the agent that broke it (2 retries before π escalation) |
07:01 π‘ Dispatcher β launches Developer
07:35 π§ Developer β implements 3 features from idea files
07:36 π§ Developer β stamps build-id, pushes to GitHub
07:37 π GitHub Actions β builds container, deploys via SSH
07:39 π‘ Dispatcher β calls /api/version β confirms NEW container is live β
07:39 π‘ Dispatcher β launches Auditor
08:05 π Auditor β finds 2 security issues, fixes them
08:06 π Auditor β stamps build-id, pushes to GitHub
08:08 π‘ Dispatcher β version verified β
β launches Developer
08:08 β»οΈ New cycle begins...
"Did the deploy actually work?" β Copilot Hive doesn't just check if a container is running. It verifies the exact version matches.
1. Agent stamps a unique build ID before committing:
BUILD_ID="$(date +%s)-$(openssl rand -hex 4)"
echo "$BUILD_ID" > .build-id
git add -A && git commit && git push2. App exposes it via API:
GET /api/version β {"build_id": "1740234567-a1b2c3d4", "status": "running"}3. Dispatcher verifies after deploy:
RUNNING=$(curl -s localhost:8080/api/version | jq -r '.build_id')
[ "$RUNNING" = "$EXPECTED" ] && echo "β
New container live" || echo "β³ Still deploying..."This prevents the next agent from working against stale code when a deploy fails silently.
When a deploy breaks, the system follows an intelligent escalation path β the agent that broke things gets first chance to fix it:
Key insight: The agent that pushed the bad code has the most context about what changed β it's the best candidate to fix it. Emergency Fixer is the last resort, armed with full diagnostics.
Uptime Kuma monitors all services with dashboards and history:
| Monitor | Type | Target | Interval |
|---|---|---|---|
| Website | HTTP | port 80 | 60s |
| API Health | HTTP | /health |
60s |
| API Version | HTTP | /api/version |
60s |
| External | HTTPS | your domain | 60s |
| Database | TCP | port 5432 | 60s |
| Web Container | Docker | container status | 60s |
| API Container | Docker | container status | 60s |
| DB Container | Docker | container status | 60s |
Alert threshold: 30 minutes β if a service is down for 30 consecutive checks, the webhook fires.
Uptime Kuma detects service DOWN for 30 min
β
βββ Is an agent already working on it? β Skip
βββ Cooldown active (10 min)? β Skip
β
βββ Write .alert-context.json (monitor, error, pipeline state)
βββ Launch π Emergency Fixer with full context
Agents send push notifications to your phone via Samsung SmartThings:
Agent fails β notify-smartthings.sh β Toggle CopilotAlert switch
β SmartThings Automation β Push notification to phone π±
Need something implemented right now? Submit an urgent idea to ideas/admin_ideas.json:
{ "title": "Add rate limiting", "urgent": true, "status": "pending" }Every agent checks for urgent ideas at startup. The very next agent to run β whether it's the Website Designer, Lawyer, or Compliance Officer β temporarily becomes a developer, implements the idea, pushes it, then returns to its normal role.
π₯ Radical Visionary β the most ambitious agent
YOUR MISSION: You are the VISIONARY β the most important research agent.
Unlike the 3 specialist agents who focus on incremental improvements,
YOUR job is to find the BIG IDEAS β the ones that make the platform
10x better overnight.
You provide exactly 5 ideas per run β each must be TRANSFORMATIVE:
π₯ Ideas that create massive visual impact β jaw-dropping dashboards
π₯ Ideas that leapfrog competitors β features nobody else has
π₯ Ideas that dramatically improve performance β 10x faster
π₯ Ideas that bring cutting-edge AI/ML in ways competitors haven't
QUALITY BAR: Each idea should be worth MORE than all 10 ideas
from any specialist agent combined. Think disruption, not polish.
π§ Developer β reads all ideas, implements the best
You are the DEVELOPER agent. Part of a thirteen-agent autonomous team.
Read the following idea files and implement the best improvements:
- ideas/web_design_latest.md (Website Designer β 10 ideas)
- ideas/portal_design_latest.md (Portal Designer β 10 ideas)
- ideas/api_architect_latest.md (API Architect β 10 ideas)
- ideas/radical_latest.md (Radical Visionary β 5 game-changers)
- ideas/lawyer_latest.md (Lawyer β legal ideas)
- ideas/compliance_latest.md (Compliance β certification ideas)
Pick the highest-impact ideas and implement them. Use --yolo mode.
After implementation, stamp .build-id and push to GitHub.
π¬ Research agents β read-only enforcement
# Research agents use --deny-tool to prevent code modifications:
copilot --deny-tool "bash(git push*)" \
--deny-tool "bash(git commit*)" \
--deny-tool "bash(git add*)" \
--add-dir "/opt/yourproject:ro" # Read-only access# PIPELINE β every minute
* * * * * copilot-dispatcher.sh
# SPECIALISTS β every hour (10 ideas each)
0 * * * * copilot-designer-web.sh
5 * * * * copilot-designer-portal.sh
10 * * * * copilot-architect-api.sh
# VISIONARY + SUPPORT β every 2 hours
15 0,2,4,6,8,10,12,14,16,18,20,22 * * * copilot-radical.sh
20 0,2,4,6,8,10,12,14,16,18,20,22 * * * copilot-lawyer.sh
25 0,2,4,6,8,10,12,14,16,18,20,22 * * * copilot-compliance.sh
# REPORTER
0 18 * * * copilot-reporter.sh daily
0 18 * * 0 copilot-reporter.sh weekly| Platform | Status | Install Method | Scheduling |
|---|---|---|---|
| π§ Linux (Ubuntu, Debian, etc.) | β Full support | Native or Docker | cron |
| π macOS (Intel & Apple Silicon) | β Full support | Native or Docker Desktop | launchd |
| πͺ WSL 2 (Windows) | β Full support | Native (in WSL) or Docker Desktop | cron |
| π³ Docker Desktop | β Full support | docker compose up -d |
Built-in |
| π Raspberry Pi (ARM64) | β Full support | Native | cron |
Windows native is not supported β use WSL 2 or Docker Desktop instead.
All shell scripts use the built-in platform-detect.sh library for cross-platform compatibility:
- File locking:
flockon Linux/WSL,mkdir-based atomic lock on macOS - Hex encoding:
xxdβodβhexdumpfallback chain - File stats: OS-aware
statflags - Docker socket: Auto-detects Docker Desktop, Colima, Podman
- Scheduling: Installer auto-picks cron (Linux/WSL) or launchd (macOS)
curl -fsSL https://raw.githubusercontent.com/gil906/copilot-hive/main/install.sh | bashThe interactive installer will:
- β Check prerequisites (git, curl, python3, docker, Copilot CLI)
- π Clone the repo to
/opt/copilot-hive(or your preferred location) - βοΈ Walk you through project configuration (paths, containers, URLs)
- π Generate your
config.shwith all settings - β° Install the crontab with all agent schedules
- π You're ready β the hive starts working!
# 1. Clone
git clone https://github.com/gil906/copilot-hive.git /opt/copilot-hive
cd /opt/copilot-hive
# 2. Run installer
bash install.sh
# β or configure manually β
# 3. Edit config
cp .env.example .env # Add your tokens
nano config.sh # Set PROJECT_DIR, GH_REPO, container names
# 4. Add version endpoint to your app
# GET /api/version β {"build_id": "...", "status": "running"}
# 5. Install crontab
crontab crontab.example
# 6. Optional: Start health webhook
python3 health-webhook.py &git clone https://github.com/gil906/copilot-hive.git /opt/copilot-hive
cd /opt/copilot-hive
# Edit config
cp .env.example .env
nano config.sh # Set your project paths
# Start the hive
docker compose up -dnpm install -g @gil906/copilot-hive
copilot-hive list # List all agent prompts
copilot-hive show developer # View Developer agent prompt
copilot-hive init ./my-hive # Scaffold agent scripts# Dry-run mode β agents work but don't push to GitHub
./copilot-improve.sh --dry-run
./copilot-audit.sh --dry-run
# Pause all agents
touch /opt/copilot-hive/.agents-paused
# Resume
rm /opt/copilot-hive/.agents-paused- GitHub Copilot CLI β
copilotcommand - Docker + Docker Compose
- Git with credentials configured (
~/.git-credentials) - A Dockerized application with a
/api/versionhealth endpoint - Python 3 + Node.js (for webhook and CLI)
| What | How |
|---|---|
| Change project settings | Edit config.sh (single file) |
| Add research agents | Copy any copilot-designer-*.sh, change the prompt focus |
| Change idea counts | Edit "EXACTLY 10 ideas" in prompts/*.md |
| Adjust schedules | Edit crontab entries (crontab -e) |
| Change escalation | Set MAX_FIX_RETRIES in config.sh |
| Add notifications | Swap SmartThings for Slack/Discord/Telegram |
| Edit prompts | Modify files in prompts/ directory (loaded at runtime) |
| Test safely | Use --dry-run flag on any pipeline agent |
Full file reference
| File | Purpose |
|---|---|
copilot-dispatcher.sh |
π‘ Pipeline orchestrator (runs every 1 min) |
copilot-improve.sh |
π§ Developer agent |
copilot-audit.sh |
π Auditor agent |
copilot-emergencyfixer.sh |
π Emergency fixer with diagnostics |
copilot-designer-web.sh |
π¨ Website Designer (10 ideas/hour) |
copilot-designer-portal.sh |
π₯οΈ Portal Designer (10 ideas/hour) |
copilot-architect-api.sh |
βοΈ API Architect (10 ideas/hour) |
copilot-radical.sh |
π₯ Radical Visionary (5 game-changers/2h) |
copilot-lawyer.sh |
βοΈ Lawyer agent |
copilot-compliance.sh |
π Compliance agent |
copilot-reporter.sh |
π§ Email reporter |
copilot-deployer.sh |
π Deployment helper |
copilot-gitguardian.sh |
π Secret scanner |
copilot-regressiontest.sh |
π§ͺ Regression tester |
health-webhook.py |
π₯ Uptime Kuma β Emergency Fixer bridge |
notify-smartthings.sh |
π± Push notification sender |
Contributions welcome! Some ideas for extending the hive:
- π New agent types (Performance, Accessibility, i18n, SEO)
- οΏ½οΏ½ Web dashboard for agent status and idea management
- π Slack/Discord/Telegram notification integrations
- π³ Docker Compose for the entire hive infrastructure
- π Prometheus/Grafana metrics for agent analytics