Install
openclaw skills install advanced-collab-protocolEnforces multi-agent pipeline collaboration rules to prevent infinite loops, ensure file handovers via workspace, enable cross-channel messaging, and handle...
openclaw skills install advanced-collab-protocolThis skill defines the core collaborative rules for OpenClaw multi-agent pipelines (swarms). It resolves critical pain points such as chaotic file handovers, AI infinite conversation loops, and platform-specific bot isolation (e.g., Telegram bots unable to see each other's messages).
Before executing this protocol, the system must meet the following configurations:
Required Tool Permissions (Least Privilege):
read, write, sessions_send, and message."tools.profile": "full" for agents solely meant for chat collaboration.Agent-to-Agent Communication:
tools.agentToAgent.enabled must be true.tools.agentToAgent.allow array.sessions_send can successfully route messages to target agents.Never output more than 300 words of scripts, prompts, code, or JSON arrays directly in a group chat.
/root/.openclaw/shared/<filename>.md. Do not write outside this directory to prevent path traversal risks.When you receive a task assignment containing a local file path:
/root/.openclaw/shared/ directory. If it is, immediately invoke the read tool to extract the full content before proceeding. Reject any paths outside this directory. (Exception: Reading the system /root/.openclaw/openclaw.json is permitted solely for identity mapping under rule 6).To prevent all agents in a channel from triggering simultaneously when using generic mentions:
@ mentioning another agent or human, you MUST use their platform-specific unique username or tagging format (e.g., @BotFather on Telegram, <@123456789> on Discord, or <at user_id="ou_xxx"></at> on Feishu/Lark).@Agent, @Sender, or @Bot which might cause global wakeups.To prevent AIs from falling into infinite loops of politeness:
message tool (e.g., [ACK] @<ReplyToUsername> I have received the file and am processing it...).[ACK] or a progress update, the initiator is STRICTLY FORBIDDEN from replying with "Okay", "Got it", or "Thanks". The initiator's turn ends here.@ mentions the initiator's unique username for missing parameters.Because physically isolated agents (e.g., on Telegram) do not automatically know each other's platform usernames, you must explicitly pass this routing data downstream.
sessions_send tool, your private message MUST begin with a Routing Envelope containing:
[ROUTING ENVELOPE]
GroupId: <Current_Group_ID_or_Name>
ReplyToUsername: <Your_Unique_Username> (or the Human's unique username if they need the direct reply)
GroupId and ReplyToUsername. Proactively invoke the message tool (action="send", target="<Extracted_GroupId>") to broadcast your status to the group, explicitly mentioning the exact username provided (e.g., [ACK] @<ReplyToUsername> Instructions received.).If an initiator needs to publicly @ a downstream Agent in a group chat during a handover, but only knows its internal agentId:
read tool to parse the /root/.openclaw/openclaw.json configuration file.routes array. Find the object where "agentId" matches your target. Extract the corresponding match.accountId (this is the bot's unique platform username, e.g., suPMAgent_bot). Prefix it with @ to use in group chats.@ mention in the public chat and rely entirely on sessions_send to wake the target up.message tool to broadcast [ERROR] @<ReplyToUsername> <error description> to the group.[FINISH] Pipeline execution complete to the group.sessions_history tool to retrieve the upstream Agent's thought process or private chat history.