{"id":44216949,"url":"https://github.com/mrdushidush/agent-battle-command-center","last_synced_at":"2026-02-28T03:53:31.795Z","repository":{"id":337530303,"uuid":"1154047370","full_name":"mrdushidush/agent-battle-command-center","owner":"mrdushidush","description":"Cost-optimized AI agent orchestration with RTS nostalgia UI. Run 88% of coding tasks FREE on Ollama, with Claude handling the rest.","archived":false,"fork":false,"pushed_at":"2026-02-17T23:57:35.000Z","size":22517,"stargazers_count":20,"open_issues_count":47,"forks_count":5,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-18T00:09:08.359Z","etag":null,"topics":["ai-agents","claude","coding-agent","command-center","cost-optimization","developer-tools","docker","local-llm","ollama","qwen","retro-ui","self-hosted"],"latest_commit_sha":null,"homepage":"https://github.com/mrdushidush/agent-battle-command-center#-quick-start-docker-hub--recommended","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrdushidush.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-10T00:37:24.000Z","updated_at":"2026-02-17T23:57:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mrdushidush/agent-battle-command-center","commit_stats":null,"previous_names":["mrdushidush/agent-battle-command-center"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/mrdushidush/agent-battle-command-center","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdushidush%2Fagent-battle-command-center","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdushidush%2Fagent-battle-command-center/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdushidush%2Fagent-battle-command-center/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdushidush%2Fagent-battle-command-center/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrdushidush","download_url":"https://codeload.github.com/mrdushidush/agent-battle-command-center/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdushidush%2Fagent-battle-command-center/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29651964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T09:27:29.698Z","status":"ssl_error","status_checked_at":"2026-02-20T09:26:12.373Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","claude","coding-agent","command-center","cost-optimization","developer-tools","docker","local-llm","ollama","qwen","retro-ui","self-hosted"],"created_at":"2026-02-10T02:17:36.178Z","updated_at":"2026-02-28T03:53:31.782Z","avatar_url":"https://github.com/mrdushidush.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🎮 Agent Battle Command Center\n\n\u003e **Run 90% of coding tasks for FREE on a $300 GPU — including LRU caches and RPN calculators — with Claude handling the rest at ~$0.002/task average.**\n\nAn RTS-inspired control center for orchestrating AI coding agents with intelligent tiered routing. Watch your AI agents work in real-time with a retro strategy game-style interface.\n\n[![Strong MVP](https://img.shields.io/badge/status-Strong%20MVP%20(8.5%2F10)-brightgreen)](./MVP_ASSESSMENT.md)\n[![Docker Hub](https://img.shields.io/badge/Docker%20Hub-dushidush-blue?logo=docker)](https://hub.docker.com/u/dushidush)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Docker](https://img.shields.io/badge/docker-ready-blue.svg)](https://www.docker.com/)\n[![Tests](https://img.shields.io/badge/tests-27%20test%20files-success)](./packages/api/src/__tests__)\n[![Ollama Tested](https://img.shields.io/badge/Ollama%20C1--C9-90%25%20pass%20(16K%20ctx)-success)](./scripts/)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)\n\n**If you find this useful, [give it a star](https://github.com/mrdushidush/agent-battle-command-center/stargazers)** — it helps others discover this project and motivates development.\n\n### Quick Links\n\n[What Makes This Special](#-what-makes-this-special) · [Screenshots](#-screenshots) · [Quick Start (Docker Hub)](#-quick-start-docker-hub--recommended) · [Quick Start (Source)](#️-quick-start-build-from-source) · [Architecture](#️-architecture) · [Key Features](#-key-features) · [Configuration](#️-configuration) · [Usage](#-usage) · [Testing](#-testing) · [Troubleshooting](#-troubleshooting) · [Documentation](#-documentation) · [Development](#️-development) · [Contributing](#-contributing) · [Performance](#-performance--benchmarks) · [Roadmap](#️-roadmap)\n\n---\n\n## ✨ What Makes This Special\n\n**💰 Cost Optimization (20x cheaper than cloud-only)**\n- FREE local execution via Ollama (qwen2.5-coder:7b + custom 16K context Modelfile) for 90% of tasks\n- Smart tiered routing: only use paid Claude API for multi-class architectural tasks\n- **Proven:** 90% success rate on 40-task C1-C9 suite in just 11 minutes (Feb 2026)\n- Passes LRU Cache, RPN Calculator, Sorted Linked List, Stack — all FREE on local GPU\n\n**🎯 Academic Complexity Routing + Per-Agent Model Override**\n- Based on Campbell's Task Complexity Theory\n- Dual assessment: rule-based + Haiku AI semantic analysis\n- Automatic escalation: Ollama (1-8) → Sonnet (9-10) — Haiku eliminated from routing\n- **NEW: Per-agent model dropdown** — override Auto routing with Ollama/Grok/Haiku/Sonnet/Opus per agent\n\n**🎵 Bark TTS Military Radio Voice Lines**\n- 96 GPU-generated voice lines with military radio post-processing (static, squelch, crackle)\n- 3 voice packs: Tactical Ops, Mission Control, Field Command (32 lines each)\n- Generated locally with [Bark TTS](https://github.com/suno-ai/bark) (MIT) — $0 cost\n- Voice feedback for every agent action (\"Mission complete!\", \"Engaging target!\")\n\n**📊 Full Observability**\n- Every tool call logged with timing, tokens, and cost\n- Loop detection prevents infinite retries\n- Training data export for model fine-tuning\n\n---\n\n## 📸 Screenshots\n\n### Live Demo\n![Command Center in Action](docs/screenshots/CommandCenter1.gif)\n*The full command center running live — agent minimap, task queue, and real-time tool execution log.*\n\n### Main Command Center (Overseer Mode)\n![Command Center Overview](docs/screenshots/command-center-overview.png)\n*The main view showing task queue (bounty board), active missions strip, and real-time tool log with RTS-inspired aesthetic.*\n\n### Task Queue (Bounty Board)\n![Task Queue](docs/screenshots/task-queue.png)\n*Large task cards with complexity indicators, priority colors, and status badges. Click any task to view details and execution logs.*\n\n### Active Missions \u0026 Agent Health\n![Active Missions](docs/screenshots/active-missions.png)\n*Real-time agent status strip with health indicators (green=idle, amber=working, red=stuck). Shows current task and progress for each agent.*\n\n### Tool Log (Terminal Feed)\n![Tool Log](docs/screenshots/tool-log.png)\n*Live feed of every tool call with syntax highlighting. Expand entries to see full input/output, timing, and token usage.*\n\n### Dashboard \u0026 Analytics\n![Dashboard](docs/screenshots/dashboard.png)\n*Success rates by complexity, cost breakdown by model tier, agent comparison charts, and budget tracking.*\n\n### Cost Tracking\n![Cost Dashboard](docs/screenshots/cost-dashboard.png)\n*Real-time cost monitoring with daily budget limits, model tier breakdown, and token burn rate visualization.*\n\n---\n\n**UI Features:**\n- 🎮 RTS nostalgia-inspired design\n- 🎨 Teal/amber HUD colors with terminal-style panels\n- 🔊 Military voice feedback for agent actions (\"Acknowledged!\", \"Mission complete!\")\n- ⚡ Real-time WebSocket updates (no polling)\n- 📊 Live metrics and health indicators\n\n---\n\n## 🚀 Quick Start (Docker Hub — Recommended)\n\nPre-built images on Docker Hub. No cloning the full repo, no build step — just pull and run.\n\n### Prerequisites\n\n- **Docker Desktop** (with GPU support for Ollama)\n- **NVIDIA GPU** (recommended: 8GB+ VRAM for local models)\n  - *Or CPU-only mode (comment out the `deploy:` GPU block in the compose file)*\n- **Anthropic API key** (for Claude models — [get one here](https://console.anthropic.com))\n- **8GB+ RAM** (for Docker containers)\n\n### Installation\n\n1. **Download the files**\n   ```bash\n   mkdir agent-battle-command-center \u0026\u0026 cd agent-battle-command-center\n   mkdir -p scripts\n   curl -O https://raw.githubusercontent.com/mrdushidush/agent-battle-command-center/main/docker-compose.hub.yml\n   curl -O https://raw.githubusercontent.com/mrdushidush/agent-battle-command-center/main/.env.example\n   curl -o scripts/setup.sh https://raw.githubusercontent.com/mrdushidush/agent-battle-command-center/main/scripts/setup.sh\n   curl -o scripts/ollama-entrypoint.sh https://raw.githubusercontent.com/mrdushidush/agent-battle-command-center/main/scripts/ollama-entrypoint.sh\n   curl -o scripts/nginx-hub.conf https://raw.githubusercontent.com/mrdushidush/agent-battle-command-center/main/scripts/nginx-hub.conf\n   ```\n\n2. **Run setup** (auto-generates all keys, prompts for Anthropic key)\n   ```bash\n   bash scripts/setup.sh\n   ```\n   Or manually: `cp .env.example .env` and edit the `CHANGE_ME` values.\n\n3. **Start all services** (~30 seconds to pull images)\n   ```bash\n   docker compose -f docker-compose.hub.yml up\n   ```\n\n4. **Open the UI** → http://localhost:5173\n   - First startup downloads the Ollama model (~5 min one-time)\n\n5. **Verify health**\n   ```bash\n   docker ps                                    # All 6 containers running\n   docker exec abcc-ollama ollama list           # Should show qwen2.5-coder:32k\n   curl http://localhost:3001/health             # API healthy\n   ```\n\n---\n\n## 🛠️ Quick Start (Build from Source)\n\nFor contributors and developers who want to modify the code.\n\n### Prerequisites\n\n- **Docker Desktop** (with GPU support for Ollama)\n- **NVIDIA GPU** (recommended: 8GB+ VRAM for local models)\n  - *Or CPU-only mode (see [Configuration](#configuration))*\n- **Anthropic API key** (for Claude models)\n- **8GB+ RAM** (for Docker containers)\n\n### Installation\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/mrdushidush/agent-battle-command-center.git\n   cd agent-battle-command-center\n   ```\n\n2. **Run setup** (auto-generates all keys, prompts for Anthropic key)\n   ```bash\n   bash scripts/setup.sh\n   ```\n   Or manually: `cp .env.example .env` and edit the `CHANGE_ME` values.\n\n3. **Start all services** (first build takes ~5 minutes)\n   ```bash\n   docker compose up --build\n   ```\n   \u003e **No NVIDIA GPU?** Comment out the `deploy:` block in `docker-compose.yml` (lines 53-58) to run Ollama in CPU-only mode. It's slower but works.\n\n4. **Open the UI** → http://localhost:5173\n   - Ollama model download adds ~5 min on first startup\n\n5. **Verify health**\n   ```bash\n   # Check all services are running\n   docker ps\n\n   # Check Ollama model is loaded\n   docker exec abcc-ollama ollama list\n   # Should show: qwen2.5-coder:32k (custom 16K context model)\n   ```\n\n---\n\n## 🏗️ Architecture\n\n```\n┌─────────────────────────────────────────────────────────────────────┐\n│                          UI (React + Vite)                          │\n│                         localhost:5173                              │\n│  • Task queue (bounty board)  • Active missions  • Tool log        │\n│  • Dashboard  • Minimap  • Voice pack audio                        │\n└────────────────────────────┬────────────────────────────────────────┘\n                             │ HTTP/WebSocket (authenticated)\n┌────────────────────────────▼─────────────────────────────────────────┐\n│                    API (Express + Socket.IO)                         │\n│                         localhost:3001                               │\n│  • Task routing  • Cost tracking  • Budget service                  │\n│  • Rate limiting  • CORS protection  • File locking                 │\n└──────┬──────────────┬──────────────────────┬─────────────────────────┘\n       │              │                      │\n┌──────▼─────┐  ┌─────▼──────┐  ┌──────────▼────────────────────┐\n│ PostgreSQL │  │   Redis    │  │  Agents (FastAPI + CrewAI)    │\n│    :5432   │  │   :6379    │  │        localhost:8000         │\n│            │  │            │  │  • Coder (CodeX-7)            │\n│  • Tasks   │  │  • Cache   │  │  • QA (Haiku/Sonnet)          │\n│  • Logs    │  │  • MCP     │  │  • CTO (Opus - review only)   │\n│  • Reviews │  │            │  └───────────┬───────────────────┘\n└────────────┘  └────────────┘              │\n                                 ┌──────────▼──────────────────┐\n                                 │   Ollama (Local LLM)        │\n                                 │      localhost:11434        │\n                                 │  • qwen2.5-coder:32k        │\n                                 │    (7b + 16K ctx Modelfile) │\n                                 │  • RTX 3060 Ti 8GB VRAM     │\n                                 │  • 93% GPU / 7% CPU         │\n                                 │  • FREE execution           │\n                                 └─────────────────────────────┘\n```\n\n---\n\n## 🎯 Key Features\n\n### Tiered Task Routing + Per-Agent Model Selection (v0.7.0)\n- **Complexity 1-8** → Ollama (FREE, ~12s avg with 16K context) - 90-100% success rate\n- **Complexity 9** → Ollama for single-class tasks (80% — LRU Cache, Stack, RPN Calculator)\n- **Complexity 9-10** → Sonnet (~$0.01/task) - Multi-class architectural tasks only\n- **Decomposition** → Opus (~$0.02/task) - Breaking down complex tasks only\n- **Haiku eliminated** from execution routing — Ollama handles C7-C8 at 100%\n- **Per-agent model override** — sidebar dropdown to force any agent to use a specific model\n- **Grok (xAI) support** — set `XAI_API_KEY` to enable Grok as a model option\n\n### Real-Time Monitoring\n- **Active Missions** - Live agent status with health indicators\n- **Tool Log** - Terminal-style feed of every tool call\n- **Token Burn Rate** - Real-time cost tracking with budget warnings\n- **WebSocket Updates** - Instant UI updates for all events\n\n### Cost Controls\n- **Daily budget limits** with warnings at 80%\n- **Cost tracking** per task, agent, and model tier\n- **Tiered code reviews** (Haiku every 5th Ollama, Opus every 10th complex)\n- **Training data export** for future model fine-tuning\n\n### Parallel Execution\n- **Resource pools** - Ollama (1 slot) + Grok (2 slots) + Claude (2 slots)\n- **40-60% faster** for mixed-complexity batches\n- **File locking** prevents conflicts between parallel tasks\n\n### Error Recovery\n- **Stuck task detection** - Auto-recovery after 10 min timeout\n- **Loop detection** - Prevents agents from repeating failed actions\n- **Escalation system** - Ollama fails → Haiku retries with context → Human escalation\n\n### Security (MVP Hardened - Feb 2026)\n- ✅ API key authentication on all endpoints (except /health)\n- ✅ CORS restricted to configured origins with test coverage\n- ✅ HTTP rate limiting (100 req/min default, configurable)\n- ✅ All secrets externalized to .env (not in docker-compose.yml)\n- ✅ Trivy security scanning in CI/CD\n- ✅ Error boundaries prevent UI crashes\n- ✅ Input sanitization and SQL injection prevention via Prisma\n\n---\n\n## ⚙️ Configuration\n\n### Environment Variables\n\nAll configuration is in `.env`. See [.env.example](.env.example) for full list.\n\n**Essential:**\n```bash\n# API Authentication (REQUIRED)\nAPI_KEY=your_secure_api_key_here\n\n# Claude API (REQUIRED for complex tasks)\nANTHROPIC_API_KEY=sk-ant-api03-...\n\n# Database (REQUIRED)\nPOSTGRES_PASSWORD=your_secure_password\nDATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@localhost:5432/abcc?schema=public\n\n# Ollama Model (custom 16K context Modelfile, auto-created on startup)\nOLLAMA_MODEL=qwen2.5-coder:32k\n\n# Grok / xAI (OPTIONAL — enables Grok as a model option in agent dropdowns)\nXAI_API_KEY=xai-your_key_here\n```\n\n**Security:**\n```bash\n# CORS (comma-separated origins)\nCORS_ORIGINS=http://localhost:5173,https://your-domain.com\n\n# Rate Limiting\nRATE_LIMIT_MAX=100              # requests per minute\nRATE_LIMIT_WINDOW_MS=60000      # 1 minute window\n\n# JWT Secret\nJWT_SECRET=your_secure_jwt_secret_minimum_32_characters\n```\n\n**Cost Controls:**\n```bash\n# Budget Service\nBUDGET_DAILY_LIMIT_CENTS=500    # $5.00 daily limit\nBUDGET_WARNING_THRESHOLD=0.8    # Warn at 80%\n\n# Review Schedule\nOLLAMA_REVIEW_INTERVAL=5        # Haiku review every 5th Ollama task\nOPUS_REVIEW_INTERVAL=10         # Opus review every 10th complex task\n```\n\n**Ollama Optimization:**\n```bash\n# Rest delays between tasks (prevents context pollution)\nOLLAMA_REST_DELAY_MS=3000       # 3s between tasks\nOLLAMA_EXTENDED_REST_MS=8000    # 8s every Nth task\nOLLAMA_RESET_EVERY_N_TASKS=3    # Reset interval\n\n# Stuck task recovery\nSTUCK_TASK_TIMEOUT_MS=600000    # 10 minutes\nSTUCK_TASK_CHECK_INTERVAL_MS=60000  # Check every 1 minute\n```\n\n### GPU Configuration\n\n**Verify GPU access:**\n```bash\ndocker exec abcc-ollama nvidia-smi\n```\n\n**CPU-only mode** (slower, but works without GPU):\n```yaml\n# In docker-compose.yml, comment out GPU section:\n# deploy:\n#   resources:\n#     reservations:\n#       devices:\n#         - driver: nvidia\n#           count: all\n#           capabilities: [gpu]\n```\n\n---\n\n## 📖 Usage\n\n### Creating Tasks\n\n**Via UI:**\n1. Click \"New Task\" button\n2. Enter title and description\n3. (Optional) Select required agent type\n4. Submit - complexity is auto-calculated\n\n**Via API:**\n```bash\ncurl -X POST http://localhost:3001/api/tasks \\\n  -H \"X-API-Key: your_api_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"title\": \"Create user authentication\",\n    \"description\": \"Implement JWT-based auth with login/logout endpoints\",\n    \"type\": \"code\"\n  }'\n```\n\n### Monitoring Progress\n\n**Active Missions Panel:**\n- Shows currently executing tasks\n- Agent health (green=idle, amber=working, red=stuck)\n- Progress indicators\n\n**Tool Log Panel:**\n- Real-time feed of agent actions\n- Click to expand full details\n- Filter by agent or task\n\n**Dashboard:**\n- Success rates by agent and complexity\n- Cost breakdown by model tier\n- Daily/weekly/monthly metrics\n\n### Managing Agents\n\n**Pause/Resume:**\n```bash\ncurl -X POST http://localhost:3001/api/agents/qa-01/pause \\\n  -H \"X-API-Key: your_api_key\"\n```\n\n**Reset stuck agents:**\n```bash\ncurl -X POST http://localhost:3001/api/agents/reset-all \\\n  -H \"X-API-Key: your_api_key\"\n```\n\n**Check Ollama status:**\n```bash\ncurl http://localhost:3001/api/agents/ollama-status \\\n  -H \"X-API-Key: your_api_key\"\n```\n\n---\n\n## 🧪 Testing\n\n### Stress Tests\n\n**20-task graduated complexity (C1-C8, 100% pass rate):**\n```bash\nnode scripts/ollama-stress-test.js\n```\n\n**40-task ultimate test (C1-C9, 90% pass rate, 11 min with 16K context):**\n```bash\nnode scripts/ollama-stress-test-40.js\n```\n\n**Full tier test (Ollama + Haiku + Sonnet + Opus, ~$1.50 cost):**\n```bash\nnode scripts/run-full-tier-test.js\n```\n\n**Parallel execution test:**\n```bash\nnode scripts/test-parallel.js\n```\n\n### Unit Tests\n\n```bash\n# API tests (18 test suites, 122 tests)\ncd packages/api\nnpm test\n\n# Agent tests (2 Python test suites, 696 lines)\ncd packages/agents\npytest\n```\n\n**Test Coverage (as of Feb 7, 2026):**\n- **27 total test files:** 23 TypeScript + 4 Python\n- **API tests (16 files):** budgetService, resourcePool, stuckTaskRecovery, rateLimiter, agentManager, costCalculator, complexityAssessor, taskRouter, taskQueue, fileLock, ollamaOptimizer, schedulerService, taskExecutor, taskAssigner\n- **UI component tests (5 files):** ErrorBoundary, AgentCard, TaskCard, AnimatedCounter, StatusBadge\n- **Python tests (4 files):** action_history, file_ops, validators, tools\n- **Integration tests:** CORS, auth middleware, task lifecycle\n\n### System Health Check\n\n```bash\n# Full health check (includes load test)\nnode scripts/full-system-health-check.js\n\n# Quick check (skip load test)\nnode scripts/full-system-health-check.js --skip-load-test\n```\n\n---\n\n## 🐛 Troubleshooting\n\n### Ollama model not loading\n\n**Symptoms:** Tasks stuck in queue, Ollama health check failing\n\n**Solution:**\n```bash\n# Check if model is downloaded (should show qwen2.5-coder:32k)\ndocker exec abcc-ollama ollama list\n\n# If missing, the entrypoint auto-creates it. Restart the container:\ndocker compose restart ollama\n\n# Or pull base model and create manually:\ndocker exec abcc-ollama ollama pull qwen2.5-coder:7b\n# The 32k model (16K context) is auto-created from the base model on startup\n\n# Check logs\ndocker logs abcc-ollama --tail 50\n```\n\n### CORS errors in browser\n\n**Symptoms:** `Access to fetch blocked by CORS policy`\n\n**Solution:**\n```bash\n# Add your origin to .env\nCORS_ORIGINS=http://localhost:5173,http://localhost:8080\n\n# Restart API\ndocker compose restart api\n```\n\n### Rate limit exceeded\n\n**Symptoms:** `429 Too Many Requests`\n\n**Solution:**\n```bash\n# Increase limit in .env\nRATE_LIMIT_MAX=300\n\n# Or use WebSockets instead of polling\n```\n\n### API authentication fails\n\n**Symptoms:** `401 Unauthorized` or `403 Forbidden`\n\n**Solution:**\n```bash\n# Check API key matches in .env\nAPI_KEY=...\nVITE_API_KEY=...  # Must be same value\n\n# Rebuild UI container\ndocker compose up --build ui\n```\n\n### Tasks stuck in \"in_progress\"\n\n**Symptoms:** Task running for \u003e10 minutes with no updates\n\n**Automatic recovery:** Stuck task recovery service runs every 60 seconds\n\n**Manual recovery:**\n```bash\n# Check stuck task recovery status\ncurl http://localhost:3001/api/agents/stuck-recovery/status \\\n  -H \"X-API-Key: your_api_key\"\n\n# Trigger manual recovery\ncurl -X POST http://localhost:3001/api/agents/stuck-recovery/check \\\n  -H \"X-API-Key: your_api_key\"\n```\n\n### Database connection issues\n\n**Symptoms:** `Error: P1001: Can't reach database server`\n\n**Solution:**\n```bash\n# Check PostgreSQL is running\ndocker ps | grep postgres\n\n# Check connection\ndocker exec abcc-postgres pg_isready -U postgres\n\n# View logs\ndocker logs abcc-postgres --tail 50\n```\n\n### Out of disk space\n\n**Symptoms:** Docker fails to start, \"no space left on device\"\n\n**Check Docker disk usage:**\n```bash\ndocker system df\n```\n\n**Clean up:**\n```bash\n# Remove old containers and images\ndocker system prune -a\n\n# Remove old Ollama models\ndocker exec abcc-ollama ollama list\ndocker exec abcc-ollama ollama rm \u003cold-model-name\u003e\n\n# Clean backups (keep last 7 days)\n# Default backup location: ./backups/ (set BACKUP_MIRROR_PATH in .env)\n```\n\n---\n\n## 📚 Documentation\n\n- **[Authentication Guide](docs/AUTHENTICATION.md)** - API key setup and usage\n- **[CORS Configuration](docs/CORS.md)** - Origin restrictions and security\n- **[Rate Limiting](docs/RATE_LIMITING.md)** - Request limits and bypass\n- **[Error Handling](docs/ERROR_HANDLING.md)** - UI error boundaries\n- **[Database Migrations](docs/DATABASE_MIGRATIONS.md)** - Schema changes and deployment\n- **[API Reference](docs/API.md)** - All endpoints and examples\n- **[Development Guide](docs/DEVELOPMENT.md)** - Testing and debugging\n- **[AI Assistant Context](CLAUDE.md)** - Project overview for AI tools\n\n---\n\n## 🛠️ Development\n\n### Prerequisites\n\n- Node.js 20+\n- Python 3.11+\n- pnpm 8+ (install with `npm install -g pnpm`)\n- Docker Desktop\n\n### Local Setup\n\n```bash\n# Install dependencies\npnpm install\n\n# Start database only\ndocker compose up postgres redis -d\n\n# Run API in dev mode\ncd packages/api\npnpm dev\n\n# Run UI in dev mode\ncd packages/ui\npnpm dev\n\n# Run agents in dev mode\ncd packages/agents\nuvicorn src.main:app --reload --port 8000\n```\n\n### Running Tests\n\n```bash\n# All tests\npnpm test\n\n# API tests only\ncd packages/api \u0026\u0026 pnpm test\n\n# UI tests (when available)\ncd packages/ui \u0026\u0026 pnpm test\n\n# Agent tests (when available)\ncd packages/agents \u0026\u0026 pytest\n```\n\n### Code Quality\n\n```bash\n# Lint all packages\npnpm lint\n\n# Security scan (requires Trivy)\npnpm run security:scan\n\n# Type check\npnpm run type-check\n```\n\n---\n\n## 🤝 Contributing\n\nWe welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for:\n- Code of conduct\n- Development setup\n- Pull request process\n- Code style guidelines\n- Testing requirements\n\n**Quick start for contributors:**\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Make your changes and add tests\n4. Ensure all tests pass (`pnpm test`)\n5. Commit with clear messages (`git commit -m 'Add amazing feature'`)\n6. Push to your fork (`git push origin feature/amazing-feature`)\n7. Open a Pull Request\n\n---\n\n## 📊 Performance \u0026 Benchmarks\n\n### Proven Metrics (Feb 2026)\n\n| Metric | Result | Test |\n|--------|--------|------|\n| **Ollama C1-C9 Success** | **90% (36/40)** | 40-task ultimate test, 16K context |\n| **Ollama C1-C8 Success** | 100% (20/20) | 20-task stress test |\n| **Total runtime (40 tasks)** | **11 minutes** | 4.5x faster than 4K context (was 43 min) |\n| **Ollama avg time** | **12s** | 16K context (was 54s with 4K) |\n| **Cost per task (avg)** | $0.002 | Mixed complexity batch |\n| **GPU utilization** | 93% GPU / 7% CPU | 7GB VRAM on RTX 3060 Ti 8GB |\n| **Parallel speedup** | 40-60% | vs sequential |\n\n**16K Context Window Upgrade (Feb 17, 2026):**\n\n| Complexity | Success | Avg Time | What's Tested |\n|------------|---------|----------|---------------|\n| C1-C4 | **100%** | 8-11s | Math, strings, conditionals, loops |\n| C5-C6 | **80-100%** | 10-12s | FizzBuzz, palindrome, caesar cipher, primes |\n| C7-C8 | **100%** | 14-15s | Fibonacci, word freq, matrix, binary search, power set |\n| C9 (Extreme) | **80%** | 19s | LRU Cache, RPN Calculator, Sorted Linked List, Stack |\n\n### Hardware Requirements\n\n**Recommended:**\n- RTX 3060 Ti (8GB VRAM) or better\n- 16GB system RAM\n- 50GB free disk space\n- Ubuntu 22.04 / Windows 11 with WSL2\n\n**Minimum:**\n- CPU-only (no GPU) - much slower\n- 8GB system RAM\n- 30GB free disk space\n\n---\n\n## 🗺️ Roadmap\n\n### Current (v0.7.x)\n- ✅ **Per-agent model selection** — dropdown to override Auto routing per agent (v0.7.0)\n- ✅ **Grok (xAI) support** — new model option for all agents (v0.7.0)\n- ✅ **CTO agents in sidebar** — full visibility for all 3 agent types (v0.7.0)\n- ✅ **3-tier routing** — Local Ollama / Remote Ollama / Claude API (v0.5.1)\n- ✅ **Auto-retry pipeline** — 98% pass rate with validation + retry (v0.5.0)\n- ✅ Tiered task routing (Ollama/Sonnet/Opus)\n- ✅ 16K context window for Ollama — 90% C1-C9, 4.5x faster\n- ✅ 3D holographic battlefield view with React Three Fiber\n- ✅ Bark TTS military radio voice lines — 96 clips, 3 packs\n- ✅ API authentication and rate limiting\n- ✅ Parallel execution and file locking\n- ✅ Cost tracking and budget limits\n- ✅ Stuck task auto-recovery\n- ✅ Docker Hub image publishing\n- ✅ Multi-language workspace (Python, JavaScript, TypeScript, Go, PHP)\n\n### Next (v0.8.x)\n- [ ] E2E test suite (Playwright)\n- [ ] Onboarding flow / first-run wizard\n- [ ] Agent workspace viewer (live code editing view)\n- [ ] Plugin system for custom agent tools\n\n### Community Release (v1.0.x) - Target: 2-3 months\n- [ ] Multi-user authentication (OAuth2/OIDC)\n- [ ] Workspace isolation per user\n- [ ] Cloud deployment guides (Railway, Render, AWS)\n- [ ] Demo mode (pre-loaded tasks, no API key)\n- [ ] Agent marketplace (community agents)\n- [ ] WCAG 2.1 AA accessibility compliance\n\n---\n\n## 📜 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\n## 🙏 Acknowledgments\n\n- **Anthropic** - Claude API powering the intelligent agents\n- **Ollama** - Local LLM runtime enabling free execution\n- **CrewAI** - Agent orchestration framework\n- **[Bark TTS](https://github.com/suno-ai/bark)** - GPU-generated military radio voice lines\n- **Classic RTS games** - Inspiration for the UI/UX\n\n---\n\n## 📧 Support\n\n- **Issues:** [GitHub Issues](https://github.com/mrdushidush/agent-battle-command-center/issues)\n- **Discussions:** [GitHub Discussions](https://github.com/mrdushidush/agent-battle-command-center/discussions)\n- **Documentation:** [docs/](docs/)\n\n---\n\n**Built with ❤️ by the ABCC community**\n\n*\"One write, one verify, mission complete.\" - CodeX-7*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrdushidush%2Fagent-battle-command-center","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrdushidush%2Fagent-battle-command-center","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrdushidush%2Fagent-battle-command-center/lists"}