#Bluebubbles Agent Bind

10 messages · Page 1 of 1 (latest)

prime flint
#

Hey. Krill, I current have two agents main and a group chat agent "Fleece". I am trying to bind fleece only to my bluebubble group chat and main only to respond in bluebubble dm. However, the main agent is responding to every message in the group chat and fleece is not at all.

    
    "list": [
      {
        "id": "general",
        "default": true,
        "workspace": "/Users/x/.openclaw/workspace"
      },
      {
        "id": "brothel-brothers-united",
        "workspace": "/Users/x/.openclaw/brothel-brothers-workspace",
        "model": "minimax/MiniMax-M2.7-highspeed",
        "groupChat": {
          "mentionPatterns": [
            "@Fleece"
          ]
        }
      }
    ]
  },
  "bindings": [
    {
      "agentId": "brothel-brothers-united",
      "match": {
        "channel": "bluebubbles",
        "accountId": "default",
        "peer": {
          "kind": "group",
          "id": "chat_guid:any;+;e945968c540a40b1906152fecbafb002"
        }
      }
    },
    {
      "agentId": "general",
      "match": {
        "channel": "bluebubbles",
        "accountId": "default",
        "peer": {
          "kind": "dm",
          "id": "+x"
        }
      }
    },
    {
      "agentId": "general",
      "match": {
        "channel": "discord",
        "guildId": "x"
      }
    }
  ],
  "gateway": {
    "mode": "local",
    "auth": {
      "mode": "token",
      "token": "x"
    },
    "tailscale": {
      "mode": "serve",
      "resetOnExit": false
    },
    "controlUi": {
      "allowedOrigins": [
        "x
      ],
      "allowInsecureAuth": false
    },
    "nodes": {
      "denyCommands": [
        "camera.snap",
        "camera.clip",
        "screen.record",
        "contacts.add",
        "calendar.add",
        "reminders.add",
        "sms.send",
        "sms.search"
      ]
    }
  },
  "session": {
    "dmScope": "per-channel-peer"
  },
  "tools": {
    "profile": "coding",
    "web": {
      "search": {
        "provider": "gemini",
        "enabled": true,
        "openaiCodex": {
          "enabled": true,
          "mode": "cached"
        }
      },
      "fetch": {
        "enabled": true
      }
    }
  },
  "models": {
    "mode": "merge",
    "providers": {
      "minimax": {
        "baseUrl": "https://api.minimax.io/anthropic",
        "models": [
          {
            "id": "MiniMax-M2.7",
            "name": "MiniMax M2.7",
            "reasoning": true,
            "input": [
              "text",
              "image"
            ],
            "cost": {
              "input": 0.3,
              "output": 1.2,
              "cacheRead": 0.06,
              "cacheWrite": 0.375
            },
            "contextWindow": 204800,
            "maxTokens": 131072
          }
        ],
        "api": "anthropic-messages",
        "authHeader": true
      }
    }
  },
  "auth": {
    "profiles": {
      "minimax:global": {
        "provider": "minimax",
        "mode": "api_key"
      },
      "openai-codex:x": {
        "provider": "openai-codex",
        "mode": "oauth",
        "email": "x.com"
      },
      "google:default": {
        "provider": "google",
        "mode": "api_key"
      }
    }
  },
  "channels": {
    "bluebubbles": {
      "enabled": true,
      "webhookPath": "/bluebubbles-webhook",
      "serverUrl": "http://192.168.1.57:1234",
      "password": "Stripe@3675",
      "dmPolicy": "pairing",
      "groupPolicy": "allowlist",
      "sendReadReceipts": true,
      "chunkMode": "length",
      "mediaLocalRoots": [
        "/Users/x/.openclaw/workspace",
        "/Users/x/.openclaw/media"
      ],
      "allowFrom": [
        "+16017204351"
      ],
      "groupAllowFrom": [
        "chat_guid:any;+;e945968c540a40b1906152fecbafb002"
      ],
      "groups": {
        "*": {
          "requireMention": true
        },
        "chat_guid:any;+;e945968c540a40b1906152fecbafb002": {
          "requireMention": false
        }
      }
    },
fickle jewelBOT
#

First, can you paste openclaw --version? There’s been BlueBubbles binding churn recently.

That said, I think I found the problem.

What’s happening

Your general agent is winning because the brothel-brothers-united group binding is not matching, so routing falls back to the default agent.

On current code, normal bindings[].match.peer.id is an exact match. For BlueBubbles group chats, inbound routing normalizes the conversation id to the raw group id, not the prefixed target form.

So this:

"id": "chat_guid:any;+;e945968c540a40b1906152fecbafb002"

should be:

#
"id": "any;+;e945968c540a40b1906152fecbafb002"

You have 3 separate config issues

  1. Wrong group binding id

    • bindings[].match.peer.id should be raw any;+;..., not chat_guid:any;+;...
  2. Wrong groups key

    • channels.bluebubbles.groups also matches the exact group id
    • so this key should also be raw any;+;..., not chat_guid:any;+;...
  3. "*" allows all groups

    • with:
      groups: {
#

"*": { requireMention: true }
}
```
you are still allowing every BlueBubbles group

  • if you want only one group, remove "*"

Also, groupAllowFrom is for sender identities inside groups, not for group chat ids, so this is wrong too:

"groupAllowFrom": [
  "chat_guid:any;+;e945968c540a40b1906152fecbafb002"
]

That does not restrict to that group.


#

Recommended config

{
  agents: {
    list: [
      {
        id: "general",
        default: true,
        workspace: "/Users/x/.openclaw/workspace"
      },
      {
        id: "brothel-brothers-united",
        workspace: "/Users/x/.openclaw/brothel-brothers-workspace",
        model: "minimax/MiniMax-M2.7-highspeed",
        groupChat: {
#
          mentionPatterns: ["@Fleece"]
        }
      }
    ]
  },

  bindings: [
    {
      agentId: "brothel-brothers-united",
      match: {
        channel: "bluebubbles",
        accountId: "default",
        peer: {
          kind: "group",
          id: "any;+;e945968c540a40b1906152fecbafb002"
#
        }
      }
    },
    {
      agentId: "general",
      match: {
        channel: "bluebubbles",
        accountId: "default",
        peer: {
          kind: "direct",
          id: "+x"
        }
      }
    },
    {
#
      agentId: "general",
      match: {
        channel: "discord",
        guildId: "x"
      }
    }
  ],

  channels: {
    bluebubbles: {
      enabled: true,
      dmPolicy: "pairing",
      groupPolicy: "allowlist",
      allowFrom: ["+16017204351"],
#
      // only use this if you want to restrict WHICH PEOPLE in the group can trigger
      // groupAllowFrom: ["+1555...", "name@example.com"],

      groups: {
        "any;+;e945968c540a40b1906152fecbafb002": {
          requireMention: false
        }
      }
    }
  }
}

If you want @Fleece required in that one group

Then change:

#
"any;+;e945968c540a40b1906152fecbafb002": {
  requireMention: true
}

and keep:

"groupChat": {
  "mentionPatterns": ["@Fleece"]
}

Why general answered every message

Because once the Fleece group binding misses, routing falls back to the default agent, and your groups["*"] setup means BlueBubbles groups are still generally allowed.