


























@@ -21,6 +21,7 @@ Related:
2121openclaw agents list
2222openclaw agents list --bindings
2323openclaw agents add work --workspace ~/.openclaw/workspace-work
24+openclaw agents add work --workspace ~/.openclaw/workspace-work --bind telegram:*
2425openclaw agents add ops --workspace ~/.openclaw/workspace-ops --bind telegram:ops --non-interactive
2526openclaw agents bindings
2627openclaw agents bind --agent work --bind telegram:ops
@@ -50,27 +51,47 @@ Add bindings:
5051openclaw agents bind --agent work --bind telegram:ops --bind discord:guild-a
5152```
525353-If you omit `accountId` (`--bind <channel>`), OpenClaw resolves it from channel defaults and plugin setup hooks when available.
54+You can also add bindings when creating an agent:
55+56+```bash
57+openclaw agents add work --workspace ~/.openclaw/workspace-work --bind telegram:* --bind discord:*
58+```
59+60+If you omit `accountId` (`--bind <channel>`), OpenClaw resolves it from plugin setup hooks, forced account binding, or the channel's configured account count.
54615562If you omit `--agent` for `bind` or `unbind`, OpenClaw targets the current default agent.
566364+### `--bind` format
65+66+| Format | Meaning |
67+| ---------------------------- | ------------------------------------------------------------------------------------------------- |
68+| `--bind <channel>:*` | Match all accounts on the channel. |
69+| `--bind <channel>:<account>` | Match one account. |
70+| `--bind <channel>` | Match the default account only unless the CLI can safely resolve a plugin-specific account scope. |
71+5772### Binding scope behavior
587359-- A binding without `accountId` matches the channel default account only.
74+- A stored binding without `accountId` matches the channel default account only.
6075- `accountId: "*"` is the channel-wide fallback (all accounts) and is less specific than an explicit account binding.
6176- If the same agent already has a matching channel binding without `accountId`, and you later bind with an explicit or resolved `accountId`, OpenClaw upgrades that existing binding in place instead of adding a duplicate.
627763-Example:
78+Examples:
64796580```bash
81+# match all accounts on the channel
82+openclaw agents bind --agent work --bind telegram:*
83+84+# match a specific account
85+openclaw agents bind --agent work --bind telegram:ops
86+6687# initial channel-only binding
6788openclaw agents bind --agent work --bind telegram
68896990# later upgrade to account-scoped binding
70-openclaw agents bind --agent work --bind telegram:ops
91+openclaw agents bind --agent work --bind telegram:alerts
7192```
729373-After the upgrade, routing for that binding is scoped to `telegram:ops`. If you also want default-account routing, add it explicitly (for example `--bind telegram:default`).
94+After the upgrade, routing for that binding is scoped to `telegram:alerts`. If you also want default-account routing, add it explicitly (for example `--bind telegram:default`).
74957596Remove bindings:
7697此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。