When to Use Multi-Agent
A multi-agent setup is not always better. It shines when you have three or more distinct roles that handle clearly separated workloads:
- Role A: Receives user requests, decides routing, aggregates output
- Role B: Specialized research, web search, summarization
- Role C: Data formatting, spreadsheet updates, report generation
- Role D: (Optional) Security review, permission checks, audit logging
If you only have two roles or overlapping responsibilities, a single agent with skills is usually simpler and easier to maintain.
Architecture Patterns
Main Dispatcher + Specialized Workers
The most reliable pattern is a main dispatcher agent that receives all Feishu messages and delegates to specialized workers:
User message → Dispatcher Agent → Route by intent
├── Research Worker (Tavily, ListenHub)
├── Data Worker (spreadsheet, docs)
└── Format Worker (summarize, export)
The dispatcher does not perform heavy work. It parses intent, selects the right worker, and forwards the task. Workers stay focused on one job type.
Shared Memory vs Independent Context
Shared memory (one knowledge base or doc) works when agents need to build on each other's output: e.g., Researcher writes findings, Formatter restructures them.
Independent context works when agents handle unrelated tasks: e.g., one agent for internal FAQ, another for external support. Each should have its own workspace to avoid cross-talk.
Workspace Isolation
Each agent should have its own workspace when possible:
- Different Feishu group/bot for each logical agent
- Separate folders for documents and outputs
- Clear naming:
OpenClaw-Research,OpenClaw-Data,OpenClaw-Format
Isolation reduces permission creep and makes debugging easier. If one agent misbehaves, it does not affect others.
Binding Configuration
Bind each agent to the right Feishu app and permissions:
# Dispatcher agent config
channels:
feishu:
app_id: <dispatcher-app-id>
app_secret: <secret>
scope:
- im:message
- im:message.group_at_msg
- doc:doc
- doc:sheet
# Worker agent config
channels:
feishu:
app_id: <worker-app-id>
app_secret: <secret>
scope:
- doc:doc
- doc:sheet
- drive:drive
Keep the dispatcher's scope narrow. Workers get only the permissions they need.
Common Mistakes
Too Many Agents Too Soon
Starting with five agents before validating one is a recipe for chaos. Add agents incrementally: first dispatcher + one worker, validate end-to-end, then add more.
Overlapping Permissions
If two agents share the same Feishu app and both write to the same folder, you risk race conditions and duplicate outputs. Prefer one app per agent or strict folder separation.
No Clear Routing Logic
The dispatcher must have explicit rules or a small model call to route. Vague "do what makes sense" logic leads to wrong delegation and user confusion.
Skipping Testing in Isolation
Test each worker in isolation before wiring the dispatcher. Use openclaw run --skill <skill> --prompt "test" to verify behavior.
Quick Checklist
- Define 3+ distinct roles before adding agents
- Implement dispatcher + worker architecture
- Isolate workspaces per agent
- Bind minimal permissions per agent
- Start with one worker, validate, then scale
For Feishu team setup basics, see OpenClaw for Feishu Teams.