Documentation

Architecture

ClawPilot is a two-layer system: an operational layer for task execution with full transparency, and a strategic layer for multi-agent orchestration.

Overview

Every design decision in ClawPilot is driven by one principle: no agent action should be invisible. Every task carries a confidence score, every decision is logged before execution, and every agent can be replaced without rewriting your workflows.

Layer 1 — Operational

Hub + Kanban + Logs. Single-agent task execution with confidence scoring and immutable audit trail.

Layer 2 — Strategic

Workflow engine, agent registry, smart router, skills marketplace. Multi-agent orchestration with cost and quality tracking.

Layer 1 — Operational

The operational layer is the heart of ClawPilot. It provides three surfaces that work together:

Hub (Dashboard)

The Hub is the control plane. It exposes a real-time SSE stream so every agent action appears instantly. Quick actions let you create tasks, check system health, and view live metrics without leaving the dashboard.

Kanban (Task Interface)

Every task lives in the Kanban board. Tasks move through four stages: Backlog → In Progress → Review → Done. Dependency enforcement ensures no task can start until its upstream dependencies are complete. Each task carries a confidence score (0–1) calculated from:

Logs (Audit Trail)

Every agent action is logged before execution. The log entry is immutable once written. Each entry contains: timestamp, agent identity, action type, confidence score, and message. Three confidence tiers:

> 0.80 — Auto-proceed 0.50–0.80 — Verify before archiving < 0.50 — Manual review

Write-Through Guarantee

State changes flow through all layers in a fixed order:

Agent Action
  → 1. Log action (immutable write)
  → 2. Update Kanban (metadata + status)
  → 3. Rebuild .md source-of-truth (vault)
  → 4. Hub polls / receives SSE event
  → 5. Dashboard refreshes (within 5s)

Layer 2 — Strategic

The strategic layer adds multi-agent orchestration on top of the operational layer.

Agent Registry

All available agents (OpenClaw, Claude Code, Gemini, custom) register with their capabilities, health status, cost per token, and quality score. The registry monitors uptime and updates metrics continuously.

Workflow Engine

Workflows are composed of steps, each assigned to an agent. Steps can run sequentially, in parallel, or with branching logic. Output of one step is available to the next via ${{ steps.X.output }}.

name: "Draft-Review-Polish"
steps:
  - agent: openclaw
    task: "Write initial implementation"

  - agent: claude-code
    task: "Review and suggest improvements"
    context:
      code: ${{ steps[0].output }}

  - agent: openclaw
    task: "Refactor based on feedback"
    context:
      feedback: ${{ steps[1].output }}

mode: sequential
aggregation: last

Smart Router

The router selects the best agent for each task based on a configurable policy: cheapest agent that meets the quality threshold. You set the minimum acceptable quality, and the router picks the most cost-effective agent that satisfies it.

Agent Latency Cost Quality
OpenClaw ~100ms Free 85%
Claude Code ~500ms $0.01/task 95%
Gemini ~300ms Cheap 80%

Skills Marketplace

Skills are reusable workflow packages. A skill bundles a prompt strategy, agent selection policy, and quality thresholds into a single installable unit. See the Skills documentation for details.

Data Flow

Strategic Layer              Operational Layer         Source of Truth
─────────────────            ─────────────────         ────────────────
Workflow definition
Agent params + routing   →  Task creation (Kanban)
                                  ↓
                         Confidence check
                                  ↓
                         Log action (immutable)
                                  ↓
Agent selection          Agent execution         →   .md vault files
                                  ↓
Workflow aggregation     Result → Kanban
                                  ↓
Metrics update           Hub displays (SSE)