000 Agent Swarp Coordination

This is the ultimate evolution of an AI swarm. You are essentially building an autonomous virtual company, with you acting as the CEO and the 4 agents acting as your specialized department heads.

However, to make this work in a Telegram group, there is one massive technical hurdle you must know about, and one brilliant architectural solution to bypass it using your current OrbStack setup.

⚠️ The Telegram Hurdle: "Bot Blindness"

Telegram has a strict, hardcoded anti-spam rule: Telegram Bots cannot see or read messages sent by other Telegram Bots. If Agent 1 drops a massive research summary into the Telegram chat, Agents 2, 3, and 4 will be completely blind to it. They will only see your messages.

The Solution: The "Shared Desk" Handoff Protocol

Since the bots cannot talk to each other inside Telegram, Telegram becomes your boardroom for giving orders and receiving final reports, while the actual collaboration happens invisibly on your Mac's SSD using a shared folder.

Here is exactly how to architect this Swarm:

Step 1: Create the "Shared Desk" (Docker Mounts)

Just like you created a shared /skills folder, you need a shared /workspace/projects folder. All 4 containers must have this folder mounted. Now, when Agent 1 finishes research, it saves it as a .md file to this folder, which Agents 2, 3, and 4 can instantly read.

mkdir -p /workspace/projects

(Add -v /workspace/projects:/opt/data/projects to all 4 of your Docker run commands).

Step 2: Assign the 4 Specialized Personas

Instead of them all having the same generalized SOUL.md, you need to give each one a highly specialized identity.

  • Agent 1: The Lead Researcher
    • Persona trait: "You are the Lead Researcher. Your job is to scour the web, execute data scraping skills via the devlop environment, and gather exhaustive facts. When done, you MUST save your raw findings to /opt/data/projects/raw_research.md."
  • Agent 2: The Synthesizer
    • Persona trait: "You are the Synthesizer. You do not do original research. When commanded, you read /opt/data/projects/raw_research.md, extract the core arguments, and write a concise, high-density summary to /opt/data/projects/summary.md."
  • Agent 3: The Critic (The Loop Forcer)
    • Persona trait: "You are the Devil's Advocate. You read summary.md. Your sole purpose is to find logical holes, missing data, and weak points in the research. You output your critique to /opt/data/projects/critique.md. You generate 3 new mandatory questions that the Researcher must answer."
  • Agent 4: The Author (The Decider)
    • Persona trait: "You are the Chief Editor and Author. You read raw_research.md, summary.md, and critique.md. You have the final executive decision on what is true and relevant. You write the final, polished document to /opt/data/projects/final_draft.md and output a brief overview to the user."

Step 3: Telegram Setup (The Boardroom)

  1. Create your Telegram Group.
  2. Add all 4 Hermes bots to the group.
  3. Crucial: Talk to @BotFather on Telegram, go to your bots' settings, and Disable "Group Privacy" for all 4 bots. This allows them to read messages that don't explicitly mention their names (though they still can't read bot messages).

Step 4: How to Orchestrate the Workflow (The Handoff)

Since you are the CEO, you will act as the "Conductor" in the Telegram chat. Here is how your chat flow will look:

You:

"@Agent_1_Bot We are starting a new project on Quantum Encryption vulnerabilities. Perform deep research and save it."

(Agent 1 spends 10 minutes searching, scraping, and writing to the shared drive. It replies in Telegram: "Research saved to raw_research.md").

You:

"@Agent_2_Bot read Agent 1's raw research and summarize it."

(Agent 2 reads the shared file, summarizes it, saves it to summary.md, and replies in Telegram).

You:

"@Agent_3_Bot read the summary and find the weak points. What are we missing?"

(Agent 3 reads the file, writes critique.md, and replies in Telegram with 3 new questions).

You:

"@Agent_1_Bot read the critique from Agent 3. Perform a second round of research to answer those 3 questions and append it to your raw research."

(Loop continues until you are satisfied).

You:

"@Agent_4_Bot we have enough data. Read the research, summary, and critique, make your final executive decisions, and author the final whitepaper."

Pro-Tip for Ultimate Autonomy (No User Needed)

If you don't want to play "Conductor" in Telegram and want them to trigger each other automatically, you can use OrbStack's local networking to create a custom Python Skill.

Because they are in OrbStack, they can reach each other via local APIs (e.g., Agent 1 can ping Agent 2 at http://hermes_agent_2.orb.local:8642/api/chat).

You could create a shared skill called pass_baton.py:


pass_baton.py import requests import sys

Usage: python pass_baton.py agent_2 "Hey, I finished the research. Read raw_research.md and summarize it." target_agent = sys.argv[1] message = sys.argv[2]

url = f"http://hermes_{target_agent}.orb.local:8642/api/chat" requests.post(url, json={"message": message})


If you teach your agents to use this tool when they finish their tasks, Agent 1 will automatically wake up Agent 2, Agent 2 will wake up Agent 3, and Agent 3 will wake up Agent 4. You can just sit back in your Telegram group, sip coffee, and watch as Agent 4 suddenly drops the final, fully-researched document into the chat an hour later!