Multi-Agent Configuration in Practice: A Guide to Single-Bot and Multi-Bot Architectures
This guide explains how to configure multi-agent systems using two practical patterns: single-bot multi-agent and multi-bot multi-agent. It covers why role overload pushes teams toward a dispatcher-plus-specialists design, how to choose an entry channel with group-chat support, how the main agent should route and consolidate results, and how to isolate context and permissions. You will also find selection criteria, a side-by-side comparison, a six-step rollout process, and fixes for common failures such as routing drift, context pollution, and timeout-prone long chains.
1. Why a Multi-Agent Architecture
A single agent handling open-ended tasks often has to cover intent recognition, knowledge retrieval, tool invocation, result validation, and response phrasing all at once. This overload has three direct consequences: the prompt keeps growing and starts to conflict with itself; an oversized tool set lowers selection accuracy; and the context window gets crowded out by irrelevant information, so reasoning quality degrades.
The core idea of a multi-agent architecture is to split “an assistant that does everything” into “one dispatcher plus several specialized executors.” The main agent understands user intent, breaks down the task, decides who should execute it, and aggregates the output. Each sub-agent holds its own prompt, knowledge scope, and tool permissions, and only runs when it is called. This structure buys you maintainability (changing logic in one domain does not affect the whole system), observability (each call has a clear boundary, which makes problems easier to locate), and extensibility (a new capability is just a new sub-agent).
It is worth stressing that more agents is not better. Adding agents introduces extra routing decisions and link latency, and it lengthens the debugging path. The more reliable engineering rule is this: split into separate agents only when different task domains genuinely conflict in their prompts, knowledge bases, or permissions.
2. Pattern One: Single Bot, Multiple Agents
In the single-bot pattern, only one conversational entry point (the bot) is connected. That entry point is bound to the main agent, which has N sub-agents mounted behind it, where N is determined by actual business needs.
2.1 Constraints on Channel Selection
The first hard requirement for the entry channel is whether it supports group chats and member context. In a group chat, messages contain multiple speakers, reply relationships, and @mentions, so the channel must reliably provide basic fields such as the group identifier, sender identifier, and message type. If a channel only supports one-to-one direct messages, the collaborative value of multiple agents is greatly reduced, because many tasks inherently depend on multi-person coordination and role distinction. So during selection, first confirm how well the channel supports group chats, message callbacks, @triggers, and rich text or card messages, then evaluate integration cost.
2.2 The Main Agent’s Routing Responsibility
The main agent is essentially a decision maker, and its prompt should focus on three things: classifying intent, selecting a sub-agent, and integrating results. It helps to maintain a structured capability list that spells out where each sub-agent applies, where it does not, and what input fields it needs, for example:
{"agents": [{"name": "data_query", "when": "Metrics lookup or report generation is needed", "input": ["time range", "metric name"]},{"name": "ticket", "when": "A ticket needs to be created or routed", "input": ["problem description", "priority"]},{"name": "kb_answer", "when": "General policy and process questions", "input": ["original question"]}]}
When intent is unclear or spans multiple domains, the right move is to have the main agent proactively ask for clarification or invoke sub-agents sequentially in an orchestrated chain, rather than picking one at random.
2.3 Context and Permission Isolation
In the single-bot pattern, all sub-agents share the same entry point, so you must explicitly distinguish “the currently active sub-agent” from “which sub-agent earlier turns belonged to” in the session state. A common approach is to keep a separate session identifier for each sub-agent and pass only the minimal necessary context summary on each routing decision, instead of forwarding the entire history. For permissions, follow the least-privilege principle: give a sub-agent only the tools and knowledge sets within its responsibility, so that a sub-agent compromised by injected input cannot gain access to all data.
3. Pattern Two: Multiple Bots, Multiple Agents
The multi-bot pattern generalizes the single-bot pattern: the main agent and each sub-agent are each bound to their own entry point, forming isolated channels with a one-to-one mapping. Once you understand the single-bot pattern, this one comes down to two points: the mapping relationship and the collaboration protocol.
3.1 When to Use It
The multi-bot approach fits better when different task domains serve different audiences, need different visibility scopes, or run on different service hours. For example, a consultation entry for external users should be separated from an operations entry for internal members to avoid leaking internal information. Likewise, if a sub-agent needs to occupy a high-traffic group for a long time, a dedicated entry prevents messages from interfering with each other.
3.2 Designing the Collaboration Protocol
The complexity of multiple bots concentrates in cross-bot collaboration. The recommendation is to have the main agent do all orchestration while sub-agents never call each other directly, forming a star topology rather than a mesh. This keeps the call chain predictable and failures easy to locate. When passing information across bots, send only structured results (status, conclusions, necessary references) rather than raw long text, to keep latency and cost under control.
3.3 Consistency
Multiple entry points mean multiple copies of session state, so you need to agree on a unified user identity identifier and an idempotency strategy to prevent the same request from being executed twice through two entries. Write-operation tools in particular need a well-designed idempotency key.
4. Comparison and Selection Guidance
| Dimension | Single Bot, Multiple Agents | Multiple Bots, Multiple Agents |
|---|---|---|
| Integration cost | Low, one-time integration | Higher, configured one by one |
| Isolation | Logical isolation within the session | Natural isolation at the channel level |
| Routing complexity | Concentrated in the main agent | Requires an extra collaboration protocol |
| Suitable scale | Small to medium, internal coordination | Multiple audiences, multiple permission boundaries |
The suggested order is: first verify that the single-bot pattern can complete the business loop, then evolve to the multi-bot pattern once a clear isolation requirement appears. Most teams can meet their needs with the single-bot pattern alone, and adopting a complex topology too early only adds operational overhead.
5. Implementation Steps and Common Problems
- Inventory the requirements: list the task domains and note each domain’s inputs, outputs, permissions, and call frequency.
- Consolidate capabilities: merge domains whose prompts overlap heavily, and keep the number of agents at the necessary minimum.
- Validate the entry point: confirm the channel’s support for group chats and message fields, then decide between single bot and multiple bots.
- Layer the prompts: the main agent holds routing and integration rules, sub-agents hold domain rules, so the rules do not contaminate each other.
- Build observability: log the selected sub-agent, elapsed time, and failure reason for each routing decision, and set thresholds with your logging service and monitoring alerts.
- Roll out gradually and keep a rollback path: validate in a small group first, and keep a switch that falls back to single-agent mode in one step.
There are three common problems. The first is routing drift, where sub-agent selection becomes unstable; this usually comes from overlapping capability descriptions and is fixed by rewriting the boundary descriptions. The second is context pollution, where answers miss the question; tighten the scope of forwarded context. The third is timeouts caused by an overly long chain; change sequential orchestration into parallel execution with result merging, and set a per-hop timeout.
6. Conclusion
The value of a multi-agent architecture lies in separating responsibilities, not in stacking up agent counts. Master the two patterns, single bot with multiple agents and multiple bots with multiple agents, and combine them with clear routing rules, strict context and permission isolation, and thorough logging and alerting, and you can cover most business scenarios at relatively low complexity. If you need higher concurrency and finer-grained resource isolation, you can build on this foundation with general cloud capabilities such as container platforms, message queues, and object storage to achieve elastic scaling and state persistence.
