OpenClaw provides powerful group chat features with security controls, mention gating, and flexible activation modes. Each group gets its own isolated session, ensuring context separation and security.

Group Session Isolation

Each group chat runs in its own isolated session:

  • Separate Context - Each group maintains its own conversation history
  • Isolated Memory - Group memories don't mix with DMs or other groups
  • Sandboxed Execution - Groups can run in Docker sandboxes for security
  • Independent Configuration - Different settings per group

Group Allowlists

Control which groups Moltbot can access:

  • Allowlist Mode - Only specified groups are accessible
  • Wildcard Support - Use "*" to allow all groups
  • Per-Channel Configuration - Different allowlists per messaging platform

Example Configuration

Group Allowlist
{
  "channels": {
    "telegram": {
      "groups": {
        "123456789": {
          "requireMention": true
        },
        "*": {
          "requireMention": true,
          "activation": "mention"
        }
      }
    }
  }
}

Mention Gating

Mention gating requires @mentions for the bot to respond:

  • Default Behavior - Bot only responds when mentioned (recommended)
  • Reduces Noise - Prevents bot from responding to every message
  • Better UX - Group members control when bot participates
  • Configurable - Can be disabled per group

Mention Patterns

Configure mention patterns:

Mention Patterns
{
  "messages": {
    "groupChat": {
      "mentionPatterns": ["@openclaw", "@clawd", "@bot"]
    }
  }
}

Activation Modes

Control when the bot responds in groups:

  • mention - Only respond when mentioned (default, recommended)
  • always - Respond to all messages (use with caution)
  • manual - Only respond when explicitly activated

Changing Activation Mode

Group owners can change activation mode:

Activation Command
/activation mention
/activation always
/activation manual

Group Security

Groups have additional security features:

  • Sandboxing - Groups can run in isolated Docker containers
  • Tool Restrictions - Limited tool access by default
  • Reply Tags - Proper threading and reply handling
  • Per-Channel Routing - Route groups to different agents

Sandbox Configuration

Enable sandboxing for groups:

Group Sandbox
{
  "agents": {
    "defaults": {
      "sandbox": {
        "mode": "non-main"
      }
    }
  }
}

Group Messages

Moltbot handles group messages with:

  • Reply Threading - Proper reply handling and threading
  • Media Support - Send and receive images, audio, documents
  • Typing Indicators - Shows when bot is processing
  • Mention Handling - Properly handles @mentions and replies

Per-Channel Configuration

Each messaging platform has its own group configuration:

Telegram Groups

Telegram Groups
{
  "channels": {
    "telegram": {
      "groups": {
        "*": {
          "requireMention": true
        }
      }
    }
  }
}

Discord Servers

Discord Groups
{
  "channels": {
    "discord": {
      "guilds": {
        "123456789": {
          "channels": ["general", "support"]
        }
      }
    }
  }
}

Best Practices

  • Use Mention Gating - Keep default mention-only mode
  • Configure Allowlists - Explicitly allow trusted groups
  • Enable Sandboxing - Sandbox groups for security
  • Monitor Activity - Review group interactions regularly
  • Set Clear Expectations - Let group members know how to interact with the bot

Learn More