Building a Digital Workforce: The Ultimate Guide to Multi-Agent Collaboration with OpenClaw and Feishu
Have you ever installed OpenClaw, only to find yourself staring at a screen, wondering what to do next? Many users experience a common frustration: after following the initial setup, the software feels like just another “chatbox” rather than the revolutionary automation tool they were promised. You might see others running “lobster” (OpenClaw) teams that work 24/7, handling complex tasks with a single command, while yours remains a simple interface for basic questions.
The secret to moving from a “user” to a “boss” lies in Multi-Agent Collaboration. In the world of OpenClaw, the real power is unlocked when you configure multiple agents with specialized skills and let them work together. This guide will walk you through the transition from a beginner to a manager of a “Digital Team” within Feishu (Lark), providing you with a complete roadmap for building your own automated workforce.
1. What is the “Digital Team” Concept in OpenClaw?
To truly leverage OpenClaw, you must stop thinking of the AI as a single entity. Instead, view it as a company where you have successfully hired four specialized employees:
-
Xiaozhi (The Boss): The general commander. Xiaozhi is responsible for overall planning, task decomposition, and distribution. -
Tantan (The Researcher): An intelligence expert. Tantan specializes in deep information mining and data gathering. -
Wenwen (The Writer): A content creator. Wenwen excels at linguistic expression and transforming data into engaging text. -
Geek (The Coder): The technical lead. Geek focuses on code development, scriptwriting, and technical documentation.
Each team member is an independent Agent. To ensure they operate efficiently without interference, every employee is equipped with their own:
-
Workspace (The Desk): Stores specific work standards ( instructions), persona definitions (profile), reference materials (documents), and personal notes (memory/). -
Agent Directory (The ID Card): Contains unique identity authentication and login credentials. -
Sessions (The Logbook): Keeps an independent history of communications with different users or other agents.
2. Setting Up Your First Agent: The Foundation
Before you can lead a team, you need to establish your first functional agent.
2.1 Environmental Preparation
Using a Mac system as an example, open your terminal and check if the environment is ready by verifying the version number. If the version number appears, your installation is successful. If there is no response, you may need to re-examine your initial installation steps.
2.2 Initial Configuration
Run the initialization command to start the setup wizard:
openclaw init
Follow the prompts in the wizard:
-
Enter yesto begin the configuration. -
Select QuickStartfor a streamlined setup. -
Choose your preferred AI model (OpenAI, Claude, or Gemini are recommended). -
Skip the advanced options for now; these can be adjusted later.
Once finished, you have your first working Agent!
3. How to Build Your Agent Team Architecture
3.1 Understanding the Directory Logic
In OpenClaw, a “company” structure looks like this in your file system:
3.2 Two Ways to “Hire” New Agents
There are two primary methods to expand your team:
-
Method 1: Command Line Wizard: This is the simplest approach. The wizard automatically sets up the workspace, issues identity cards, and configures permissions. -
Method 2: Manual Configuration: You can directly edit the ~/.openclaw/openclaw.jsonfile to define new agents and their parameters.
3.3 Critical Warnings for Multi-Agent Setup
To avoid system conflicts, keep these three rules in mind:
-
Unique Authentication: Every Agent must have its own auth-profiles.json. Never share identities. -
Isolated Workspaces: Different Agents must use different agentDirpaths. Using the same directory will cause authentication conflicts. -
Skill Hierarchy: Distinguish between personal skills (located in the agent’s workspace skills/folder) and shared skills (located in~/.openclaw/skills/).
4. Integrating with Feishu: Bringing Agents Online
To make your agents work in a real business environment, you must connect them to Feishu.
4.1 Step-by-Step Feishu Bot Creation
For each agent (Xiaozhi, Tantan, Wenwen, Geek), you need to create an independent “Bot” application:
-
Log in: Access the Feishu Open Platform (open.feishu.cn). -
Create App: Select “Create custom app” for your enterprise. -
Identify: Obtain the App ID, App Secret, Verification Token, and Encrypt Key for each bot. -
Enable Bot Capabilities: In the “Bot” section, turn on the bot feature and configure the following essential permissions: -
Get basic user info. -
Get and update group messages. -
Read and send messages in single/group chats. -
Receive @memessages or direct messages. -
Upload/Download images or file resources.
-
-
Event Subscription: Change the subscription method to “Long connection” and add the “Receive Message” event. -
Release: Create a version and publish the app.
4.2 Configuring the Feishu Channel in OpenClaw
For each Agent, run the following command to link it to its respective Feishu Bot:
openclaw-feishu-auth
Enter the specific App ID and App Secret for that agent as prompted.
4.3 Establishing the Virtual Office Space
To facilitate communication, create two types of Feishu groups:
-
The Main Workspace (Executive Office): Create a group and add only the Xiaozhi Bot. This is where you, the boss, issue commands. -
The Internal Collaboration Group (The Staff Room): Create a second group and add all four bots (Xiaozhi, Tantan, Wenwen, Geek). You can join this group to observe the collaboration or intervene if necessary.
Note: You can find group IDs using the sessions_list command in OpenClaw or via the Feishu API.
5. Master the Routing Mechanism: Who Does What?
How does the system know which agent should respond to a specific message? This is handled by Bindings, the routing mechanism.
5.1 How Bindings Work
Bindings are rules that distribute incoming messages to the correct Agent based on priority:
-
Precision Match: Targets a specific User ID or Group ID. -
Group Match: Matches messages from a specific group chat. -
Account Match: Matches messages sent to a specific Bot account. -
Channel Match: A broad match for all messages within a communication channel. -
Default Fallback: If no rules match, the message goes to the default Agent.
By properly configuring these, you ensure that requests in the “Executive Office” go to Xiaozhi, while technical discussions in the “Staff Room” are handled by the appropriate specialist.
6. Internal Communication: Activating the “Inner Line”
A team that cannot talk to each other is just a group of individuals. To achieve true collaboration, you must enable agent-to-agent communication.
6.1 Enabling the Feature
This feature is disabled by default. You must enable it in your configuration:
agentToAgent.enabled: true
6.2 Setting Visibility Levels
By default, agents can only see their own logs. To allow teamwork, adjust the visibility settings:
-
“self”: Complete isolation. Agents only see their own sessions. -
“tree”: (Default) Agents see their own sessions and sub-tasks derived from them. -
“agent”: Agents see all sessions belonging to the same Agent profile. -
“all”: Open environment. All Agents can see all sessions.
6.3 Methods for Sending Internal Messages
There are two primary ways to distribute tasks within the team:
Think of sessions_send like texting a colleague at their desk, while sessions_spawn is like hiring a temporary contractor for a one-off job.
7. The Shared Knowledge Base: The Team’s Central Brain
Internal messaging is good, but information sharing is better. If Tantan finishes a research report, the rest of the team needs to see it without Xiaozhi having to manually forward it. The solution is a Shared Knowledge Base.
7.1 Creating the Shared Directory Structure
Set up a folder structure that all members can access:
shared/
├── notes/
│ ├── research/ (Tantan's reports)
│ ├── drafts/ (Wenwen's drafts)
│ └── code/ (Geek's documentation)
└── tasks.md (The team's task board)
7.2 Indexing the Knowledge Base
Ensure that every Agent’s memory search can “see” this shared folder by updating their configuration:
memory_search.include: ["shared/"]
Now, when Wenwen is writing, she can use the memory_search tool to find research reports saved by Tantan in the shared/notes/research/ folder.
7.3 Establishing Collaboration Protocols
For the team to function autonomously, you must define their work standards in their instructions:
-
Xiaozhi (Boss): Analyzes the owner’s request, breaks it into sub-tasks, assigns them via sessions_send, and updatesshared/tasks.md. He reports back to the owner once the task is complete. -
Tantan (Researcher): Executes research tasks immediately and saves reports to shared/notes/research/. He updates the task status in the shared board and notifies Xiaozhi. -
Wenwen (Writer): Before writing, she checks shared/notes/for reference material. She saves drafts toshared/notes/drafts/and updates the task board. -
Geek (Coder): Reviews technical docs, saves code to shared/notes/code/, and coordinates with Tantan through Xiaozhi if technical research is needed.
8. Real-World Case Study: Generating an AI Agent Article
Let’s look at how this works in practice. The “Boss” (the user) sends one message in the Feishu main group: “Write a technical article about AI Agents and provide a companion demo script.”
8.1 The Autonomous Workflow
-
Task Decomposition: Xiaozhi receives the request and splits it into two parts: a research/writing task and a coding task. -
Parallel Execution: Xiaozhi uses sessions_sendto tell Tantan to research AI Agent trends and tells Geek to prepare the script structure. -
Information Flow: Tantan saves his findings to the shared directory. Geek saves his code to the shared directory. -
Content Creation: Xiaozhi then prompts Wenwen. Wenwen accesses the shared folder, reads Tantan’s research and Geek’s technical notes, and writes the final article. -
Final Delivery: Xiaozhi monitors the progress via shared/tasks.md. Once Wenwen and Geek are done, Xiaozhi collects the final outputs and sends them back to the user in the main Feishu group.
Throughout this entire process, the user only spoke once. The rest was handled by the autonomous collaboration of the digital team.
9. Best Practices for Long-Term Success
Building the team is just the start. To keep your “Lobster Team” running smoothly, consider these optimization tips:
-
Start Small: Assign simple tasks first and gradually increase complexity as you refine the agents’ instructions. -
Iterative Personalities: Continuously update each Agent’s profileandinstructionsbased on their actual performance. -
Maintain the Board: Ensure all agents strictly follow the rule of updating shared/tasks.mdso you always know the team’s status. -
Knowledge Accumulation: Use the shared/directory to build a permanent library of team assets, making future tasks even faster.
10. Frequently Asked Questions (FAQ)
What is the difference between a normal LLM and an OpenClaw Agent?
A standard LLM is a reactive chatbox. An OpenClaw Agent is a “digital employee” with a specific persona, a persistent memory, specialized tools (skills), and the ability to work autonomously within a team structure.
Why do I need multiple Feishu Bots?
Each bot represents a unique identity. To have agents collaborate, they need individual “handles” in the communication channel so the routing mechanism (Bindings) can correctly direct messages to the right specialist.
Can Agents see each other’s memories?
By default, no. However, you can enable sharing by using a shared directory (like shared/) and configuring the memory_search.include setting to include that path for all agents.
Is “sessions_send” better than “sessions_spawn”?
It depends on the goal. Use sessions_send for ongoing collaboration where context matters. Use sessions_spawn for isolated, one-off tasks where you don’t want to clutter an agent’s main conversation history.
How do I get a group ID in Feishu?
You can use the “Get Group Info” API on the Feishu Open Platform, or more simply, run the sessions_list command within OpenClaw to see the IDs of active sessions.
By following this guide, you are no longer just a user of AI; you are the manager of an intelligent, autonomous workforce. The transition from a simple chat interface to a fully functional Feishu-based digital team is the key to unlocking the true potential of OpenClaw.

