AI Strategy

Architecture of Autonomous Execution: The Kuan Orchestrator Loop

The transition from "AI-assisted" to "AI-autonomous" systems requires a fundamental shift in architecture. Instead of treating Large Language Models (LLMs) as simple conversational interfaces, we must treat them as reasoning engines within a deterministic feedback loop.

This post explores the technical architecture of KuanAI’s autonomous execution system, centered around the Kuan Kanban Manager and the Orchestrator Operational Loop.

1. System Architecture Overview

The system is bifurcated into two distinct planes:

A. The Control Plane: Kuan Kanban Manager

The "Brain" of the project is a lightweight Node.js service backed by SQLite (better-sqlite3).

  • Deterministic State Store: Unlike non-deterministic LLM memory, SQLite provide a stable, queryable source of truth for all project tasks.
  • RESTful Interface: Exposes standardized endpoints (/api/projects, /api/tasks) that allow agents to transition global project states through a four-column pipeline: ToDo → In Progress → Review → Done.

B. The Execution Plane: Agentic Worker Teams

The work is performed by specialized sub-agents (e.g., SEO Optimization, Content Generation). These agents are restricted to specific "Technical Scopes" and are governed by the Orchestrator.

2. The Orchestrator Operational Loop

The Kuan Orchestrator doesn't "manage" tasks; it executes a Finite State Machine logic through a recurring operational cycle.

Phase 1: Perception & State Scanning

The Orchestrator performs a recursive scan of the entire environment:

  • Global Plans: PLAN.md (Strategic objectives).
  • Current State: Kuan Kanban Manager (Active tasks).
  • Execution Log: PROGRESS.md (Traceable audit trail).

Phase 2: Diagnosis & Gap Detection

The diagnostic module identifies inconsistencies between the Strategic Plan and the Current State. It detects:

  • Coverage Gaps: Strategic pillars in PLAN.md without corresponding active tasks.
  • Latent Risks: Technical debt, such as hardcoded secrets or missing report structures.
  • Blockers: Bottlenecks in the dependency tree.

Phase 3: Decision & Atomic Delegation

Once gaps are identified, the Orchestrator creates Zero-Ambiguity Task Objects. These are not vague prompts; they are structured JSON payloads sent to the Kanban API containing:

  • Technical Scope: Exact file paths and current states.
  • Success Criteria: Mandatory validation checklists.
  • Evidence Requirements: Logs and specific output formats.

Phase 4: Verification & Recovery

After a task is marked Done, the Orchestrator re-enters the perception phase to validate the evidence. If the output fails the checklist, the task is automatically reopened or reassigned.

3. Technical Wins: Automated Reporting MVP

We recently delivered a fully automated reporting pipeline. A Node.js worker (reporting_weekly.js) is triggered by the Orchestrator to:

  1. Query the SQLite database for current KPIs.
  2. Compute task distribution and identify overdue items.
  3. Generate a Markdown-based evidence report (/reports/weekly_YYYY-MM-DD.md).
  4. Update PROGRESS.md to maintain the audit trail.

4. Scalability and Roadmap

By decoupling the Reasoning Plane (LLM) from the State Plane (SQLite), we achieve a self-healing system where agents can operate 24/7 with high reliability. Our next phase involves integrating telemetry from Umami Analytics directly into Phase 1 (Perception), enabling the system to autonomously adjust strategy based on live performance data.


KuanAI is building the foundation for the next generation of autonomous digital production. For more architecture deep dives, follow our technical series.

psychology
Cognitive Agents
auto_awesome
Smart Automation
robot_2
AI Infrastructure
bolt
Neural Speed
hub
Seamless Integration
shield_with_heart
Ethical AI

See other articles