Building Multi-Agent Systems: A Practical Guide to Kanban-Based Collaboration
This guide explains why a single AI agent often fails as task complexity grows and how a multi-agent approach trades role boundaries for more deterministic output. It defines three core concepts—agents, profiles, and a Kanban board—then walks through a four-step build process, common collaboration topologies, dependency orchestration, and a troubleshooting checklist for issues such as role overlap, context leakage, and non-atomic state writes. Cloud deployment guidance is also included.
1. Why a Single Agent Is Not Enough: From “Universal Assistant” to Specialized Roles
As AI coding tools and automation assistants become widespread, a common mistake is to hand every requirement to a single agent and expect it to handle architecture, write code, run tests, and manage operations all at once. In practice, the opposite happens: context bloat, conflicting instructions, and role drift cause output quality to degrade quickly as task complexity increases.
The core idea behind a multi-agent approach is not simply opening more windows. It is trading role boundaries for determinism. Each agent holds only a trimmed context, a clearly scoped set of tool permissions, and a stable set of behavioral rules, which keeps output quality high within its local scope. A task scheduling layer then assembles those local results into a complete deliverable.
To put this approach into practice, you first need to clarify three foundational concepts: the agent, the profile, and the Kanban board.
2. Rigorous Definitions of the Three Core Concepts
2.1 Agent: An Execution Unit with an Independent Context
The agent is the role that actually does the work. Its independence shows up in three dimensions:
- Persona and instructions: determine how it reasons, what format it outputs in, and how it resolves ambiguity;
- Skills and tool permissions: determine what it can read, what it can write, and whether it can run commands or access external resources;
- Memory and session state: determine how much history it retains and at what granularity that history is compressed.
Independence brings isolation: one agent’s failure, noise, or wrong assumptions do not directly contaminate another agent’s context.
2.2 Profile: A Versionable Role Definition
A profile is the agent’s “identity credential plus instruction manual.” It typically contains a role description, a tool allowlist, a memory policy, output specifications, and default parameters. Its engineering value lies in three properties:
- Reusable: the same profile can be loaded repeatedly across different tasks;
- Versionable: once profiles live in a code repository, changes to role behavior can be managed through review and rollback;
- Switchable: switching profiles is equivalent to swapping the execution role, not rewriting the system.
A recommended profile layout (pseudo-config, structure only):
profile:name: reviewerrole: Code reviewer, focused only on correctness and maintainabilitytools: [read_file, list_dir, report]memory: { window: 8, summarize: true }output: { format: markdown, sections: [risks, suggestions, conclusion] }
2.3 Kanban Board: The Scheduling and Visualization Layer for Multi-Agent Collaboration
The Kanban board is a shared whiteboard that makes the flow of work explicit as tasks move from “To Do” to “In Progress” to “Done.” It addresses the hardest part of a multi-agent system: coordination. Its value concentrates in four areas:
- Visibility: at any moment you can see who is doing what and where things are stuck;
- Persistence: task state is stored externally, so progress survives process restarts;
- Dependency flow: tasks can declare prerequisites and only become actionable once dependencies are satisfied;
- Load balancing: claim and release mechanisms prevent multiple agents from working the same task.
3. A Four-Step Method for Building a Multi-Agent System
Step 1: Split Roles by Cognitive Load, Not by Tech Stack
A typical signal of a bad split is heavy vocabulary overlap between two agents’ role descriptions. Divide by cognitive mode instead—for example, planner, implementer, reviewer, and verifier. The planner produces a structured breakdown, the implementer makes only local changes, the reviewer is read-only, and the verifier builds test cases and reproduces issues. Separating read and write permissions matters especially: it significantly reduces self-confirmation bias.
Step 2: Write a Minimal but Complete Profile for Each Role
A profile is not better for being longer. An effective profile usually contains only four blocks: goal boundaries, prohibitions, tool allowlist, and output contract. The “prohibitions” block delivers the highest payoff—for example, stating explicitly that “the reviewer must not modify files” eliminates out-of-scope behavior at the source.
Step 3: Design the State Machine for Task Cards
Each card should carry a fixed set of fields: title, goal, acceptance criteria, required skills, dependent cards, and timeout policy. Acceptance criteria must be decidable—for example, “new test cases cover both the empty-input and the oversized-input branches,” not “code quality improves.”
[To Do] --claim--> [In Progress] --submit for review--> [In Review] --pass--> [Done]| |+---- timeout/failure --> [Blocked] <----+
Step 4: Add an Orchestration Loop to Make Collaboration Actually Run
The orchestrator can itself be a lightweight agent. It produces no business content directly; it only pulls pending cards, matches skills, dispatches cards, collects results, and advances state. A minimal loop looks like this:
while True:card = board.pull_ready() # cards whose dependencies are satisfiedif card is None:breakagent = registry.match(card.skill) # match a profile by skillresult = agent.run(card) # load the profile and executeboard.transition(card, result) # transition state based on acceptance criteria
4. Collaboration Patterns and Dependency Orchestration
There are three common collaboration topologies, chosen per scenario:
- Pipeline: plan → implement → review → verify, suited to change tasks with clear requirements;
- Hub-and-spoke: the orchestrator dispatches centrally while multiple executors handle independent subtasks in parallel;
- Debate: two roles reach opposing conclusions on the same proposal and an adjudicator role converges them, suited to architecture selection.
The key principle of dependency orchestration is to surface blockers as early as possible. If a card stays blocked for a long time, trigger an alert rather than waiting silently; also set timeouts and retry limits for long-running tasks to avoid infinite loops consuming resources.
5. Common Pitfalls and a Troubleshooting Checklist
- Role overlap: intersecting responsibilities cause duplicated work and conflicting conclusions;
- Context leakage: indiscriminately feeding full history to every role defeats isolation;
- Vague acceptance criteria: cards cannot be judged complete and stay stuck in limbo;
- Non-atomic state writes: concurrent claims create races, requiring claim tokens or optimistic locking;
- Missing observability: combine general-purpose logging services with monitoring and alerting to build metrics for dispatch latency, failure rate, and blocked duration.
When troubleshooting, follow a fixed order: first look at the distribution of blocked cards on the board, then check whether profile permissions exceed their bounds, and finally examine whether the memory compression policy drops critical constraints.
6. Deployment Suggestions on Baidu AI Cloud
To deploy this design in the cloud, general cloud product categories can cover each stage: a container platform hosts the runtime for the orchestrator and executors, object storage holds profiles and artifacts, a message queue distributes card events and smooths out spikes, and logging plus monitoring and alerting provide end-to-end observability. Baidu AI Cloud offers corresponding capabilities in these general categories, and teams can adopt them incrementally—first get the state machine running on a single machine, then migrate to a managed runtime.
7. Conclusion
The complexity of a multi-agent system does not come from the number of agents but from whether boundaries are clear, state is externalized, and acceptance is decidable. Split roles correctly, keep profiles small, and fix the Kanban state machine, and collaboration turns from guesswork into an engineering process that is measurable and reproducible.
