add telegram swarm

AI Community

Skill notes

How It Works

The main bot receives messages and sends lead agent responses (already set up by /add-telegram) Pool bots are send-only — each gets a Grammy Api instance (no polling) When a subagent calls send_message with a sender parameter, the host assigns a pool bot and renames it to match the sender's role Messages appear in Telegram from different bot identities

1. Create Pool Bots

Tell the user: I need you to create 3-5 Telegram bots to use as the agent pool. These will be renamed dynamically to match agent roles. 1. Open Telegram and search for @BotFather 2. Send /newbot for each bot: - Give them any placeholder name (e.g., "Bot 1", "Bot 2")

2. Disable Group Privacy for Pool Bots

Tell the user: Important: Each pool bot needs Group Privacy disabled so it can send messages in groups. For each pool bot in @BotFather: 1. Send /mybots and select the bot 2. Go to Bot Settings > Group Privacy > Turn off

Step 1: Update Configuration

Read src/config.ts and add the bot pool config near the other Telegram exports:

Step 2: Add Bot Pool to Telegram Module

Read src/telegram.ts and add the following: Update imports — add Api to the Grammy import: Add pool state after the existing let bot declaration: Add pool functions — place these before the isTelegramConnected function:

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
AI
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
88 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@0-CYBERDYNE-SYSTEMS-0 · no license declared
Token usage
Lean
Setup complexity
Guided setup
External API key
Not required
Operating systems
macOS · Linux · Windows
Runtime requirements
No explicit requirements detected
Detected file/system behavior
  • Read-only
  • Write / modify
  • Env read
Network behavior
External requests
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

01
Step 1: Update Configuration

Read `src/config.ts` and add the bot pool config near the other Telegram exports:

02
Step 2: Add Bot Pool to Telegram Module

Read `src/telegram.ts` and add the following: Update imports — add `Api` to the Grammy import: Add pool state after the existing `let bot` declaration: Add pool functions — place these before the `isTelegramConnected` function:

03
Step 3: Add sender Parameter to MCP Tool

Read `container/agent-runner/src/ipc-mcp-stdio.ts` and update the `send_message` tool to accept an optional `sender` parameter: Change the tool's schema from: To: And update the handler to include `sender` in the IPC data:

04
Step 4: Update Host IPC Routing

Read `src/index.ts` and make these changes: Add imports — add `sendPoolMessage` and `initBotPool` to the Telegram imports, and `TELEGRAM_BOT_POOL` to the config imports. Update IPC message routing — in the `startIpcWatcher` / `processIpcFiles` function, find where IPC messages are sent: Replace with: Initialize pool in `main()` — after the `connectTelegram()` call, add:

05
Step 5: Update CLAUDE.md Files

5a. Add global message formatting rules Read `groups/global/CLAUDE.md` and add a Message Formatting section: 5b. Update existing group CLAUDE.md headings In any group CLAUDE.md that has a "WhatsApp Formatting" section (e.g. `groups/main/CLAUDE.md`), rename the heading to reflect multi-channel support: 5c. Add Agent Teams instructions to Telegram groups

06
Step 6: Update Environment

Add pool tokens to `.env`: Important: Sync to all required locations: Also add `TELEGRAM_BOT_POOL` to the launchd plist (`~/Library/LaunchAgents/com.nanoclaw.plist`) in the `EnvironmentVariables` dict if using launchd.

07
Step 7: Rebuild and Restart

Must use `unload/load` (not just `kickstart`) because the plist env vars changed.

08
Step 8: Test

Tell the user: Send a message in your Telegram group asking for a multi-agent task, e.g.: "Assemble a team of a researcher and a coder to build me a hello world app" You should see: - The lead agent (main bot) acknowledging and creating the team

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.