ClawLoops Layered Architecture for AI/ML Runtime Orchestration

System Design · flowchart diagram · Apache-2.0

A layered system architecture for ClawLoops, detailing components like Traefik, Control Plane, Runtime Orchestrator, and Model Services for AI/ML runtime m

Source: https://github.com/machinesociety/ClawLoops/blob/7d2c1214f45e98d01c1e3dc8b8c519a1c2e53488/README/README_ja-JP.md
Curated by machinesociety
System Design Microservices AI/ML Orchestration Traefik PostgreSQL LLM

Mermaid source

flowchart TB
    A([Browser])

    subgraph L1[入口層]
        direction TB
        B[Traefik]
    end

    subgraph L2[プラットフォーム層]
        direction TB
        D[ClawLoops 制御プレーン]
    end

    subgraph L3[編成層]
        direction TB
        E[Runtime Orchestrator]
        F[Runtime Manager]
    end

    subgraph L4[Runtime 層]
        direction TB
        G[ユーザーごとの OpenClaw Runtime]
    end

    subgraph L5[モデル層]
        direction TB
        H[モデルサービス / 資格情報プロキシ]
        I[LiteLLM]
        J[vLLM / Ollama / Upstream Providers]
    end

    K[(PostgreSQL)]

    A -->|入口| B -->|セッション検証| D
    D -->|期待状態| E -->|ライフサイクル編成| F -->|起動 / 停止 / 復旧| G
    D -->|モデルアクセス| H --> I --> J
    D -->|プラットフォームデータ| K

    classDef edge fill:#eff6ff,stroke:#2563eb,stroke-width:2px,color:#0f172a;
    classDef plane fill:#dcfce7,stroke:#16a34a,stroke-width:2px,color:#0f172a;
    classDef runtime fill:#f3e8ff,stroke:#7c3aed,stroke-width:2px,color:#0f172a;
    classDef model fill:#ffe4e6,stroke:#db2777,stroke-width:2px,color:#0f172a;
    classDef data fill:#f8fafc,stroke:#64748b,stroke-width:2px,color:#0f172a;

    class A,B edge;
    class D plane;
    class E,F,G runtime;
    class H,I,J model;
    class K data;

What this diagram shows

This diagram illustrates the ClawLoops system's layered architecture, starting from the Browser entrance through Traefik for access control, to the Control Plane managing Runtime Orchestrator and individual user Runtimes. It also depicts the Model Layer with services like LiteLLM and vLLM, and a PostgreSQL database for platform data. The layers include Entrance, Platform, Orchestration, Runtime, and Model.

When to use it

Use this diagram when designing or understanding complex, multi-layered systems, especially those involving AI/ML runtime orchestration, access control, and scalable model serving. It's suitable for illustrating how different components interact across distinct architectural layers.

How to adapt it for your project

This architecture can be adapted by swapping out specific components, such as using Nginx instead of Traefik for the entrance layer, or different database systems like MySQL or MongoDB instead of PostgreSQL. The model layer can integrate various LLM providers or custom models. The runtime orchestration can be extended to support different containerization technologies beyond OpenClaw Runtime.

Key concepts