Skip to content

System Architecture

ComfyClaw has two layers:

  1. Local Skill — dashboard + CLI for managing ComfyUI servers and workflows
  2. 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

  1. Consumer submits job → /api/v1/jobs
  2. Gateway selects provider and dispatches job via WebSocket
  3. Provider runs workflow locally on ComfyUI
  4. Gateway streams progress + preview
  5. Output stored locally and optionally in R2
  6. Consumer downloads via /api/v1/jobs/<id>/output