This diagram illustrates the layered architecture of ClawLoops, detailing the entry, platform, orchestration, runtime, and model layers for secure AI appli
flowchart TB
A([Browser])
subgraph L1[Entry Layer]
direction TB
B[Traefik]
end
subgraph L2[Platform Layer]
direction TB
D[ClawLoops Control Plane]
end
subgraph L3[Orchestration Layer]
direction TB
E[Runtime Orchestrator]
F[Runtime Manager]
end
subgraph L4[Runtime Layer]
direction TB
G[Per-user OpenClaw Runtime]
end
subgraph L5[Model Layer]
direction TB
H[Model Service / Credential Proxy]
I[LiteLLM]
J[vLLM / Ollama / Upstream Providers]
end
K[(PostgreSQL)]
A -->|Ingress| B -->|Session check| D
D -->|Desired state| E -->|Lifecycle orchestration| F -->|Start / Stop / Recover| G
D -->|Model access| H --> I --> J
D -->|Platform data| 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;
The diagram presents the five main layers of the ClawLoops system: Entry Layer (Traefik for ingress), Platform Layer (ClawLoops Control Plane), Orchestration Layer (Runtime Orchestrator, Runtime Manager), Runtime Layer (Per-user OpenClaw Runtime), and Model Layer (Model Service, LiteLLM, vLLM/Ollama). It also shows the PostgreSQL database for platform data. The flow depicts user interaction from browser through Traefik to the control plane, which manages runtime orchestration and model access.
Use this diagram when designing or documenting a multi-tenant AI platform that requires robust runtime orchestration, secure model access, and clear separation of concerns for scalability and governance. It's suitable for understanding how user requests are routed, runtimes are managed, and AI models are accessed.
This architecture can be adapted by swapping components like Traefik for other API gateways (e.g., Nginx, Envoy), replacing PostgreSQL with different database solutions, or integrating alternative model serving frameworks beyond vLLM/Ollama. The runtime orchestration can be extended to support various container technologies (e.g., Kubernetes, serverless functions), and the model layer can incorporate custom model APIs or additional security proxies.