"What if your entire engineering team was AI β and never slept?"
Copilot Hive is an open-source framework for running 11 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 |
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 an eleven-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- GitHub Copilot CLI (
copilotcommand) - Docker + Docker Compose
- A Dockerized application with a health endpoint
- Git credentials configured (
~/.git-credentials)
# 1. Clone
git clone https://github.com/yourusername/copilot-hive.git /opt/copilot-hive
cd /opt/copilot-hive
# 2. Configure
cp .env.example .env # Add your tokens
# Edit scripts: set PROJECT_DIR to your app's source code path
# 3. Add version endpoint to your app
# GET /api/version β {"build_id": "...", "status": "running"}
# 4. Install crontab
crontab crontab.example
# 5. Optional: Start monitoring
docker-compose -f monitoring.yml up -d| What | How |
|---|---|
| Add research agents | Copy any copilot-designer-*.sh, change the prompt focus |
| Change idea counts | Edit "EXACTLY 10 ideas" in prompts |
| Adjust schedules | Modify crontab entries |
| Change escalation | Edit MAX_FIX_RETRIES in dispatcher |
| Add notifications | Swap SmartThings for Slack/Discord/Telegram |
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