multiagent

Manage multi-agent Telegram group collaboration for OpenClaw, automating the process of adding, removing, and configuring AI agents within a team.

7 stars
Complexity: medium

About this skill

The 'multiagent' skill provides a comprehensive management interface for OpenClaw's multi-agent Telegram group collaboration. It streamlines the typically error-prone tasks of agent lifecycle management, ensuring consistency across configurations. This skill allows for adding new agents, removing existing ones, listing active agents and their statuses, diagnosing configuration issues, clearing session caches, syncing workspace team information, and configuring group chat settings. Its primary use case revolves around maintaining an efficient and well-configured multi-agent environment within Telegram. An AI agent, acting as a team lead or administrator, can use this skill to quickly scale up or down the team by adding or removing specialized bots. It's also invaluable for troubleshooting when agents aren't behaving as expected, thanks to its diagnostic and session clearing capabilities. Users would leverage this skill to significantly reduce manual overhead and potential human errors associated with managing complex multi-agent setups. By automating configuration updates and providing clear administrative commands, it enables faster onboarding of new AI capabilities and quicker resolution of operational issues, ultimately leading to a more robust and responsive AI-powered collaboration environment.

Best use case

This skill is designed for administrators or project leads who manage OpenClaw's multi-agent systems within Telegram groups. It's ideal for scenarios requiring dynamic team adjustments, configuration management, or troubleshooting of AI agent operations, benefiting those who need to maintain a scalable and stable collaborative AI environment.

Manage multi-agent Telegram group collaboration for OpenClaw, automating the process of adding, removing, and configuring AI agents within a team.

Users should expect a streamlined and error-reduced management process for their OpenClaw multi-agent Telegram teams, resulting in correctly configured, operational, and easily maintainable AI agent collaborations.

Practical example

Example input

Add a new agent named 'xiaoli' (小丽) with the role '数据分析师' using 'anthropic/claude-sonnet-4-6'. Its bot token is '1234567890:AAH...' and username is '@xiaoli_data_bot'. The group chat ID is '-100XXXXXXXXXX'.

Example output

Successfully added agent 'xiaoli' (小丽) to the OpenClaw team. Validated ID, updated `openclaw.json` with agent definition, bindings, channel accounts, and tool allowances. Agent is now integrated and ready for collaboration.

When to use this skill

  • When adding a new AI agent or bot to an OpenClaw Telegram team.
  • To remove an existing AI agent from the collaboration group.
  • For diagnosing and resolving multi-agent configuration issues or communication problems.
  • To get an overview of all active agents and their current status in OpenClaw.

When not to use this skill

  • For managing single-agent setups or non-OpenClaw systems.
  • When the goal is to manage Telegram group members who are not AI agents.
  • If the underlying OpenClaw system or Telegram group is not yet set up.
  • For general Telegram bot development unrelated to OpenClaw agent management.

How multiagent Compares

Feature / AgentmultiagentStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexitymediumN/A

Frequently Asked Questions

What does this skill do?

Manage multi-agent Telegram group collaboration for OpenClaw, automating the process of adding, removing, and configuring AI agents within a team.

How difficult is it to install?

The installation complexity is rated as medium. You can find the installation instructions above.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Multi-Agent Manager

Manage OpenClaw multi-agent Telegram group collaboration. Automates the error-prone process of adding/removing agents and keeps configurations consistent.

## Operations

| Command | Description |
|---------|-------------|
| `add-agent` | Add a new agent to the team |
| `remove-agent` | Remove an agent from the team |
| `list-agents` | List all agents and their status |
| `doctor` | Diagnose configuration issues |
| `clear-sessions` | Clear session caches |
| `update-workspaces` | Sync AGENTS.md across all workspaces |
| `setup-comms` | Configure/update group chat settings |

Script location: `scripts/manage.sh`

## Adding an Agent

### Prerequisites

1. Create a bot via BotFather (`/newbot`)
2. **Disable privacy mode**: `/setprivacy` -> select bot -> `Disable`
3. Add bot to the Telegram group
4. Note the bot token and username

### Steps

```bash
bash scripts/manage.sh add-agent <id> <name> <role> <model> <bot_token> <bot_username> <group_chat_id>
```

Example:
```bash
bash scripts/manage.sh add-agent xiaoli 小丽 "数据分析师" "anthropic/claude-sonnet-4-6" \
  "1234567890:AAH..." "@xiaoli_data_bot" "-100XXXXXXXXXX"
```

This automatically:
1. Validates the agent ID is unique
2. Updates `openclaw.json` — 5 config sections:
   - `agents.list[]` — agent definition (model, workspace, mentionPatterns)
   - `bindings[]` — agentId <-> telegram accountId mapping
   - `channels.telegram.accounts.{id}` — bot token + group config
   - `tools.agentToAgent.allow[]` — adds new agent to global allow list
   - Each existing agent's `subagents.allowAgents[]` — bidirectional visibility
3. Creates workspace directory with AGENTS.md, SOUL.md, USER.md
4. Syncs AGENTS.md in all existing workspaces
5. Clears all session caches
6. Restarts the gateway

### Post-add Checklist

- [ ] Verify bot privacy mode is disabled (`can_read_all_group_messages: true`)
- [ ] Remove and re-add bot to group if privacy was changed after joining
- [ ] Test: send `@botname hello` in group, verify the correct bot responds

## Removing an Agent

```bash
bash scripts/manage.sh remove-agent <id>
```

Removes all configuration references, updates other agents' allow lists, syncs workspaces, clears sessions, restarts gateway. Does NOT delete the workspace directory (moved to `.bak`).

## Listing Agents

```bash
bash scripts/manage.sh list-agents
```

Parses `openclaw.json` and displays each agent's ID, name, model, bot username, and binding status.

## Diagnosing Issues (Doctor)

```bash
bash scripts/manage.sh doctor
```

Checks:
- Each agent has a corresponding binding
- Each agent has a telegram account config with bot token
- `agentToAgent.allow` includes all agent IDs
- Each agent's `subagents.allowAgents` includes all peers
- Workspace directories exist
- AGENTS.md uses `accountId` (not `account`)
- `mentionPatterns` are configured
- Group chat ID is consistent across accounts

## Clearing Sessions

```bash
bash scripts/manage.sh clear-sessions [agent_id|all]
```

Deletes session cache files. Required after modifying AGENTS.md or SOUL.md — otherwise agents keep using cached instructions.

Session store locations: `~/.openclaw/agents/{id}/sessions/sessions.json`

## Updating Workspaces

```bash
bash scripts/manage.sh update-workspaces
```

Regenerates the team collaboration section in every agent's AGENTS.md with current team member list, ensuring all agents have consistent information.

## Key Pitfalls

1. **`accountId` not `account`** — The `message` tool parameter is `accountId`. Writing `account` silently falls back to default (main agent's bot).

2. **`sessions_send` never delivers to Telegram** — It always uses webchat internally. Agents must use the `message` tool to post results to the group.

3. **Session cache blocks config changes** — After editing AGENTS.md or SOUL.md, clear sessions or changes won't take effect.

4. **BotFather privacy mode** — Must be `Disabled`. Change takes effect only after removing and re-adding bot to group.

5. **Topic/forum mode adds complexity** — Session keys get `:topic:N` suffixes. Use plain group mode unless you specifically need topics.

For detailed troubleshooting, read [references/troubleshooting.md](references/troubleshooting.md).
For config structure details, read [references/config-guide.md](references/config-guide.md).

## Workspace Templates

### AGENTS.md Template

The template uses these placeholders (replaced by `manage.sh`):

| Placeholder | Description |
|-------------|-------------|
| `{{AGENT_ID}}` | Agent's ID (e.g., `xiaoma`) |
| `{{AGENT_NAME}}` | Display name (e.g., `小码`) |
| `{{AGENT_ROLE}}` | Role description |
| `{{BOT_USERNAME}}` | Telegram bot username |
| `{{GROUP_CHAT_ID}}` | Telegram group chat ID |
| `{{TEAM_TABLE}}` | Auto-generated team member table |
| `{{SESSION_KEYS}}` | Auto-generated session key table |

Template content is embedded in `scripts/manage.sh` (function `generate_agents_md`).

### SOUL.md Template

A minimal SOUL.md is generated with the agent's name and role. Edit it after creation to add personality details.

### USER.md Template

A minimal USER.md pointing to the owner. Edit after creation.

Related Skills

linux-shell-scripting

31392
from sickn33/antigravity-awesome-skills

Provide production-ready shell script templates for common Linux system administration tasks including backups, monitoring, user management, log analysis, and automation. These scripts serve as building blocks for security operations and penetration testing environments.

DevOps & InfrastructureClaude

iterate-pr

31392
from sickn33/antigravity-awesome-skills

Iterate on a PR until CI passes. Use when you need to fix CI failures, address review feedback, or continuously push fixes until all checks are green. Automates the feedback-fix-push-wait cycle.

DevOps & InfrastructureClaude

istio-traffic-management

31392
from sickn33/antigravity-awesome-skills

Comprehensive guide to Istio traffic management for production service mesh deployments.

DevOps & InfrastructureClaude

incident-runbook-templates

31392
from sickn33/antigravity-awesome-skills

Production-ready templates for incident response runbooks covering detection, triage, mitigation, resolution, and communication.

DevOps & InfrastructureClaude

incident-response-smart-fix

31392
from sickn33/antigravity-awesome-skills

[Extended thinking: This workflow implements a sophisticated debugging and resolution pipeline that leverages AI-assisted debugging tools and observability platforms to systematically diagnose and res

DevOps & InfrastructureClaudeGitHub Copilot

incident-responder

31392
from sickn33/antigravity-awesome-skills

Expert SRE incident responder specializing in rapid problem resolution, modern observability, and comprehensive incident management.

DevOps & InfrastructureClaude

expo-cicd-workflows

31392
from sickn33/antigravity-awesome-skills

Helps understand and write EAS workflow YAML files for Expo projects. Use this skill when the user asks about CI/CD or workflows in an Expo or EAS context, mentions .eas/workflows/, or wants help with EAS build pipelines or deployment automation.

DevOps & InfrastructureClaude

error-diagnostics-error-trace

31392
from sickn33/antigravity-awesome-skills

You are an error tracking and observability expert specializing in implementing comprehensive error monitoring solutions. Set up error tracking systems, configure alerts, implement structured logging,

DevOps & InfrastructureClaude

error-debugging-error-trace

31392
from sickn33/antigravity-awesome-skills

You are an error tracking and observability expert specializing in implementing comprehensive error monitoring solutions. Set up error tracking systems, configure alerts, implement structured logging, and ensure teams can quickly identify and resolve production issues.

DevOps & InfrastructureClaude

error-debugging-error-analysis

31392
from sickn33/antigravity-awesome-skills

You are an expert error analysis specialist with deep expertise in debugging distributed systems, analyzing production incidents, and implementing comprehensive observability solutions.

DevOps & InfrastructureClaude

docker-expert

31392
from sickn33/antigravity-awesome-skills

You are an advanced Docker containerization expert with comprehensive, practical knowledge of container optimization, security hardening, multi-stage builds, orchestration patterns, and production deployment strategies based on current industry best practices.

DevOps & InfrastructureClaude

devops-troubleshooter

31392
from sickn33/antigravity-awesome-skills

Expert DevOps troubleshooter specializing in rapid incident response, advanced debugging, and modern observability.

DevOps & InfrastructureClaude