|
1 | 1 | --- |
2 | | -summary: "Multi-agent routing: isolated agents, channel accounts, and bindings" |
| 2 | +summary: "Multi-agent routing: agent boundaries, channel accounts, and bindings" |
3 | 3 | title: "Multi-agent routing" |
4 | 4 | sidebarTitle: "Multi-agent routing" |
5 | | -read_when: "You want multiple isolated agents (workspaces + auth) in one gateway process." |
| 5 | +read_when: "You want multiple agents with separate workspaces, auth, and sessions in one Gateway process." |
6 | 6 | status: active |
7 | 7 | --- |
8 | 8 |
|
9 | | -Run multiple _isolated_ agents in one Gateway process, each with its own workspace, state directory (`agentDir`), and session store, plus multiple channel accounts (e.g. two WhatsApp numbers). Inbound messages route to the right agent through **bindings**. |
| 9 | +Run multiple agents in one Gateway process, each with its own workspace, state directory (`agentDir`), and session store, plus multiple channel accounts (e.g. two WhatsApp numbers). Inbound messages route to the right agent through **bindings**. |
10 | 10 |
|
11 | 11 | An **agent** is the full per-persona scope: workspace files, auth profiles, model registry, and session store. A **binding** maps a channel account (a Slack workspace, a WhatsApp number, etc.) to one of those agents. |
12 | 12 |
|
@@ -34,6 +34,11 @@ Never reuse `agentDir` across agents — it causes auth/session state collisions |
34 | 34 |
|
35 | 35 | Skills load from each agent workspace plus shared roots such as `~/.openclaw/skills`, then filter by the effective agent skill allowlist. Use `agents.defaults.skills` for a shared baseline and `agents.list[].skills` for a per-agent replacement (explicit entries replace the default, they do not merge). See [Skills: per-agent vs shared](/tools/skills#per-agent-vs-shared-skills) and [Skills: agent allowlists](/tools/skills#agent-allowlists). |
36 | 36 |
|
| 37 | +Plugin-owned storage follows that plugin's configuration; adding a second agent |
| 38 | +does not automatically split every global plugin store. For example, configure |
| 39 | +[Memory Wiki per-agent vaults](/concepts/multi-agent#per-agent-memory-wiki-vaults) |
| 40 | +when personas must not share compiled wiki knowledge. |
| 41 | + |
37 | 42 | <Note> |
38 | 43 | **Workspace note:** each agent's workspace is the **default cwd**, not a hard sandbox. Relative paths resolve inside the workspace, but absolute paths can reach other host locations unless sandboxing is enabled. See [Sandboxing](/gateway/sandboxing). |
39 | 44 | </Note> |
@@ -114,13 +119,44 @@ openclaw agents list --bindings |
114 | 119 |
|
115 | 120 | ## Multiple agents, multiple personas |
116 | 121 |
|
117 | | -Each configured `agentId` is a fully isolated persona: |
| 122 | +Each configured `agentId` is a distinct persona boundary for core agent state: |
118 | 123 |
|
119 | 124 | - Different accounts per channel (per `accountId`). |
120 | 125 | - Different personalities (per-agent `AGENTS.md`/`SOUL.md`). |
121 | | -- Separate auth and sessions, with no cross-talk unless explicitly enabled. |
| 126 | +- Separate auth and sessions, with cross-agent access enabled only through explicit features or plugin configuration. |
| 127 | + |
| 128 | +This lets multiple people share one Gateway while keeping core agent state separate. |
| 129 | + |
| 130 | +## Per-agent Memory Wiki vaults |
| 131 | + |
| 132 | +Memory Wiki uses one global vault by default. To keep a support agent's |
| 133 | +compiled knowledge separate from a marketing agent's, set |
| 134 | +`plugins.entries.memory-wiki.config.vault.scope` to `agent`: |
| 135 | + |
| 136 | +```json5 |
| 137 | +{ |
| 138 | + plugins: { |
| 139 | + entries: { |
| 140 | + "memory-wiki": { |
| 141 | + enabled: true, |
| 142 | + config: { |
| 143 | + vault: { |
| 144 | + scope: "agent", |
| 145 | + path: "~/.openclaw/wiki", |
| 146 | + }, |
| 147 | + }, |
| 148 | + }, |
| 149 | + }, |
| 150 | + }, |
| 151 | +} |
| 152 | +``` |
122 | 153 |
|
123 | | -This lets multiple people share one Gateway while keeping their agent state isolated. |
| 154 | +The configured path is the parent directory. OpenClaw appends the normalized |
| 155 | +agent id, producing paths such as `~/.openclaw/wiki/support` and |
| 156 | +`~/.openclaw/wiki/marketing`. Agent-scoped CLI and Gateway operations require |
| 157 | +an explicit agent when multiple agents are configured. See |
| 158 | +[Memory Wiki per-agent vaults](/plugins/memory-wiki#per-agent-vaults) for bridge |
| 159 | +filtering, migration, and trust-boundary details. |
124 | 160 |
|
125 | 161 | ## Cross-agent QMD memory search |
126 | 162 |
|
|
0 commit comments