Documentation

API Reference

REST APIs for Kanban task management, Logs streaming, and the agent adapter interface.

Base URL

http://localhost:8088   # local
https://lab.dombot.tech  # VPS (protected by Authelia)

All endpoints return JSON. Authentication is handled by Authelia (OIDC). Pass the session cookie or use Authorization: Bearer <token> for agent-to-agent calls.

Kanban API

Task lifecycle management. All mutations are write-through: they update the Kanban state, append to the audit log, and rebuild the .md source-of-truth atomically.

List tasks

GET /api/tasks?status=backlog|progress|review|done&agent=<id>
{
  "tasks": [
    {
      "id": "task-001",
      "title": "Analyze morning report",
      "status": "progress",
      "confidence": 0.87,
      "priority": "high",
      "agent": "claude-code",
      "dependencies": [],
      "created_at": "2026-03-17T08:00:01Z",
      "updated_at": "2026-03-17T08:14:32Z"
    }
  ]
}

Create task

POST /api/tasks
Content-Type: application/json

{
  "title": "Run token audit",
  "priority": "high",          // low | medium | high | critical
  "dependencies": ["task-001"], // task IDs that must be done first
  "agent_hint": "openclaw"     // preferred agent (optional)
}

Update task status

PATCH /api/tasks/:id
{
  "status": "done",
  "confidence": 0.92,
  "message": "Audit complete — 3 waste sources identified"
}

Delete task

DELETE /api/tasks/:id

Logs API

Append-only audit trail. Log entries are immutable once written.

Append log entry

POST /api/logs
{
  "agent": "claude-code",
  "action": "EXECUTE",         // EXECUTE | VERIFY | SKIP
  "confidence": 0.91,
  "message": "Optimization applied",
  "task_id": "task-001"        // optional
}

Query logs

GET /api/logs?agent=<id>&action=EXECUTE&since=<iso8601>&limit=50
{
  "entries": [
    {
      "id": "log-8823",
      "ts": "2026-03-17T08:14:32Z",
      "agent": "claude-code",
      "action": "EXECUTE",
      "confidence": 0.91,
      "message": "Optimization applied",
      "task_id": "task-001"
    }
  ],
  "total": 342
}

SSE stream (real-time)

GET /api/logs/stream
Accept: text/event-stream

The Hub subscribes to this endpoint. Each new log entry is pushed as a Server-Sent Event. Agents can also subscribe to react to actions taken by other agents.

Agent Adapter Interface

Any agent that implements IAgentAdapter can be registered with ClawPilot. The interface is minimal by design.

interface IAgentAdapter {
  readonly id: string;          // "openclaw" | "claude-code" | "gemini" | custom
  readonly displayName: string;
  readonly costPerTask: number; // USD, 0 = free

  // Health check — called every 30s by the registry
  health(): Promise<{ ok: boolean; latencyMs: number }>;

  // Execute a task — returns output text + confidence
  execute(task: {
    instruction: string;
    context?: Record<string, string>;
    skill?: string;             // skill name to inject
  }): Promise<{
    output: string;
    confidence: number;         // 0–1
    tokensUsed?: number;
  }>;
}

Register an adapter

# In your .env
AGENT_ADAPTERS=openclaw,claude-code,gemini,my-custom-agent

# In your adapter config
CUSTOM_AGENT_ENDPOINT=http://localhost:9001
CUSTOM_AGENT_API_KEY=sk-...

Confidence Score Calculation

The confidence score returned by an agent is combined with Kanban metadata to compute the final score used for auto-proceed / verify / manual-review decisions:

final_confidence = (
  agent_confidence   * 0.40  +  // agent's self-assessment
  pattern_match      * 0.25  +  // similarity to past successful tasks
  dependency_check   * 0.20  +  // all upstream tasks done and successful
  approval_history   * 0.15     // human approval rate for this agent/task-type
)