When should you add another agent to one OpenClaw Gateway rather than run a separate Gateway, and what decides it?
answer
- one trust boundary per Gateway
- agents separate state, not trust
- session tools see across agents
- access policy sits on the account
- profiles and ports for a second
basics
~20 sAdd an agent when everyone involved trusts each other and only persona, credentials and history need separating. Run a separate Gateway, ideally under another OS user or host, when people must not reach each other's tools, files or sessions.
solid answer
~40 sThe deciding question is trust, not convenience. OpenClaw supports one trust boundary per Gateway: a single operator or a mutually trusting team. Several agents on one Gateway separate workspaces, auth, sessions, model and per-agent sandbox and tools, which suits a work persona and a home persona for the same household. They do not make strangers safe from each other: one process and config, operator access to everything, channel access policy per account, and session tools that by default reach every agent (`tools.sessions.visibility` is `all`, `tools.agentToAgent.enabled` is `true`). For mutually untrusted users, run separate Gateways, preferably separate OS users or hosts. A second Gateway on one host needs its own `--profile` and base port, and doubles what you operate.
go deeper
Know that agents split persona, credentials and history, while a separate Gateway is what splits trust between people.
List what agents on one Gateway still share: the process and config, operator access, channel access policy and default session-tool reach.
Harden a mixed-trust single Gateway with narrowed session visibility, agent-to-agent limits and per-agent sandboxing, and know when that stops being enough.
Weigh operating cost against blast radius: one Gateway for one trust boundary, separate Gateways on separate OS users or hosts for people who must not see each other.
## The decision in one line Adding an agent separates **state**; adding a Gateway separates **trust**. OpenClaw's security trust model supports one trust boundary per Gateway, either a single operator or a mutually trusting team, and explicitly does not support one Gateway shared by mutually untrusted or adversarial users. Everything below follows from that. ## What another agent gives you An extra entry under the agent roster, routed by bindings, brings: - its own workspace with `AGENTS.md`, `SOUL.md` and notes, so personas differ; - its own `agentDir` with auth profiles and model registry, so the work agent can bill a different provider account; - its own session store, so histories do not mix; - its own model, skills list, tool policy and sandbox settings. That is exactly right for one household or one small team that wants a terse coding agent on a work account and a friendly agent on the family number. One process, one config and one set of channel logins keep it cheap to run. ## What agents on one Gateway still share - **Operator power.** Anyone who can edit `~/.openclaw` or reach the Gateway as an operator controls every agent. Operator roles are collaboration guardrails, not tenant isolation. - **Session reach.** `tools.sessions.visibility` defaults to `all` and `tools.agentToAgent.enabled` to `true`, so an unsandboxed, tool-enabled agent can list, read and message every agent's sessions. You can narrow this, and the security audit reports the plain default as `info` rather than a vulnerability, because one Gateway is one trust boundary. - **Channel access policy.** Pairing and allowlists are set per channel account, not per agent. Several agents bound to one WhatsApp number also reply from that one number. - **The host.** Unless an agent is sandboxed, its local tools run as the Gateway's OS user, and its workspace is a working directory, not a jail. - **Delegated authority.** Everyone who can message a tool-enabled agent shares that agent's tool authority. ## Comparing the options | Situation | Choice | Hardening that comes with it | |---|---|---| | One person, several personas | agents on one Gateway | per-agent workspace and model | | Trusted team, personas with different risk | agents on one Gateway | `tools.sessions.visibility` set to `agent` or `self`, `tools.agentToAgent.allow` or `enabled: false`, per-agent sandbox and tool deny | | A recovery bot that must survive the main one breaking | second Gateway | separate profile, port and bot token | | People who must not see each other's data | separate Gateways | ideally separate OS users or hosts | | Hosting several customers or organizations | one isolated Gateway cell per tenant | per the multi-tenant hosting guidance | ## What a second Gateway costs Running another Gateway on the same machine is supported, but it is a second installation to operate: 1. It needs its own named profile, for example `openclaw --profile ops setup`, which gives it a separate config file, state directory and workspace. 2. It needs its own base port; the docs ask for at least 120 ports between base ports so derived browser ports do not collide. 3. It needs its own service install and its own channel logins, such as a separate bot token. 4. Updates, backups, `openclaw doctor` runs and security audits now happen twice. For adversarial users even that is the minimum: the trust model prefers separate OS users, hosts or VPSs per boundary, because two Gateways under one OS user still share that user's files. ## How a lead should decide - Ask who can message each agent and whether those people would be comfortable with each other reading its transcripts and using its tools. If not, they belong in different Gateways. - If the split is only persona, cost or tone, use agents and narrow session tools for personas with different risk. - Revisit the decision when the audience changes: a family agent that later gets opened to outsiders has moved from a persona question to a trust question. - Check plugin storage separately: adding an agent does not split every global plugin store, so a shared store such as the default Memory Wiki vault needs its own per-agent setting. - Do not reach for multiple Gateways only for tidiness; the operational cost is real, and the docs note that most setups need one.
- On one OpenClaw Gateway, how do you stop a family agent's tools from reading the work agent's transcripts?Narrow the session tools: set `tools.sessions.visibility` to `agent` or `self`, restrict pairs with `tools.agentToAgent.allow`, or set `tools.agentToAgent.enabled: false`. Sandboxing the family agent also clamps it to its own spawn tree. This reduces leakage inside one trust boundary; it does not make the Gateway safe for mutually untrusted users.
- What does a second OpenClaw Gateway on the same host need so it does not collide with the first?Its own named profile (for example `openclaw --profile ops setup`), which gives it a separate config, state directory and workspace; its own base port at least 120 above the other; its own service install; and its own channel credentials, such as a dedicated bot token.
- Separate agents make one Gateway safe to share with strangers.
- Agents cannot read each other's sessions unless you enable it.
- Each agent can have its own DM allowlist on a shared WhatsApp number.
- Two Gateways under one OS user give full isolation from each other.
- Every new persona should get its own Gateway to be safe.