Last Updated: 2026-04-15 Status: 29/29 containers healthy — Stripe LIVE — CognitiveUplink WS LIVE
HyperCode V2.4 is a self-evolving cognitive AI architecture — a swarm of specialized AI agents that autonomously design, deploy, heal, and evolve themselves inside a Docker-based infrastructure. It is neurodivergent-first: built for ADHD/autistic/dyslexic developers who think in systems and need tools that move at the speed of thought.
The system goes beyond a code assistant: it runs missions, routes commands to specialist agents, self-heals broken services, handles Stripe payments, and streams real-time results to a live dashboard.
| Service | Port | Role |
|---|---|---|
HyperCode Core (hypercode-core) |
8000 | FastAPI backbone — auth, DB, Stripe, MCP gateway, WS hub |
| Crew Orchestrator | 8081 | Agent lifecycle + mission execution + approval gating |
| Agent X (Meta-Architect) | 8080 | Autonomously designs and deploys new agents via Docker |
| Healer Agent | 8008 | Self-healing — monitors containers, auto-recovers failures |
| Celery Worker | — | Background task processing (Redis broker) |
| Mission Control | 8088 | Next.js real-time dashboard + CognitiveUplink chat |
| Grafana Observability | 3001 | Full Prometheus + Grafana + Loki + Tempo stack |
| Component | Technology |
|---|---|
| Language | Python 3.11 (backend / agents) + TypeScript (dashboard) |
| API Framework | FastAPI + Pydantic + SQLAlchemy 2.0 |
| Task Queue | Celery 5.x + Redis 7 |
| Database | PostgreSQL 15 |
| Caching / Pub-Sub | Redis 7 |
| LLM Backend | Ollama (local, Docker Model Runner) |
| Vector Store | ChromaDB |
| Object Storage | MinIO |
| Observability | Prometheus + Grafana + Loki + Tempo + Promtail |
| Security | Trivy (CVE scanner) + non-root containers + cap drops |
| Payments | Stripe Checkout + webhooks |
| Container Runtime | Docker Compose (multi-file strategy) |
Five isolated Docker networks — two are internal: true (no external internet):
┌─ frontend-net ──────────────────────┐ internet: yes
│ dashboard · mission-ui · mcp-server│
└─────────────────────────────────────┘
│
┌─ backend-net ────────────────────────┐ internet: yes
│ hypercode-core (bridges all layers) │
└──────────────────────────────────────┘
│
┌─ agents-net ─────────────────────────┐ internet: yes (LLM API calls)
│ crew-orchestrator · agent-x │
│ healer · celery-worker · specialists│
└──────────────────────────────────────┘
│
┌─ data-net ───────────────────────────┐ internal: true (NO internet)
│ redis · postgres · minio · chroma │
└──────────────────────────────────────┘
│
┌─ obs-net ────────────────────────────┐ internal: true (NO internet)
│ prometheus · grafana · loki │
│ tempo · promtail │
└──────────────────────────────────────┘
hypercode-core is the only service that spans all non-internal networks — it acts as the controlled bridge between frontend, agents, and data layers.
Neural chat interface from Mission Control → Crew Orchestrator.
Dashboard (CognitiveUplink.tsx)
│ ws://localhost:8000/ws/uplink
▼
hypercode-core (app/ws/uplink.py)
│ POST http://crew-orchestrator:8081/execute
│ X-API-Key: ${ORCHESTRATOR_API_KEY}
▼
crew-orchestrator
│ routes to specialist agent
▼
agent result → back through WS → dashboard chat bubble
Message contract:
- Inbound:
{ type: 'execute', payload: { command: str } }or{ type: 'ping' } - Outbound:
{ type: 'response', payload: str }or{ type: 'error', data: str }or{ type: 'pong' }
Dashboard /pricing page
│ POST /api/stripe/checkout
▼
hypercode-core stripe_service.py
│ stripe.checkout.Session.create(mode=payment|subscription)
▼
Stripe → redirect to success_url
│ POST /api/stripe/webhook (Stripe-Signature verified)
▼
DB writes: subscription row, payment record, enrollment
Token packs → mode="payment". Course subscriptions → mode="subscription".
All agent-to-agent calls use X-API-Key headers with hc_-prefixed keys (43 chars, URL-safe). Per-key rate limiting enforced in middleware. Keys stored hashed in DB.
Healer monitors all containers via the Docker socket proxy. On failure it:
- Attempts
docker restart - Publishes alert to Redis
hypercode:logs - Records incident in PostgreSQL
broski_tokensbalance column onuserstabletoken_transactionsappend-only ledger (idempotency guards)award_tokens()/spend_tokens()— SECURITY DEFINER, server-side only- Digital shop: Prompt Packs (200 BROski$), Templates (150 BROski$), Bonus Lessons (100 BROski$)
| Tool | Port | Purpose |
|---|---|---|
| Prometheus | internal | Scrapes metrics from core, celery, node-exporter, cAdvisor |
| Grafana | 3001 | Dashboards — CPU, memory, request rates, agent status |
| Loki | internal | Log aggregation (Promtail ships container logs) |
| Tempo | internal | Distributed tracing (OpenTelemetry from hypercode-core) |
Redis hypercode:logs |
internal | Live log ring buffer (last 1000 entries) |
Redis agents:heartbeat:* |
internal | Agent liveness keys (TTL 30s) |
- Local dev:
.envfile (never committed). Special-char passwords must be quoted. - Production:
./secrets/*.txtfiles +docker-compose.secrets.ymloverride. - NEVER set
POSTGRES_PASSWORD_FILEalongsidePOSTGRES_PASSWORD— causes startup conflict.
Key env vars:
ORCHESTRATOR_API_KEY — agent-to-agent auth
STRIPE_SECRET_KEY — Stripe payments
STRIPE_WEBHOOK_SECRET — webhook signature verification
HYPERCODE_REDIS_URL — Redis connection string
DATABASE_URL — PostgreSQL connection string
Every Dockerfile follows:
FROM python:3.11-slim— neverlatestapt-get upgrade -yon every build- pip toolchain pinned (
pip==26.0.1,setuptools>=80.0.0, etc.) - Non-root user (
appuser) - Trivy scanned — target: ZERO CRITICAL, <5 HIGH
# Core stack (29 containers)
docker compose -f docker-compose.yml -f docker-compose.secrets.yml up -d
# Add all AI agents
docker compose -f docker-compose.yml -f docker-compose.secrets.yml --profile agents up -d
# Full stack (all profiles)
docker compose -f docker-compose.yml -f docker-compose.secrets.yml \
--profile agents --profile hyper --profile health --profile mission up -dbuilt with WelshDog + BROski 🚀🌙