Skip to content

cjmuldoon/max-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Max β€” Agent Management Platform

"Would you believe... a fully autonomous multi-agent orchestration platform?"

Agent 86 Agent 99

Max (named after Maxwell Smart, Agent 86) is a self-hosted agent management platform that orchestrates Claude Code CLI agents across multiple projects. Built with Flask, it provides a web-based mission control centre for deploying, monitoring, and coordinating AI agents.

"Sorry about that, Chief." β€” Max, after every minor setback


✨ Features

πŸ•΅οΈ CONTROL Headquarters

  • Operations Centre β€” Dashboard showing all registered projects with status, health, and quick actions
  • Persistent Multi-Terminal Hub β€” Multiple xterm.js terminals with tab and mini-panel management. Sessions survive page navigation. Pop-out windows. Fullscreen mode.
  • KAOS Mode β€” launch Claude with --dangerously-skip-permissions (☠️ button)
  • Session resume β€” Claude terminals auto-resume the project's last session- Agent 99 β€” Persistent Claude CLI assistant accessible from every page (Cmd+9). She knows all your projects, can schedule tasks, run health checks, and create new projects from natural language.

πŸ“‹ Mission Dossier (Task Register)

  • Consolidated task register across all projects β€” bugs, features, improvements, tasks
  • Syncs with production β€” pulls from your apps' feedback APIs, pushes status updates back
  • Agent assignment β€” assign tasks to 86 (Sonnet/Opus) or 99
  • Scheduling β€” set date/time for agent work, friendly cron builder with presets
  • Multi-select bulk actions β€” run, deploy, or run & deploy selected items
  • Quality gates β€” review states, rejection loops with feedback
  • Session management β€” store and resume Claude CLI sessions per project
  • CLAUDE.md generation β€” edit Business Problem + Proposed Solution, auto-generate CLAUDE.md
  • Intelligent merge β€” updates CLAUDE.md without overwriting existing content
  • Reconnaissance β€” scan project directories with time grouping, search, undercover system

πŸš€ Agent Deployment & Execution

  • Sequential task execution per project β€” no conflicts, no timeouts
  • Git workflow β€” agents commit to agent/<task> branches, push for review
  • Diff viewer β€” color-coded code review in the browser
  • Deploy approval β€” review diff, approve, merge to main with one click
  • Progressive updates β€” agents report progress every 2 minutes
  • Auto-handoff β€” if a task times out inline, it spawns a background worker

πŸ“ž Shoe Phone Network (Discord & Telegram)

  • One bot, multiple channels β€” each project gets a Discord channel
  • Agent 99's Direct Line β€” dedicated channel for 99
  • Project agents respond in character β€” Max talks like Maxwell Smart
  • File attachments β€” send screenshots and files via Discord
  • Background task handoff β€” complex requests auto-delegate to background workers
  • Results delivered back to the channel when complete
  • Allowlist β€” only authorised users can talk to the bots

πŸ“¬ Inbox

  • Central notification hub β€” all agent updates, task completions, questions
  • Reply inline β€” responses go to the ticket thread
  • Deploy approval from inbox β€” review diffs and approve without leaving
  • Discord push β€” agent updates post to project channels automatically
  • macOS notifications β€” native alerts for agent activity

🌍 Satellite Office (VPS)

  • Remote agent deployment β€” SSH into VPS, spawn research agents
  • Remote terminal β€” execute commands on VPS from the browser
  • PostgreSQL sync β€” bidirectional sync between local SQLite and VPS Postgres
  • Agent coordination β€” remote researches, local executes

πŸ“Š Intelligence Division

  • Analytics dashboard β€” 7-day activity trends, task distribution, model usage, project breakdown
  • Audit trail β€” every agent action logged with timestamp, actor, detail
  • Health checks β€” git status, dependencies, common issues, project size
  • Vulnerability scanning β€” npm audit, pip-audit integration
  • Log analysis β€” error pattern detection in project logs
  • Smart polling β€” SocketIO pauses when browser tab is inactive, resumes on focus
  • Agent state machine β€” offline/idle/busy/sleeping/error with heartbeat tracking

πŸ‹οΈ Training Ground (Regression)

  • Regression branches β€” isolated git branches for testing changes
  • Promote to production β€” merge to main with one click
  • Test runner β€” auto-detect and run pytest, npm test, unittest

πŸ’Ύ Emergency Protocols

  • Backup & restore β€” snapshot the database, restore with safety backup
  • CLAUDE.md management β€” edit project briefs, generate CLAUDE.md, intelligent merge

🎨 Themes

Three themes with Claude orange (#E8734A) as the accent:

  • πŸŒ™ Dark β€” Night Operations
  • β˜€οΈ Light β€” Daylight Operations
  • 🌊 Soft β€” CONTROL Headquarters (light blues & greys)

πŸš€ Quick Start

Prerequisites

Install

git clone https://github.com/yourusername/max.git
cd max
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# Edit .env with your settings
python run.py

Open http://localhost:8086 β€” CONTROL headquarters is operational.

Docker

cp .env.example .env
# Edit .env
docker-compose up -d

macOS Auto-Start

python setup_startup.py        # Install launchd agent
python setup_startup.py uninstall  # Remove it

πŸ“± Discord Setup

  1. Create a bot at discord.com/developers
  2. Enable Message Content Intent under Bot β†’ Privileged Gateway Intents
  3. Invite the bot to your server
  4. Configure in Max: Shoe Phone page β†’ enter token + channel IDs
  5. Or let 99 create channels: she can do it programmatically

πŸ—οΈ Architecture

Max (Flask + SocketIO)
β”œβ”€β”€ Routes (Blueprints) ← HTTP β†’ Browser UI
β”œβ”€β”€ SocketIO Events ← WebSocket β†’ Real-time updates
β”œβ”€β”€ Services
β”‚   β”œβ”€β”€ AgentRunner β†’ spawns claude CLI processes
β”‚   β”œβ”€β”€ Agent99 β†’ persistent Claude assistant
β”‚   β”œβ”€β”€ TaskExecutor β†’ sequential task queue per project
β”‚   β”œβ”€β”€ BotManager β†’ Discord/Telegram lifecycle
β”‚   β”œβ”€β”€ TerminalManager β†’ persistent PTY sessions
β”‚   β”œβ”€β”€ HealthChecker β†’ project health analysis
β”‚   β”œβ”€β”€ FeedbackRegister β†’ consolidated task management
β”‚   β”œβ”€β”€ InboxService β†’ agent notifications
β”‚   β”œβ”€β”€ AuditService β†’ activity logging
β”‚   └── AnalyticsService β†’ usage tracking
β”œβ”€β”€ DB (SQLite)
└── Discord Worker (subprocess)

βš™οΈ Configuration

All configuration via .env or environment variables:

Variable Default Description
MAX_SECRET_KEY agent-86-would-you-believe Flask session secret
MAX_PORT 8086 Server port (Agent 86's number)
CLAUDE_CLI_PATH ~/.local/bin/claude Path to Claude CLI
MAX_PROJECT_LOCATIONS local:~/Projects Project directories (name:path pairs)
DISCORD_BOT_TOKEN β€” Discord bot token
VPS_HOST β€” VPS IP for remote operations

πŸ•΅οΈ Maxwell Smart References

Max is packed with Get Smart references:

  • Agent 86 (Max) β€” your project agents, confident and occasionally bumbling
  • Agent 99 β€” the competent persistent assistant who always calls you "Chief"
  • The Chief β€” that's you
  • CONTROL β€” the good guys (your infrastructure)
  • KAOS β€” the bad guys (production errors, vulnerabilities)
  • The Shoe Phone β€” Discord/Telegram bot connectivity
  • The Cone of Silence β€” secure operations (token entry, credentials)
  • KAOS Mode β€” --dangerously-skip-permissions (☠️ button)
  • Training Ground β€” regression environments
  • Emergency Protocols β€” backup & restore
  • Mission Dossier β€” consolidated task register
  • Satellite Office β€” VPS remote operations
  • "Would you believe..." β€” loading messages
  • "Sorry about that, Chief" β€” error messages
  • "And loving it!" β€” success messages
  • "Missed it by that much!" β€” timeouts and near-misses

πŸ“ Project Structure

max/
β”œβ”€β”€ app.py                  # Flask factory
β”œβ”€β”€ config.py               # Configuration
β”œβ”€β”€ run.py                  # Entry point + Discord worker
β”œβ”€β”€ max/
β”‚   β”œβ”€β”€ models/             # Data models (Project, Agent, Task, etc.)
β”‚   β”œβ”€β”€ services/           # Business logic (agent runner, bots, health, etc.)
β”‚   β”œβ”€β”€ routes/             # Flask blueprints
β”‚   β”œβ”€β”€ sockets/            # SocketIO event handlers
β”‚   β”œβ”€β”€ db/migrations/      # SQL migrations
β”‚   └── utils/              # Smart quotes, helpers
β”œβ”€β”€ static/                 # CSS themes, JS, images
β”œβ”€β”€ templates/              # Jinja2 templates
β”œβ”€β”€ menubar/                # macOS menu bar app (rumps)
└── scripts/                # Setup scripts, launchd plists

🀝 Contributing

  1. Fork the repo
  2. Create a branch (git checkout -b feature/shoe-phone-upgrade)
  3. Make your changes
  4. Submit a PR

"Would you believe... we accept pull requests?"


πŸ“„ License

MIT License β€” see LICENSE for details.


"Would you believe... the world's smartest agent manager?"
Built with Claude Code. And loving it.

About

Would you believe... a fully autonomous multi-agent orchestration platform? Self-hosted Claude Code agent management. Named after Maxwell Smart.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors