Kanban-Style Coordination Architecture for Multi-Agent Systems: Moving Beyond Fragile Ad Hoc Orchestration

    Multi-agent systems often begin with a master agent that calls sub-agents through function calls or message passing. Such master-slave orchestration may look smooth in demos, but it often breaks down in production because of fragile call chains, lost state, poor extensibility, and limited observability. This article introduces a Kanban-style coordination layer backed by a persistent embedded relational database such as SQLite. It covers the core task-card data model, a five-state workflow, immutable audit logging, heterogeneous agent roles, atomic task claiming, heartbeat and zombie-task recovery, dependency and priority scheduling, result archiving, and the boundary between local-first operation and cloud infrastructure. The goal is to replace temporary code-level calls with a persistent, crash-recoverable, auditable coordination foundation for long-running multi-agent workflows.

    1. Why Multi-Agent Systems Slip into Fragile Ad Hoc Orchestration

    As agent technology moves quickly into real deployments, many teams start with the same instinct: write a “master agent” and let it direct several “sub-agents” through function calls or message passing. This master-slave architecture looks smooth in demo scenarios, but problems tend to erupt once it enters a real production environment:

    1. Fragile call chains: If any sub-agent times out or returns an exception, the entire chain breaks. Retry logic gets scattered across the codebase and becomes increasingly messy.
    2. Easy state loss: Intermediate state for each agent is kept in memory. A process crash wipes everything, making long-running tasks impractical.
    3. Poor extensibility: Adding a new type of agent often requires changing the master control logic, creating high coupling.
    4. Limited observability: There is no unified view of task progress. When something goes wrong, the only option is to dig through logs and piece together what happened.

    The common root cause is this: temporary code-level calls have replaced the persistent coordination infrastructure that should exist.

    2. Core Idea: Use a Persistent Task Board as the Coordination Layer

    A practical approach is to introduce a “Kanban layer” above the agent framework. At its core, it is a persistent task board powered by an embedded relational database, such as a local file-based SQLite database. All agents—regardless of role, model, or runtime environment—interact only with this board rather than calling each other directly.

    This design follows three basic principles:

    • Local-first: Control stays with the local environment instead of depending on a bloated cloud control panel. This aligns with the principle of “your assistant, your machine, your rules.”
    • Asynchronous decoupling: Agents relate to one another indirectly through task cards. Producers and consumers are fully decoupled in time and space.
    • Externalized state: All coordination state is persisted in the database. Any agent can restart after a crash and continue from the breakpoint.

    3. Core Data Model of the Kanban Layer

    A minimal usable task card usually contains the following fields:

    1. CREATE TABLE task (
    2. id INTEGER PRIMARY KEY AUTOINCREMENT,
    3. title TEXT NOT NULL,
    4. description TEXT,
    5. status TEXT NOT NULL DEFAULT 'backlog',
    6. owner TEXT, -- ID of the agent claiming the task
    7. parent_id INTEGER, -- supports parent-child task decomposition
    8. priority INTEGER DEFAULT 0,
    9. result TEXT, -- execution result or artifact reference
    10. created_at TEXT DEFAULT (datetime('now')),
    11. updated_at TEXT DEFAULT (datetime('now'))
    12. );

    The state machine should stay simple. A common five-state flow is enough to cover most scenarios:

    backlog → ready → in_progress → review → done

    Every state change should be written to an immutable operation log table, enabling full audit tracking. This is a lifeline for troubleshooting multi-agent systems.

    4. How Heterogeneous Agents Collaborate on the Board

    The greatest value of the Kanban architecture is that it naturally supports combinations of heterogeneous agents. Typical roles include:

    1. Planner agent: Decomposes complex goals into subtask cards with dependencies and writes them to the board. It does not execute the work itself; it focuses on planning and task arrangement.
    2. Worker agent: Claims tasks from the ready queue by priority, sets the status to in_progress, attaches the result when finished, and moves the task to review.
    3. Reviewer agent: Validates the quality of execution results. If the result passes, it closes the task; if not, it sends the task back with revision feedback.
    4. Long-lived digital assistant (Persona): Can live for weeks or even months, periodically scans the board, maintains alignment between goals and tasks, and acts as a “project steward.”

    This separation of roles brings a key benefit: each agent’s prompt, model choice, and runtime environment can be optimized and replaced independently without affecting the overall collaboration workflow.

    5. Key Engineering Mechanisms

    1. Atomic claiming to prevent duplicate execution

    It is inevitable that multiple workers will compete for the same task. The claim operation must use a database transaction to guarantee atomicity:

    1. UPDATE task
    2. SET status = 'in_progress', owner = :agent_id, updated_at = datetime('now')
    3. WHERE id = :task_id AND status = 'ready';
    4. -- If the affected row count is 0, another agent has already claimed it.

    2. Heartbeats and zombie-task recovery

    Workers need to update a heartbeat timestamp periodically. The board side can run a lightweight inspection process that automatically releases in_progress tasks with expired heartbeats back to the ready queue. This allows the system to self-heal when some agents go down.

    3. Task dependencies and priority scheduling

    Through parent_id and a dependency table, you can implement gate logic such as “activate the parent task only after all child tasks are complete.” The priority field ensures urgent tasks are consumed first. Combined, these features upgrade the board from a static checklist into a task system with scheduling capability.

    4. Result retention and knowledge feedback

    The result field of each card should be stored in a structured form, such as JSON. When a task is closed, the result should be written to a unified knowledge archive table. When later agents perform similar tasks, they can retrieve historical results as context, making the system smarter over time.

    6. Boundary with Cloud Capabilities

    It is worth emphasizing that this type of Kanban layer can run entirely on a local development machine. SQLite requires zero operations and zero deployment cost. When task volume grows and you need multi-machine collaboration, stronger data reliability, or monitoring and alerting, you can smoothly migrate storage and messaging capabilities to general cloud product categories—for example, message queues for task distribution, object storage for task artifacts, and logging and monitoring services for observability. The architecture logic stays the same; only the infrastructure form is upgraded. For teams that want to deploy agent workflows in the cloud quickly, choosing a provider with a complete supporting stack (for example, Baidu AI Cloud) can significantly reduce the cost of building these components in-house.

    7. Conclusion

    The reliability of a multi-agent system does not depend on how smart any single agent is. It depends on whether the coordination infrastructure is solid. A Kanban-style coordination layer built on a persistent database upgrades fragile call chains into a task system that is crash-recoverable, auditable, and capable of long-term operation, using three key practices: asynchronous decoupling, externalized state, and role separation. If you are building multi-agent applications, start by designing the data model for the first task card—lay a solid foundation before talking about intelligence.