Skip to content

smouj/openclaw-mgs-codec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

56 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘      โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•—              โ•‘
โ•‘     โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ•‘              โ•‘
โ•‘     โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ•”โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•‘              โ•‘
โ•‘     โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ• โ–ˆโ–ˆโ•”โ•โ•โ•  โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘              โ•‘
โ•‘     โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘ โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•‘              โ•‘
โ•‘      โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•     โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ•  โ•šโ•โ•โ•โ•              โ•‘
โ•‘                                                       โ•‘
โ•‘   OPENCLAW MULTI-AGENT ORCHESTRATION DASHBOARD        โ•‘
โ•‘         MGS CODEC INTERFACE v2.0                      โ•‘
โ•‘                                                       โ•‘
โ•‘          โ—ˆ FREQUENCY 187.89 MHz โ—ˆ                     โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

CI Deploy Pages Version Next.js FastAPI TypeScript Docker License

๐ŸŽฎ LIVE DEMO ยท ๐Ÿ“– DOCS ยท ๐Ÿ› ISSUES


๐Ÿ What is OpenClaw MGS Codec?

The most advanced multi-agent AI dashboard ever built โ€” wrapped in an authentic Metal Gear Solid CODEC interface from 1998. This is not a theme โ€” this is a fully operational AI orchestration system disguised as a Cold War military communication device.

"Snake, I need you to listen carefully. Six AI agents are standing by on frequency 187.89 MHz. Your mission: orchestrate them." โ€” Colonel Campbell

The Stack

Layer Technology
Frontend Next.js 15 (App Router) + React 19 + TypeScript
CRT Effects WebGL Fragment Shaders (Three.js) + CSS scanlines
Animations Framer Motion 11 + GSAP 3.12
Backend FastAPI + Pydantic v2 + Motor (async MongoDB)
AI Agents PicoClaw (Claude, GPT-4, OpenRouter, Groq, Gemini)
Database MongoDB 7 + Redis (WebSocket pub/sub)
Audio Web Audio API (procedural MGS beeps)
Deploy Docker Compose + GitHub Actions + GH Pages

๐Ÿš€ One-Click Install

Option A: Docker Compose (Recommended)

git clone https://github.com/smouj/openclaw-mgs-codec
cd openclaw-mgs-codec
cp .env.example .env       # Edit with your settings
docker-compose up -d

Open http://localhost:3000 โ€” CODEC ACTIVE.

Option B: Native Install Script

git clone https://github.com/smouj/openclaw-mgs-codec
cd openclaw-mgs-codec
chmod +x install.sh && ./install.sh
./start.sh

Option C: Demo Mode (Zero config)

# No MongoDB, no API key required
cd frontend-next
npm install
NEXT_PUBLIC_DEMO_MODE=true npm run dev

๐ŸŽฎ Features

๐Ÿ–ฅ๏ธ Authentic MGS CODEC Interface

  • Frequency Display: 187.89 MHz in glowing red phosphor digits (exact replica)
  • Split-Screen Portraits: Left operator / right agent โ€” Yoji Shinkawa art style
  • PTT Timer: Digital clock with MEM/TUNE buttons
  • Boot Sequence: CRT power-on animation with typewriter boot log
  • Incoming Call: Ring animation + audio alert with portrait flash

๐ŸŒŸ WebGL CRT Shaders (Real GPU effects)

  • Parametric Scanlines: Animated with exact pixel spacing
  • Phosphor Bloom: Cheap box-blur approximation of phosphor persistence
  • Screen Curvature: Barrel distortion in GLSL fragment shader
  • Chromatic Aberration: RGB channel offset at screen edges
  • Film Grain: Green-tinted procedural noise (no texture files)
  • Vignette: Radial darkening toward screen edges
  • Phosphor Flicker: Subtle 60Hz luminance variation

๐Ÿค– 6 Specialized AI Agents

Agent Frequency Capabilities
๐Ÿ”ท Orchestrator 187.89 MHz Coordination, strategy, delegation
โšก Shell Executor 141.12 MHz Bash, system commands, automation
๐Ÿ” Browser Agent 140.85 MHz Web scraping, research, Playwright
๐Ÿ“ File Manager 140.15 MHz File ops, search, organization
๐Ÿ“ก Communications 142.52 MHz Email, webhooks, notifications
โญ Custom Skill 143.74 MHz Plugins, custom tasks, API

๐ŸŽต Web Audio API (Procedural Sound)

All sounds generated in real-time with no audio files:

  • playCodecBeep() โ€” iconic 3-tone MGS CODEC sequence
  • playCallStart() โ€” rising frequency sweep
  • playMessageReceived() โ€” two-tone chime
  • playAlert() โ€” urgent sawtooth alert
  • playBootSequence() โ€” dramatic startup sweep
  • playTransmissionLost() โ€” descending glitch

๐Ÿช– Military HUD Overlay

  • LIFE bar: Token usage as red HP bar (decreases with usage)
  • RATIONS: Cost per hour in real-time
  • EQUIPMENT: Active LLM model slots (Claude/GPT/Groq)
  • UPTIME: Session timer with total conversations

โฐ Cron Job Scheduler

Trigger types: cron | interval | date
Job types:    agent_task | shell_command | webhook

๐Ÿ”’ Security

  • Fernet encryption for API keys (AES-128-CBC + HMAC-SHA256)
  • Docker secrets support
  • Sandboxed command execution (dangerous command blocking)
  • Path traversal protection
  • Rate limiting on all API endpoints
  • Tokens never logged or exposed

๐Ÿ“ก API Token Configuration

Tokens use provider:api_key format:

anthropic:sk-ant-api03-xxxxx      Claude 3.5 Sonnet
openai:sk-xxxxx                    GPT-4o
openrouter:sk-or-v1-xxxxx          Any model via OpenRouter
groq:gsk_xxxxx                     Groq (ultra-fast)
google:AIzaxxxxx                   Gemini 2.0 Flash
sk-ant-api03-xxxxx                 Default: Anthropic

๐Ÿ—๏ธ Architecture

openclaw-mgs-codec/
โ”œโ”€โ”€ frontend-next/          # Next.js 15 (App Router) โ€” NEW
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ”œโ”€โ”€ layout.tsx      # Root layout + metadata + fonts
โ”‚   โ”‚   โ”œโ”€โ”€ page.tsx        # Dashboard page
โ”‚   โ”‚   โ””โ”€โ”€ globals.css     # CRT CSS variables + utilities
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ codec/          # CODEC UI components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ CodecDashboard.tsx   # Main orchestrator
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ CodecBootScreen.tsx  # Power-on animation
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ CodecHeader.tsx      # Freq display + controls
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ CodecPortraitPanel.tsx # Agent portraits
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ CodecConversation.tsx  # Typewriter chat
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ CodecAgentList.tsx   # Agent selector
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ CodecHUD.tsx         # Military HUD
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ CodecScheduler.tsx   # Job scheduler modal
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ CodecTokenModal.tsx  # API token config
โ”‚   โ”‚   โ””โ”€โ”€ effects/        # CRT visual effects
โ”‚   โ”‚       โ”œโ”€โ”€ CRTCanvas.tsx        # WebGL Three.js shader
โ”‚   โ”‚       โ”œโ”€โ”€ ScanlineOverlay.tsx  # CSS scanlines
โ”‚   โ”‚       โ”œโ”€โ”€ NoiseOverlay.tsx     # Static noise
โ”‚   โ”‚       โ””โ”€โ”€ VignetteOverlay.tsx  # Screen vignette
โ”‚   โ”œโ”€โ”€ lib/
โ”‚   โ”‚   โ”œโ”€โ”€ api.ts          # Typed FastAPI client
โ”‚   โ”‚   โ”œโ”€โ”€ audio.ts        # Web Audio API system
โ”‚   โ”‚   โ”œโ”€โ”€ mockData.ts     # Demo mode data
โ”‚   โ”‚   โ””โ”€โ”€ shaders.ts      # GLSL shader strings
โ”‚   โ””โ”€โ”€ types/index.ts      # Full TypeScript types
โ”‚
โ”œโ”€โ”€ frontend/               # Legacy React CRA (still works)
โ”œโ”€โ”€ backend/                # FastAPI + PicoClaw + Scheduler
โ”‚   โ”œโ”€โ”€ server.py           # API endpoints + WebSocket
โ”‚   โ”œโ”€โ”€ scheduler.py        # APScheduler integration
โ”‚   โ””โ”€โ”€ picoclaw_agent/     # AI agent framework
โ”‚
โ”œโ”€โ”€ docs/                   # GitHub Pages landing page
โ”‚   โ”œโ”€โ”€ index.html          # Spectacular landing (WebGL CRT)
โ”‚   โ””โ”€โ”€ manifest.json       # PWA manifest
โ”‚
โ”œโ”€โ”€ .github/workflows/
โ”‚   โ”œโ”€โ”€ ci.yml              # CI: lint + type-check + build
โ”‚   โ””โ”€โ”€ deploy-pages.yml    # GH Pages auto-deploy
โ”‚
โ”œโ”€โ”€ docker-compose.yml      # Full stack Docker
โ”œโ”€โ”€ Dockerfile.backend      # FastAPI container
โ”œโ”€โ”€ Dockerfile.frontend     # Next.js container
โ””โ”€โ”€ .env.example            # Environment template

๐Ÿšข Deployment

GitHub Pages (Landing)

The landing page in /docs deploys automatically via GitHub Actions on every push to main.

Setup once:

  1. Go to repo Settings โ†’ Pages
  2. Source: GitHub Actions
  3. Push to main โ€” it deploys automatically

URL: https://yourusername.github.io/openclaw-mgs-codec/

Docker Compose (Full Stack)

# Production
docker-compose up -d

# With live logs
docker-compose up

# Rebuild after code changes
docker-compose up --build -d

# Stop
docker-compose down

# Stop + remove volumes
docker-compose down -v

# View logs
docker-compose logs -f backend
docker-compose logs -f frontend

Individual Services

# Backend only
docker build -f Dockerfile.backend -t openclaw-backend .
docker run -p 8001:8001 --env-file .env openclaw-backend

# Frontend only
docker build -f Dockerfile.frontend -t openclaw-frontend .
docker run -p 3000:3000 --env-file .env openclaw-frontend

๐Ÿ”ง Development

Frontend (Next.js 15)

cd frontend-next
npm install
npm run dev          # http://localhost:3000 with Turbopack
npm run build        # Production build
npm run type-check   # TypeScript
npm run lint         # ESLint

Frontend Legacy (React CRA)

cd frontend
npm install
npm start            # http://localhost:3000

Backend (FastAPI)

cd backend
pip install -r requirements.txt
python server.py     # http://localhost:8001
# or
uvicorn server:app --reload --port 8001

API Endpoints

Method Path Description
GET /api/health Health check
GET /api/agents List all agents
PUT /api/agents/{id}/status Update agent status
POST /api/conversations Create conversation
POST /api/conversations/{id}/messages Send message (triggers AI)
POST /api/config/token Save encrypted API token
GET /api/metrics Real-time system metrics
GET /api/jobs List scheduled jobs
POST /api/jobs Create scheduled job
WS /ws WebSocket real-time events

๐ŸŽจ Design System

Color Palette (CRT Phosphor)

#001100  Background (deep phosphor green-black)
#000800  Darker background (void)
#00ff9d  Phosphor green (primary โ€” all text)
#00aa66  Phosphor green dim (secondary)
#006644  Phosphor green dark (hints, borders)
#00ffff  Cyan (user messages)
#ff00ff  Magenta (system messages)
#ff0033  Red (alerts, LIFE bar)
#ffcc00  Yellow (busy state, rations)
#ff2200  Red-orange (frequency display)

Typography

  • Headings, UI, displays: VT323 (Google Fonts โ€” authentic CRT terminal)
  • Body, code, messages: Courier New, Courier, monospace

CSS Utilities

.glow-green      { text-shadow: 0 0 8px #00ff9d, 0 0 20px #00ff9d; }
.crt-screen      { /* CRT outer glow + inset shadow */ }
.crt-scanlines   { /* Animated scanlines overlay */ }
.status-connected { /* Pulsing green dot */ }
.mgs-panel       { /* Dark panel with green border */ }
.mgs-btn         { /* MGS-styled button with hover glow */ }
.freq-display    { /* Red phosphor frequency digits */ }
.life-bar        { /* HP bar */ }

๐Ÿ“ฆ Scripts

./install.sh    # Full installation (deps + config + services)
./start.sh      # Start all services
./stop.sh       # Stop all services
./update.sh     # Pull latest + restart (with git stash)
./diagnose.sh   # System health check (all deps + ports + services)
./logs.sh       # Live log viewer

๐Ÿค Contributing

Contributions welcome! This project follows:

  • TypeScript strict mode
  • ESLint + Prettier formatting
  • Conventional commits (feat:, fix:, chore:)
  • PRs must pass CI before merge
# Fork โ†’ clone โ†’ branch โ†’ PR
git checkout -b feat/your-feature
git commit -m "feat: add plasma beam weapon selector"
git push origin feat/your-feature

๐ŸŽฎ Credits & Inspiration

  • Metal Gear Solid (Konami, 1998) โ€” Hideo Kojima's masterpiece
  • Metal Gear Solid 2: Sons of Liberty (Konami, 2001)
  • Yoji Shinkawa โ€” Artist whose portrait style inspired the UI
  • PicoClaw โ€” The AI agent framework powering real capabilities
  • Anthropic Claude โ€” Primary AI backbone

๐Ÿ“„ License

MIT License โ€” See LICENSE for details.


โ–ถ FREQUENCY 187.89 MHz โ€” CODEC ACTIVE
โ–ถ Snake... it's not over yet.
โ–ถ KONAMI ร— XAI 2026

๐ŸŽฎ Launch Demo ยท โญ Star on GitHub ยท ๐Ÿ› Report Bug

About

๐Ÿ‘จโ€๐Ÿ’ป Dashboard de orquestaciรณn multi-agente inspirado en la interfaz CODEC de Metal Gear Solid 1 y 2 (1998-2001). Interfaz retro-futurista de espionaje militar con tema CRT phosphor green-black autรฉntico. ๐Ÿฆž

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors