System Architecture
ComfyClaw has two layers:
- Local Skill — dashboard + CLI for managing ComfyUI servers and workflows
- Network — gateway + marketplace for running jobs on remote GPUs
Local Skill Architecture
ComfyUI Server (GPU)
▲ REST + WS
│
ComfyClaw CLI + Dashboard
│ config.json + gallery.json
▼
Local storage (~/.openclaw/comfyclaw)
- The CLI and dashboard are pure Python + static HTML
- No build step or dependencies
- Workflows are stored as enriched JSON with classified inputs
Network Architecture
Provider GPU ComfyClaw Gateway Consumer Browser
┌────────────┐ ┌────────────────┐ ┌───────────────┐
│ ComfyUI │◄──────│ REST + WS API │◄────────►│ comfyclaw.app │
│ ComfyClaw │ WS │ SQLite DB │ │ SPA frontend │
└────────────┘ │ Stripe + R2 │ └───────────────┘
└────────────────┘
Key components:
- Gateway server (Python stdlib):
gateway/server.py - Web SPA:
web/index.html - SQLite database for jobs, wallets, providers, favorites
- Stripe integration for deposits + payouts
- R2 storage for outputs and thumbnails
- WebSocket provider connections for job dispatch + progress
Data Flow
- Consumer submits job →
/api/v1/jobs - Gateway selects provider and dispatches job via WebSocket
- Provider runs workflow locally on ComfyUI
- Gateway streams progress + preview
- Output stored locally and optionally in R2
- Consumer downloads via
/api/v1/jobs/<id>/output