Multi-Agent Orchestration Architecture: A Practical Guide to Persistent Task Boards
This article breaks down why multi-agent systems often become unpredictable and how a persistent task board design solves the problem. You will learn a three-layer architecture separating control, state, and execution, along with the core mechanisms that keep long-running tasks stable: atomic claiming with lease locks, dependency graphs and task state machines, heartbeats, retries, and idempotent execution. It also covers role boundary design to prevent the orchestrator from doing execution work, plus observability and recovery practices, and a minimal-viable starting point for implementation.
1. The Problem: Why Multi-Agent Systems Turn Into a “Slapdash Crew”
When building multi-agent applications, developers usually split out roles such as planner, executor, and reviewer, expecting them to collaborate like a team. In practice, three typical problems show up.
The first is the orchestrator overstepping into execution. The node responsible for coordination is supposed to handle only task decomposition, state evaluation, and process launch. But as model generation capabilities grow, it may directly generate code, write documentation, or carry out concrete operations, blurring role boundaries and making system behavior unpredictable.
The second is unstable lifecycle for long-running tasks. Complex tasks often span multiple stages. If subtasks depend on the main process staying alive, then once the main process exits, the network drops, or the runtime restarts, unfinished subtasks may be terminated passively, causing context loss and duplicated work.
The third is coupling caused by direct communication between agents. If agents call one another through messages, the system forms complex implicit dependencies, and a failure in any single node can trigger cascading blocking that is hard to diagnose.
So the key to multi-agent coordination is not just “making the models talk,” but establishing a clear mechanism for state management, task flow, and failure recovery.
2. Core Idea: Replace Master-Slave Calls With a Persistent Task Board
A workable general design is to abstract the multi-agent coordination layer as a “persistent task board.” The board is not a simple task list; it is the single source of truth for the whole system, recording task status, owner, dependencies, lock information, and execution history.
In this model, agents do not call each other directly. They collaborate asynchronously around the board:
User/control client -> create task -> state layer persists-> scheduler scans runnable tasks-> execution process claims task and writes result-> state layer advances to next stage
This design turns “collaboration relationships” from code calls into “state transitions,” which significantly reduces system coupling. The orchestrator only handles task orchestration, executors only handle assigned work, and reviewers only read results awaiting review, so role boundaries become much clearer.
3. A Three-Layer Decoupled Architecture: Control, State, and Execution
3.1 Control Layer: One Entry Point for Human Instructions
The control layer faces the user and handles task creation, queries, pause, resume, and similar operations. It can take the form of a command-line interface, a chat bot, an admin console, or an automation script entry point.
The control layer should not carry complex business logic. Its core responsibilities are parameter validation, identity confirmation, task submission, and result display. This keeps the user entry point from being bound to execution logic and makes it easier to add different interaction channels later.
3.2 State Layer: A Single Source of Truth
The state layer is the core of the multi-agent system. It typically consists of a local database, a task table, an event log, and a scheduler. The database can be a relational store that supports transactions and concurrency control. The task table should contain at least the following fields:
CREATE TABLE tasks (id TEXT PRIMARY KEY,title TEXT,status TEXT,owner TEXT,dependencies TEXT,lock_until INTEGER,payload TEXT,created_at INTEGER,updated_at INTEGER);
The state layer must guarantee three capabilities: task status is persisted, status changes are transactional, and task claiming is atomic. The scheduler can periodically scan the task table and assign tasks that satisfy their dependencies and have not expired to execution processes.
3.3 Execution Layer: Isolating Different Agents
The execution layer is made up of mutually isolated worker processes. A planning agent can organize material in a draft directory, a coding agent can modify files in a separate code workspace, and a testing agent can run verification in an isolated environment.
Isolation matters because it prevents different roles from polluting each other’s context. Each execution process reads only its own task payload, and when finished writes back a summary, artifact paths, and status to the state layer. If execution fails, only the current task needs to be rolled back, without breaking global state.
4. Key Mechanisms: Keeping Long-Running Tasks Stable
4.1 Atomic Claiming and Lease Locks
When multiple execution processes run at the same time, you must prevent the same task from being claimed twice. A lease lock mechanism works here: when a task is claimed, the executor identifier and an expiration time are written; if the executor crashes, the task becomes available for rescheduling once the lock expires.
if task.status == "ready" and task.lock_until < now:update task set owner = worker_id, lock_until = now + ttlwhere id = task_id and status = "ready"
This mechanism relies on database transactions or conditional updates to ensure that only one executor can successfully claim a task under concurrency.
4.2 Dependency Graph and Task State Machine
Complex tasks should be decomposed into a directed acyclic graph. Each node represents a verifiable step, such as material collection, solution generation, code implementation, test verification, and result aggregation. Statuses can be designed as pending, running, awaiting review, completed, failed, and canceled.
The scheduler only advances legal state transitions, preventing executors from skipping steps arbitrarily. This way, even if one stage fails, the system can recover from the most recent stable state.
4.3 Heartbeats, Retries, and Idempotency
Execution processes should periodically update a heartbeat or the lease time. Task retries must remain idempotent, meaning repeated execution of the same task produces no uncontrolled side effects. For file writes, external requests, or data changes, introduce a unique task ID, a temporary directory, and a commit confirmation mechanism.
5. Role Boundary Design: Stopping the Orchestrator From “Doing the Work”
To keep the top-level control node from overstepping, constrain it explicitly by task type and permission. The orchestrator may only create, split, order, and monitor tasks, and must not modify business artifacts directly; executors may only handle assigned tasks and must not change global priorities; reviewers may only read artifacts and give conclusions.
Enforce this with both prompt constraints and system permissions. At the system level, open different tool sets to different roles: for example, the orchestrator has no code-writing permission, and executors have no task-orchestration permission. This way, even if model output deviates from expectations, the system stays controllable.
6. Observability and Recovery
A multi-agent system must be observable. The state layer should record every status change, the executor identifier, elapsed time, error summary, and artifact location. Operators can use the task board to quickly locate blocking points instead of reading through large amounts of model conversation.
The recovery flow can be designed as follows: after detecting a timed-out task, release the lock and move the task back to pending; send tasks that fail repeatedly into manual review; and run compensation or rollback for tasks that have already produced side effects. With these mechanisms, the system recovers from partial failures instead of restarting as a whole.
7. Practical Advice and Summary
When adopting this kind of architecture, start from a minimal closed loop: first implement the task table, the scheduler, a single executor, and status write-back, then gradually add multi-role isolation, the dependency graph, review nodes, and monitoring alerts. Do not build a complex control panel at the outset; first ensure state consistency and task recoverability.
The essence of multi-agent coordination is not letting multiple models chat freely, but encapsulating uncertainty within a controlled task flow. By decoupling the control, state, and execution layers, and using a persistent task board, atomic claiming, lease locks, and idempotent execution, developers can build agent collaboration systems with clear boundaries, stable operation, and easy extensibility.
