Skip to content

Commit 5a9cd33

Browse files
committed
docs(agents): document new 3-segment peer binding --bind format
Add examples, format table row, and option references for the <channel>:<peer_kind>:<peer_id> syntax introduced in #95734 fix.
1 parent 4564f9c commit 5a9cd33

1 file changed

Lines changed: 16 additions & 8 deletions

File tree

‎docs/cli/agents.md‎

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,25 @@ You can also add bindings when creating an agent:
5757
openclaw agents add work --workspace ~/.openclaw/workspace-work --bind telegram:* --bind discord:*
5858
```
5959

60+
Bind to a specific conversation (group, channel, or direct message) using the 3-segment format:
61+
62+
```bash
63+
openclaw agents add feishu-bot --workspace ~/.openclaw/workspace-feishu --bind 'feishu:group:oc_test'
64+
openclaw agents bind --agent feishu-bot --bind 'matrix:dm:user123'
65+
```
66+
6067
If you omit `accountId` (`--bind <channel>`), OpenClaw resolves it from plugin setup hooks, forced account binding, or the channel's configured account count.
6168

6269
If you omit `--agent` for `bind` or `unbind`, OpenClaw targets the current default agent.
6370

6471
### `--bind` format
6572

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. |
73+
| Format | Meaning |
74+
| ------------------------------ | ------------------------------------------------------------------------------------------------- |
75+
| `--bind <channel>:*` | Match all accounts on the channel. |
76+
| `--bind <channel>:<account>` | Match one account. |
77+
| `--bind <channel>` | Match the default account only unless the CLI can safely resolve a plugin-specific account scope. |
78+
| `--bind <channel>:<kind>:<id>` | Match a specific conversation by peer kind (`direct`, `group`, or `channel`) and peer ID. |
7179

7280
### Binding scope behavior
7381

@@ -122,7 +130,7 @@ Options:
122130
- `--workspace <dir>`
123131
- `--model <id>`
124132
- `--agent-dir <dir>`
125-
- `--bind <channel[:accountId]>` (repeatable)
133+
- `--bind <format>` (repeatable) — see [`--bind` format](#--bind-format)
126134
- `--non-interactive`
127135
- `--json`
128136

@@ -149,15 +157,15 @@ Options:
149157
Options:
150158

151159
- `--agent <id>` (defaults to the current default agent)
152-
- `--bind <channel[:accountId]>` (repeatable)
160+
- `--bind <format>` (repeatable) — see [`--bind` format](#--bind-format)
153161
- `--json`
154162

155163
### `agents unbind`
156164

157165
Options:
158166

159167
- `--agent <id>` (defaults to the current default agent)
160-
- `--bind <channel[:accountId]>` (repeatable)
168+
- `--bind <format>` (repeatable) — see [`--bind` format](#--bind-format)
161169
- `--all`
162170
- `--json`
163171

0 commit comments

Comments
 (0)