Architecture
System design, components, and how everything fits together.
System Overview
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Nginx (SSL) β
β k8.virtualgpt.cloud β static meet.virtualgpt.cloud β β
β static + /api/ + /ws β
ββββββββββββββββ¬ββββββββββββββββββββββββββ¬βββββββββββββββββββββ
β β
ββββββββββββββββΌβββββββββββ βββββββββββββΌβββββββββββββββββββ
β K8s Landing Page β β GMeet Frontend β
β (Static HTML) β β (React + Tailwind + Zustand)β
βββββββββββββββββββββββββββ ββββββββββββ¬βββββββββββ¬βββββββββ
β REST β WS
ββββββββββββΌβββββββββββΌβββββββββ
β GMeet Backend β
β Express :4000 + WS :4001 β
ββββ¬ββββββ¬ββββββ¬ββββββ¬ββββββ¬ββββ
β β β β β
ββββΌββββββΌββββββΌββββββΌββββββΌββ
β5001ββ5002ββ5003ββ5004ββ5005β
βBMADββMaryββJohnββFredββDanaβ
ββββββββββββββββββββββββββββββ
Agent Zero Containers / Pods
β
OpenRouter API
(Kimi K2.5 / Gemini Flash)
Components
Agent Zero Instances
Each agent runs in an isolated Docker container (or K8s pod) using the agent0ai/agent-zero image. Each instance has:
- Its own agent profile (persona, system prompt, skills)
- Tuned model parameters (temperature, context length)
- Shared project volume for collaboration artifacts
- A2A server enabled for inter-agent communication
- Web UI on port 80 (mapped to 50001β50009 externally)
GMeet Backend
An Express.js server that bridges the GMeet frontend with Agent Zero instances:
- REST API on port 4000 β meeting management, agent listing, message routing
- WebSocket server on port 4001 β real-time transcript streaming
- X-API-KEY auth β authenticates with each Agent Zero instance using the
mcp_server_token - Context management β maintains conversation context IDs for multi-turn dialogues
GMeet Frontend
A React single-page application built with Vite:
- Lobby β select agents to invite to a meeting
- AgentGrid β Google Meet-style grid showing active agents with avatars
- TranscriptPanel β real-time conversation transcript with agent color coding
- Controls β message input, send to all or specific agents
- State management via Zustand with WebSocket sync
Nginx Reverse Proxy
Nginx handles SSL termination and routing:
k8.virtualgpt.cloudβ static files from/var/www/k8.virtualgpt.cloud/meet.virtualgpt.cloudβ static frontend + proxy/api/to :4000 + proxy/wsto :4001- Let's Encrypt SSL certificates with auto-renewal
Data Flow
- User opens
meet.virtualgpt.cloudβ loads React SPA - Frontend fetches agent list via
GET /api/agents - User creates a meeting β
POST /api/meetings - User sends a message β
POST /api/meetings/:id/message - Backend forwards message to selected agents via
POST /api_messagewith X-API-KEY - Agent Zero processes message using configured LLM (via OpenRouter)
- Response is returned to backend β stored in transcript β broadcast via WebSocket
- Frontend updates transcript panel in real time
Model Configuration
| Purpose | Provider | Model |
|---|---|---|
| Chat (reasoning) | OpenRouter | moonshotai/kimi-k2.5 |
| Utility (fast tasks) | OpenRouter | google/gemini-2.5-flash-preview |
| Embeddings | OpenAI | text-embedding-3-small |
Models are configured via the a0-dotenv/.env file mounted into each container. See Configuration for details on switching models.
Repository Structure
agent0-bmad-k8/
βββ agents/ # Agent profiles (9 agents)
β βββ bmad-orchestrator/ # settings.json, prompts/, SKILL.md
β βββ bmad-analyst/
β βββ bmad-pm/
β βββ bmad-architect/
β βββ bmad-ux/
β βββ bmad-po/
β βββ bmad-sm/
β βββ bmad-dev/
β βββ bmad-qa/
βββ gmeet/
β βββ backend/ # Express API + WebSocket server
β βββ frontend/ # React + Tailwind + Zustand SPA
βββ k8s/bmad/ # Kubernetes manifests
β βββ namespace.yaml
β βββ configmap.yaml
β βββ secrets.yaml
β βββ deployment-template.yaml
β βββ pvc.yaml
β βββ ingress.yaml
β βββ deploy-bmad.sh
βββ projects/bmad-template/ # BMAD workflow templates
βββ docker-compose.live.yml # Live demo (5 agents)
βββ docker-compose.bmad.yml # Full setup (9 agents)
βββ a0-dotenv/.env # API keys (gitignored)
βββ .github/workflows/ci.yml # GitHub Actions CI
βββ README.md
Security
- API keys are never committed to git β stored in
.env.liveanda0-dotenv/.env(both gitignored) - Agent auth uses
X-API-KEYheader with per-instance tokens - Web UI auth uses session-based login (configurable credentials)
- K8s secrets store API keys as base64-encoded Kubernetes secrets
- SSL/TLS via Let's Encrypt with auto-renewal